From 8cce08521b5928688221ddc6349f19f4d2b78a4a Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 10:09:22 -0500 Subject: [PATCH 1/6] Updated Github Actions to run tests on fork PRs --- .github/workflows/tests.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ac3f29..e1705b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,16 @@ name: Run Tests, Evaluate Coverage, Package & Release -on: [push, pull_request] +on: + push: {} + pull_request: {} + pull_request_target: + types: + - opened + - reopened + - synchronize + branches: + - master jobs: run-tests: env: @@ -36,7 +45,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: From b631ac6ed80cfcbf8a79c09564f3b81ddf34d2e2 Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 10:27:25 -0500 Subject: [PATCH 2/6] Added Django 5.0 to test matrix --- tox.ini | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 1a22f46..fb041f9 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{311,312,313,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,8 +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 + django40: Django>=4.0.0,<4.1.13 + django41: Django>=4.1.13,<4.2.9 + django50: Django>=4.2.9,<5.0.1 drf311: djangorestframework>=3.11.2,<3.12.0 drf312: djangorestframework>=3.12.4,<3.13.0 drf313: djangorestframework>=3.13,<3.14 From a997f3713a7a3d9304e5f8db725f586c7e1a88ae Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 10:41:57 -0500 Subject: [PATCH 3/6] Updated PyPI publish `runs-on` Added Django 5.0 to supported versions in README & docs. --- .github/workflows/tests.yml | 10 ++++++++-- README.rst | 1 + docs/installation.rst | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1705b0..7b913a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,13 @@ name: Run Tests, Evaluate Coverage, Package & Release on: push: {} - pull_request: {} + pull_request: + types: + - opened + - reopened + - synchronize + branches: + - master pull_request_target: types: - opened @@ -83,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..10ab74d 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. diff --git a/docs/installation.rst b/docs/installation.rst index 110d086..c7f26b5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -23,6 +23,7 @@ Django Compatibility - 3.2.x - 4.0.x - 4.1.x +- 5.0.x Dependencies ------------ From 71f138aceb045f1c40a907bbefc64a264b99aedb Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 10:59:33 -0500 Subject: [PATCH 4/6] Removed old DRF versions --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b913a1..3b54422 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,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" From 23161e37856bb32ee8e4d9e2ad0f8bd3b9738996 Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 11:08:02 -0500 Subject: [PATCH 5/6] Removed support for djangorestframework < 3.14.x Includes: - Updated release notes for upcoming 3.1 release - Updated required Pillow version --- README.rst | 3 --- docs/index.rst | 6 ++++++ docs/installation.rst | 2 +- setup.py | 5 +++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 10ab74d..493c09b 100644 --- a/README.rst +++ b/README.rst @@ -51,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 c7f26b5..2ecf4fb 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -28,7 +28,7 @@ Django Compatibility 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', From e336e62f1350c43bc0dec16604acf564969715c3 Mon Sep 17 00:00:00 2001 From: Jonathan Ellenberger Date: Sun, 21 Jan 2024 11:14:05 -0500 Subject: [PATCH 6/6] Cleaned up drf versions to be 3.14.x only --- tox.ini | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index fb041f9..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,50}-drf{311,312,313,314} + py{3.8,3.9}-django{30,31,32,40,41,50}-drf{314} [gh-actions] python = @@ -32,9 +32,6 @@ deps= django40: Django>=4.0.0,<4.1.13 django41: Django>=4.1.13,<4.2.9 django50: Django>=4.2.9,<5.0.1 - drf311: djangorestframework>=3.11.2,<3.12.0 - drf312: djangorestframework>=3.12.4,<3.13.0 - drf313: djangorestframework>=3.13,<3.14 drf314: djangorestframework>=3.14,<3.15 flake8 sitepackages = False