diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 9ac3f29..3b54422 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,7 +1,22 @@
name: Run Tests, Evaluate Coverage, Package & Release
-on: [push, pull_request]
+on:
+ push: {}
+ pull_request:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ branches:
+ - master
+ pull_request_target:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ branches:
+ - master
jobs:
run-tests:
env:
@@ -13,8 +28,8 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: [python3.9, python3.8]
- django-version: [django4.0, django3.2, django3.1, django3.0]
- drf-version: [drf3.14, drf3.13, drf3.12, drf3.11]
+ django-version: [django5.0, django4.0, django3.2, django3.1, django3.0]
+ drf-version: [drf3.14]
name: ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.drf-version }}
steps:
- name: "Set job environments"
@@ -36,7 +51,18 @@ jobs:
sudo apt-get install -y build-essential
echo "Installing python Pillow library dependencies"
sudo apt-get install -y libraqm0 libfreetype6-dev libfribidi-dev libimagequant-dev libjpeg-dev liblcms2-dev libopenjp2-7-dev libtiff5-dev libwebp-dev libxcb1-dev
- - uses: actions/checkout@v2
+ - name: Checkout code (Push)
+ uses: actions/checkout@v4
+ if: github.event_name == 'push'
+ - name: Checkout code (Pull Request)
+ uses: actions/checkout@v4
+ if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
+ with:
+ # Assume PRs are less than 50 commits
+ ref: ${{ github.event.pull_request.head.ref }}
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+ fetch-depth: 50
- name: Set up Python "${{ env.PYTHON_V }}"
uses: actions/setup-python@v2
with:
@@ -63,7 +89,7 @@ jobs:
parallel-finished: true
publish-to-pypi:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
needs: run-tests
steps:
- uses: actions/checkout@master
diff --git a/README.rst b/README.rst
index d3e7cab..493c09b 100644
--- a/README.rst
+++ b/README.rst
@@ -37,6 +37,7 @@ Compatibility
- 3.2.x
- 4.0.x
- 4.1.x
+ - 5.0.x
**NOTE**: The 1.4 release dropped support for Django 1.5.x & 1.6.x.
@@ -50,9 +51,6 @@ Compatibility
- `Django REST Framework `_:
- - 3.11.x
- - 3.12.x
- - 3.13.x
- 3.14.x
Documentation
diff --git a/docs/index.rst b/docs/index.rst
index 1e5ddca..b8377c3 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -78,6 +78,12 @@ Table of Contents
Release Notes
=============
+3.1
+^^^
+- If available when resizing, ``Image.Resampling.LANCZOS`` will be used instead of ``Image.ANTIALIAS``. Thanks, `@alexei `_!
+- Removed support for djangorestframework < 3.14.x.
+- Added support for Django 5.0.
+
3.0
^^^
- Removed support for Django < 3.x. Thanks, `@browniebroke `_!
diff --git a/docs/installation.rst b/docs/installation.rst
index 110d086..2ecf4fb 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -23,11 +23,12 @@ Django Compatibility
- 3.2.x
- 4.0.x
- 4.1.x
+- 5.0.x
Dependencies
------------
-- ``Pillow``>= 2.4.x
+- ``Pillow``>= 6.2.x
``django-versatileimagefield`` depends on the excellent
`Pillow `__ fork of ``PIL``. If you
diff --git a/setup.py b/setup.py
index e61850f..906796c 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
setup(
name='django-versatileimagefield',
packages=find_packages(),
- version='3.0',
+ version='3.1',
author='Jonathan Ellenberger',
author_email='jonathan_ellenberger@wgbh.org',
url='http://github.com/respondcreate/django-versatileimagefield/',
@@ -16,7 +16,7 @@
long_description=open('README.rst').read(),
zip_safe=False,
install_requires=[
- 'Pillow>=2.4.0',
+ 'Pillow>=6.2.0',
'python-magic>=0.4.22,<1.0.0',
'Django>=3.0',
],
@@ -33,6 +33,7 @@
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
+ 'Framework :: Django :: 5.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
diff --git a/tox.ini b/tox.ini
index 1a22f46..f005477 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ minversion = 3.23.0
requires:
pip >= 21.0.1
envlist =
- py{3.8,3.9}-django{30,31,32,40,41}-drf{311,312,313,314}
+ py{3.8,3.9}-django{30,31,32,40,41,50}-drf{314}
[gh-actions]
python =
@@ -17,6 +17,7 @@ DJANGO =
3.2: django32
4.0: django40
4.1: django41
+ 5.0: django50
[testenv]
passenv = TRAVIS TRAVIS_* GITHUB_*
@@ -28,11 +29,9 @@ deps=
django30: Django>=3.0.13,<3.1.0
django31: Django>=3.1.7,<3.2.0
django32: Django>=3.2.0,<3.3.0
- django40: Django>=4.0.0,<4.1.0
- django41: Django>=4.1.0,<4.2.0
- drf311: djangorestframework>=3.11.2,<3.12.0
- drf312: djangorestframework>=3.12.4,<3.13.0
- drf313: djangorestframework>=3.13,<3.14
+ django40: Django>=4.0.0,<4.1.13
+ django41: Django>=4.1.13,<4.2.9
+ django50: Django>=4.2.9,<5.0.1
drf314: djangorestframework>=3.14,<3.15
flake8
sitepackages = False