From 99fd7cbdc83821050cdc214d76594dc723238b67 Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Thu, 15 Feb 2024 13:07:11 +0500 Subject: [PATCH] feat: add support for python 3.11 & 3.12 --- .github/workflows/ci.yml | 5 ++- CHANGELOG.rst | 2 + completion/__init__.py | 2 +- requirements/ci.txt | 4 +- requirements/constraints.txt | 2 +- requirements/dev.txt | 81 ++++++++++++------------------------ requirements/doc.txt | 71 +++++++++++++------------------ requirements/pip-tools.txt | 11 +---- requirements/pip.txt | 4 +- requirements/quality.in | 1 + requirements/quality.txt | 78 +++++++++++++--------------------- requirements/test.txt | 46 +++++++++----------- setup.py | 5 ++- tox.ini | 3 +- 14 files changed, 120 insertions(+), 195 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a87e846..bbbe7e75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,11 @@ jobs: name: Tests runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, django32-drf314, django32-drflatest, django42-drf314, django42-drflatest] + python-version: ['3.8', '3.11', '3.12'] + toxenv: [quality, django42-drf314, django42-drflatest] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea60aa9d..c412aa24 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ Change Log Unreleased ~~~~~~~~~~ +* Add support for Python 3.11 & 3.12 + [4.4.1] - 2023-10-27 ~~~~~~~~~~~~~~~~~~~~ * Fix RemovedInDjango41Warning by removing `django_app_config` diff --git a/completion/__init__.py b/completion/__init__.py index 8050a702..142bd91a 100644 --- a/completion/__init__.py +++ b/completion/__init__.py @@ -3,4 +3,4 @@ """ -__version__ = '4.4.1' +__version__ = '4.5.0' diff --git a/requirements/ci.txt b/requirements/ci.txt index 01c8cb53..125a00b0 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -22,8 +22,6 @@ py==1.11.0 # via tox six==1.16.0 # via tox -tomli==2.0.1 - # via tox tox==3.28.0 # via # -c requirements/constraints.txt diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 716bcfd5..1d87aca1 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -8,7 +8,7 @@ # pin when possible. Writing an issue against the offending project and # linking to it here is good. -Django < 3.3 +Django < 5.0 # tox >= 4.0.0 is a complete rewrite of the tox package. It is not a # simple upgrade. I've pinned the version to allow us to time to prioritize this upgrade. diff --git a/requirements/dev.txt b/requirements/dev.txt index 1303f7b5..49f54149 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -14,10 +14,8 @@ astroid==3.0.3 # via # pylint # pylint-celery -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu +attrs==23.2.0 + # via openedx-events billiard==4.2.0 # via celery build==1.0.3 @@ -62,9 +60,7 @@ coverage[toml]==7.4.1 # coverage # pytest-cov cryptography==42.0.2 - # via - # pyjwt - # secretstorage + # via pyjwt ddt==1.7.1 # via -r requirements/test.in diff-cover==8.0.3 @@ -73,7 +69,7 @@ dill==0.3.8 # via pylint distlib==0.3.8 # via virtualenv -django==3.2.24 +django==4.2.10 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -87,11 +83,12 @@ django==3.2.24 # edx-i18n-tools # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-waffle==4.1.0 # via @@ -112,6 +109,7 @@ edx-django-utils==5.10.1 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events edx-drf-extensions==10.2.0 # via -r requirements/base.in edx-i18n-tools==1.3.0 @@ -124,16 +122,19 @@ edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.in # edx-drf-extensions + # openedx-events edx-toggles==5.1.1 + # via + # -r requirements/base.in + # event-tracking +event-tracking==2.3.0 # via -r requirements/base.in -event-tracking==2.2.0 - # via -r requirements/base.in -exceptiongroup==1.2.0 - # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==22.7.0 +faker==23.2.0 # via factory-boy +fastavro==1.9.4 + # via openedx-events filelock==3.13.1 # via # tox @@ -145,24 +146,15 @@ fs==2.4.16 idna==3.6 # via requests importlib-metadata==7.0.1 - # via - # build - # keyring - # twine -importlib-resources==6.1.1 - # via keyring + # via twine iniconfig==2.0.0 # via pytest isort==5.13.2 # via # -r requirements/quality.in # pylint -jaraco-classes==3.3.0 +jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via # code-annotations @@ -196,6 +188,8 @@ newrelic==9.6.0 # via edx-django-utils nh3==0.2.15 # via readme-renderer +openedx-events==9.5.1 + # via event-tracking packaging==23.2 # via # build @@ -278,12 +272,11 @@ python-dateutil==2.8.2 # faker # freezegun # xblock -python-slugify==8.0.3 +python-slugify==8.0.4 # via code-annotations pytz==2024.1 # via # -r requirements/base.in - # django # djangorestframework # event-tracking # xblock @@ -305,8 +298,6 @@ rfc3986==2.0.0 # via twine rich==13.7.0 # via twine -secretstorage==3.3.3 - # via keyring semantic-version==2.10.0 # via edx-drf-extensions simplejson==3.19.2 @@ -329,36 +320,18 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -tomli==2.0.1 - # via - # build - # coverage - # pip-tools - # pylint - # pyproject-hooks - # pytest - # tox tomlkit==0.12.3 # via pylint tox==3.28.0 # via # -c requirements/constraints.txt # -r requirements/dev.in -twine==4.0.2 +twine==5.0.0 # via -r requirements/quality.in typing-extensions==4.9.0 - # via - # asgiref - # astroid - # edx-opaque-keys - # faker - # kombu - # pylint - # rich -tzdata==2023.4 - # via - # backports-zoneinfo - # celery + # via edx-opaque-keys +tzdata==2024.1 + # via celery urllib3==2.2.0 # via # requests @@ -381,9 +354,7 @@ wheel==0.42.0 xblock==1.10.0 # via -r requirements/base.in zipp==3.17.0 - # via - # importlib-metadata - # importlib-resources + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index c4e55ab2..18f8e130 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # accessible-pygments==0.0.4 # via pydata-sphinx-theme -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx amqp==5.2.0 # via kombu @@ -14,14 +14,12 @@ appdirs==1.4.4 # via fs asgiref==3.7.2 # via django +attrs==23.2.0 + # via openedx-events babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu beautifulsoup4==4.12.3 # via pydata-sphinx-theme billiard==4.2.0 @@ -60,7 +58,7 @@ cryptography==42.0.2 # via pyjwt ddt==1.7.1 # via -r requirements/test.in -django==3.2.24 +django==4.2.10 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -73,11 +71,12 @@ django==3.2.24 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-waffle==4.1.0 # via @@ -91,7 +90,7 @@ djangorestframework==3.14.0 # edx-drf-extensions doc8==1.1.1 # via -r requirements/doc.in -docutils==0.19 +docutils==0.20.1 # via # doc8 # pydata-sphinx-theme @@ -104,22 +103,26 @@ edx-django-utils==5.10.1 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events edx-drf-extensions==10.2.0 # via -r requirements/base.in edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.in # edx-drf-extensions + # openedx-events edx-toggles==5.1.1 + # via + # -r requirements/base.in + # event-tracking +event-tracking==2.3.0 # via -r requirements/base.in -event-tracking==2.2.0 - # via -r requirements/base.in -exceptiongroup==1.2.0 - # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==22.7.0 +faker==23.2.0 # via factory-boy +fastavro==1.9.4 + # via openedx-events freezegun==1.4.0 # via -r requirements/test.in fs==2.4.16 @@ -128,8 +131,6 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 - # via sphinx iniconfig==2.0.0 # via pytest jinja2==3.1.3 @@ -151,6 +152,8 @@ mock==5.1.0 # via -r requirements/test.in newrelic==9.6.0 # via edx-django-utils +openedx-events==9.5.1 + # via event-tracking packaging==23.2 # via # pydata-sphinx-theme @@ -166,7 +169,7 @@ psutil==5.9.8 # via edx-django-utils pycparser==2.21 # via cffi -pydata-sphinx-theme==0.14.4 +pydata-sphinx-theme==0.15.2 # via sphinx-book-theme pygments==2.17.2 # via @@ -199,13 +202,11 @@ python-dateutil==2.8.2 # faker # freezegun # xblock -python-slugify==8.0.3 +python-slugify==8.0.4 # via code-annotations pytz==2024.1 # via # -r requirements/base.in - # babel - # django # djangorestframework # event-tracking # xblock @@ -232,24 +233,24 @@ snowballstemmer==2.2.0 # via sphinx soupsieve==2.5 # via beautifulsoup4 -sphinx==6.2.1 +sphinx==7.2.6 # via # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.2 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx sqlparse==0.4.4 # via django @@ -261,22 +262,12 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -tomli==2.0.1 - # via - # coverage - # doc8 - # pytest typing-extensions==4.9.0 # via - # asgiref # edx-opaque-keys - # faker - # kombu # pydata-sphinx-theme -tzdata==2023.4 - # via - # backports-zoneinfo - # celery +tzdata==2024.1 + # via celery urllib3==2.2.0 # via requests vine==5.1.0 @@ -292,8 +283,6 @@ webob==1.8.7 # via xblock xblock==1.10.0 # via -r requirements/base.in -zipp==3.17.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 0e882265..b4998f80 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -8,23 +8,14 @@ build==1.0.3 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build packaging==23.2 # via build pip-tools==7.3.0 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via build -tomli==2.0.1 - # via - # build - # pip-tools - # pyproject-hooks wheel==0.42.0 # via pip-tools -zipp==3.17.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index dfa2b778..4cfa72f5 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -10,5 +10,5 @@ wheel==0.42.0 # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.0.3 +setuptools==69.1.0 # via -r requirements/pip.in diff --git a/requirements/quality.in b/requirements/quality.in index 7c47454a..ed8976bb 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -9,3 +9,4 @@ isort # to standardize order of imports pycodestyle # PEP 8 compliance validation pydocstyle # PEP 257 compliance validation twine # for package description syntax validation +wheel diff --git a/requirements/quality.txt b/requirements/quality.txt index 2374f9b1..d69967da 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -14,10 +14,8 @@ astroid==3.0.3 # via # pylint # pylint-celery -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu +attrs==23.2.0 + # via openedx-events billiard==4.2.0 # via celery celery==5.3.6 @@ -57,14 +55,12 @@ coverage[toml]==7.4.1 # coverage # pytest-cov cryptography==42.0.2 - # via - # pyjwt - # secretstorage + # via pyjwt ddt==1.7.1 # via -r requirements/test.in dill==0.3.8 # via pylint -django==3.2.24 +django==4.2.10 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -77,11 +73,12 @@ django==3.2.24 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-waffle==4.1.0 # via @@ -102,6 +99,7 @@ edx-django-utils==5.10.1 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events edx-drf-extensions==10.2.0 # via -r requirements/base.in edx-lint==5.3.6 @@ -110,16 +108,19 @@ edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.in # edx-drf-extensions + # openedx-events edx-toggles==5.1.1 + # via + # -r requirements/base.in + # event-tracking +event-tracking==2.3.0 # via -r requirements/base.in -event-tracking==2.2.0 - # via -r requirements/base.in -exceptiongroup==1.2.0 - # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==22.7.0 +faker==23.2.0 # via factory-boy +fastavro==1.9.4 + # via openedx-events freezegun==1.4.0 # via -r requirements/test.in fs==2.4.16 @@ -127,23 +128,15 @@ fs==2.4.16 idna==3.6 # via requests importlib-metadata==7.0.1 - # via - # keyring - # twine -importlib-resources==6.1.1 - # via keyring + # via twine iniconfig==2.0.0 # via pytest isort==5.13.2 # via # -r requirements/quality.in # pylint -jaraco-classes==3.3.0 +jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via code-annotations keyring==24.3.0 @@ -173,6 +166,8 @@ newrelic==9.6.0 # via edx-django-utils nh3==0.2.15 # via readme-renderer +openedx-events==9.5.1 + # via event-tracking packaging==23.2 # via pytest pbr==6.0.0 @@ -236,12 +231,11 @@ python-dateutil==2.8.2 # faker # freezegun # xblock -python-slugify==8.0.3 +python-slugify==8.0.4 # via code-annotations pytz==2024.1 # via # -r requirements/base.in - # django # djangorestframework # event-tracking # xblock @@ -262,8 +256,6 @@ rfc3986==2.0.0 # via twine rich==13.7.0 # via twine -secretstorage==3.3.3 - # via keyring semantic-version==2.10.0 # via edx-drf-extensions simplejson==3.19.2 @@ -285,28 +277,14 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -tomli==2.0.1 - # via - # coverage - # pylint - # pytest tomlkit==0.12.3 # via pylint -twine==4.0.2 +twine==5.0.0 # via -r requirements/quality.in typing-extensions==4.9.0 - # via - # asgiref - # astroid - # edx-opaque-keys - # faker - # kombu - # pylint - # rich -tzdata==2023.4 - # via - # backports-zoneinfo - # celery + # via edx-opaque-keys +tzdata==2024.1 + # via celery urllib3==2.2.0 # via # requests @@ -322,12 +300,12 @@ web-fragments==2.1.0 # via xblock webob==1.8.7 # via xblock +wheel==0.42.0 + # via -r requirements/doc.in xblock==1.10.0 # via -r requirements/base.in zipp==3.17.0 - # via - # importlib-metadata - # importlib-resources + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 6231147a..f76fe974 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -10,10 +10,8 @@ appdirs==1.4.4 # via fs asgiref==3.7.2 # via django -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu +attrs==23.2.0 + # via openedx-events billiard==4.2.0 # via celery celery==5.3.6 @@ -62,11 +60,12 @@ ddt==1.7.1 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-waffle==4.1.0 # via @@ -84,22 +83,26 @@ edx-django-utils==5.10.1 # edx-drf-extensions # edx-toggles # event-tracking + # openedx-events edx-drf-extensions==10.2.0 # via -r requirements/base.in edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.in # edx-drf-extensions + # openedx-events edx-toggles==5.1.1 + # via + # -r requirements/base.in + # event-tracking +event-tracking==2.3.0 # via -r requirements/base.in -event-tracking==2.2.0 - # via -r requirements/base.in -exceptiongroup==1.2.0 - # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==22.7.0 +faker==23.2.0 # via factory-boy +fastavro==1.9.4 + # via openedx-events freezegun==1.4.0 # via -r requirements/test.in fs==2.4.16 @@ -125,6 +128,8 @@ mock==5.1.0 # via -r requirements/test.in newrelic==9.6.0 # via edx-django-utils +openedx-events==9.5.1 + # via event-tracking packaging==23.2 # via pytest pbr==6.0.0 @@ -162,12 +167,11 @@ python-dateutil==2.8.2 # faker # freezegun # xblock -python-slugify==8.0.3 +python-slugify==8.0.4 # via code-annotations pytz==2024.1 # via # -r requirements/base.in - # django # djangorestframework # event-tracking # xblock @@ -195,20 +199,10 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -tomli==2.0.1 - # via - # coverage - # pytest typing-extensions==4.9.0 - # via - # asgiref - # edx-opaque-keys - # faker - # kombu -tzdata==2023.4 - # via - # backports-zoneinfo - # celery + # via edx-opaque-keys +tzdata==2024.1 + # via celery urllib3==2.2.0 # via requests vine==5.1.0 diff --git a/setup.py b/setup.py index d551a166..ac6d4626 100644 --- a/setup.py +++ b/setup.py @@ -125,12 +125,13 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/tox.ini b/tox.ini index c61bfd6f..827fc939 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = drf{314,latest},py38-django{32,42} +envlist = drf{314,latest},py{38,311,312}-django{42} [doc8] max-line-length = 120 @@ -19,7 +19,6 @@ norecursedirs = .* docs requirements [testenv] deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 drf314: djangorestframework<3.15.0 drflatest: djangorestframework