From a0bb1b5b56be1d3f1a4ebb886621961b458ab74e Mon Sep 17 00:00:00 2001 From: Paolo Melchiorre Date: Sun, 26 Nov 2023 17:24:18 +0100 Subject: [PATCH] Fix # 502 -- Update Python and Django versions --- .github/workflows/test.yml | 11 ++++++----- docs/authors.rst | 1 + docs/changelog.rst | 3 +++ setup.py | 3 ++- tests/test_by/tests.py | 2 +- tox.ini | 7 ++++--- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a94dd600..7902e0e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: @@ -26,7 +26,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: @@ -44,13 +44,14 @@ jobs: strategy: matrix: python-version: - - 3.8 - - 3.9 + - '3.8' + - '3.9' - '3.10' - '3.11' + - '3.12' name: Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: diff --git a/docs/authors.rst b/docs/authors.rst index 2ab2cfb2..add25b97 100644 --- a/docs/authors.rst +++ b/docs/authors.rst @@ -98,6 +98,7 @@ Authors * Nishit Shah * Olivier Sels * Olle Vidner +* Paolo Melchiorre * Paul Cunnane * Paul Donohue * Paulo Poiati diff --git a/docs/changelog.rst b/docs/changelog.rst index 80f80222..e41dfb27 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -20,6 +20,9 @@ Modifications to existing flavors: Other changes: - Dropped support for Python 3.6 and 3.7. +- Dropped support for Django 4.0. +- Added support for Python 3.12. +- Added support for Django 5.0. 4.0 (2023-04-22) diff --git a/setup.py b/setup.py index 51ce9f82..8e6ceacc 100644 --- a/setup.py +++ b/setup.py @@ -127,9 +127,9 @@ def find_package_data(where='.', package='', 'Environment :: Web Environment', 'Framework :: Django', 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.1', 'Framework :: Django :: 4.2', + 'Framework :: Django :: 5.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', @@ -139,6 +139,7 @@ def find_package_data(where='.', package='', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Internet :: WWW/HTTP', ], zip_safe=False, diff --git a/tests/test_by/tests.py b/tests/test_by/tests.py index 0074bf34..c21c03ad 100644 --- a/tests/test_by/tests.py +++ b/tests/test_by/tests.py @@ -53,7 +53,7 @@ def test_form_fields(self): def test_BYRegions_select(self): """Test that BYRegionField has valid choices""" choices = self.form.fields.get('region').choices - self.assertEqual(tuple(choices[1:]), forms.BY_REGIONS_CHOICES) + self.assertEqual(tuple(choices)[1:], forms.BY_REGIONS_CHOICES) def test_BYRegionSelect(self): self.maxDiff = None diff --git a/tox.ini b/tox.ini index 2d5ba3cb..c90ce274 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,10 @@ args_are_paths = false envlist = docs,prospector {py38,py39,py310,pypy39}-django-3.2 - {py38,py39,py310,pypy39}-django-4.0 {py38,py39,py310,py311,pypy39}-django-4.1 {py38,py39,py310,py311,pypy39}-django-4.2 - {py310,py311}-django-main + {py310,py311,py312}-django-5.0 + {py310,py311,py312}-django-main [testenv] basepython = @@ -14,6 +14,7 @@ basepython = py39: python3.9 py310: python3.10 py311: python3.11 + py312: python3.12 pypy39: pypy3.9 usedevelop = true pip_pre = true @@ -23,9 +24,9 @@ commands = invoke test {posargs} deps = django-3.2: Django>=3.2,<3.3 - django-4.0: Django>=4.0,<4.1 django-4.1: Django>=4.1,<4.2 django-4.2: Django>=4.2,<4.3 + django-5.0: Django>=5.0rc1,<5.1 django-main: https://github.com/django/django/archive/main.tar.gz -r{toxinidir}/tests/requirements.txt