From 3c66e8ec9b613f76ca0461fab0063232fb6d1d7c Mon Sep 17 00:00:00 2001 From: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com> Date: Thu, 7 Mar 2024 04:15:03 -0500 Subject: [PATCH] feat: add python312 support (#261) --- .github/workflows/ci.yml | 10 +++++----- CHANGELOG.rst | 6 ++++++ edx_ace/__init__.py | 2 +- requirements/ci.txt | 2 +- requirements/constraints.txt | 2 ++ requirements/dev.in | 3 ++- requirements/dev.txt | 26 +++++++++----------------- requirements/doc.in | 1 + requirements/doc.txt | 21 ++++++--------------- requirements/pip-tools.txt | 2 +- requirements/quality.in | 1 + requirements/quality.txt | 4 ++++ requirements/test.in | 1 + requirements/test.txt | 11 +++++++---- setup.py | 2 +- tox.ini | 33 ++++++++++++++++++--------------- 16 files changed, 66 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd35cdbf..5da84681 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,13 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, django32, django42] + python-version: ['3.8', '3.12'] + toxenv: [quality, docs, django42] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -34,7 +34,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='django42' + if: matrix.python-version == '3.12' && matrix.toxenv=='django42' uses: codecov/codecov-action@v3 with: flags: unittests diff --git a/CHANGELOG.rst b/CHANGELOG.rst index de6f5ed6..2c7ab758 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,12 @@ Change Log Unreleased ~~~~~~~~~~ +[1.8.0] - 2024-03-06 +~~~~~~~~~~~~~~~~~~~~ +* Added support for ``Python 3.12`` +* Dropped support for ``Django 3.2`` + + [1.7.0] - 2023-07-21 ~~~~~~~~~~~~~~~~~~~~ diff --git a/edx_ace/__init__.py b/edx_ace/__init__.py index c0213308..09590995 100644 --- a/edx_ace/__init__.py +++ b/edx_ace/__init__.py @@ -13,7 +13,7 @@ from .recipient import Recipient from .recipient_resolver import RecipientResolver -__version__ = '1.7.0' +__version__ = '1.8.0' __all__ = [ diff --git a/requirements/ci.txt b/requirements/ci.txt index 88a39ff7..127e7293 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.0 # via -r requirements/ci.in virtualenv==20.25.1 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index d91704bb..3566bc03 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,5 @@ # Common constraints for edx repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + +backports.zoneinfo==0.2.1; python_version<'3.9' diff --git a/requirements/dev.in b/requirements/dev.in index 80a3970d..5f086dc9 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -8,4 +8,5 @@ edx-i18n-tools # For i18n_tool dummy pip-tools # Requirements file management tox # virtualenv management for tests twine # Utility for PyPI package uploads -wheel # For generation of wheels for PyPI \ No newline at end of file +wheel # For generation of wheels for PyPI +backports.zoneinfo; python_version<'3.9' # Needed for Python 3.12 compatibility diff --git a/requirements/dev.txt b/requirements/dev.txt index b0fd4a46..3802d1b6 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,16 +12,18 @@ astroid==3.1.0 # pylint-celery attrs==23.2.0 # via -r requirements/base.in -backports-zoneinfo==0.2.1 - # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/dev.in + # -r requirements/quality.in + # django build==1.1.1 # via pip-tools cachetools==5.3.3 # via tox certifi==2024.2.2 # via requests -cffi==1.16.0 - # via cryptography chardet==5.2.0 # via # diff-cover @@ -40,15 +42,13 @@ code-annotations==1.6.0 # via edx-lint colorama==0.4.6 # via tox -cryptography==42.0.5 - # via secretstorage diff-cover==8.0.3 # via -r requirements/dev.in dill==0.3.8 # via pylint distlib==0.3.8 # via virtualenv -django==4.2.10 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -80,10 +80,6 @@ isort==5.13.2 # pylint jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via # code-annotations @@ -113,7 +109,7 @@ path==16.10.0 # via edx-i18n-tools pbr==6.0.0 # via stevedore -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/dev.in pkginfo==1.10.0 # via twine @@ -130,8 +126,6 @@ polib==1.2.0 # via edx-i18n-tools pycodestyle==2.11.1 # via -r requirements/quality.in -pycparser==2.21 - # via cffi pydocstyle==6.3.0 # via -r requirements/quality.in pygments==2.17.2 @@ -182,8 +176,6 @@ rich==13.7.1 # via twine sailthru-client==2.2.3 # via -r requirements/base.in -secretstorage==3.3.3 - # via keyring simplejson==3.19.2 # via sailthru-client six==1.16.0 @@ -211,7 +203,7 @@ tomli==2.0.1 # tox tomlkit==0.12.4 # via pylint -tox==4.13.0 +tox==4.14.0 # via -r requirements/dev.in twine==5.0.0 # via -r requirements/dev.in diff --git a/requirements/doc.in b/requirements/doc.in index e26b75f0..0d78a715 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -7,3 +7,4 @@ sphinx-book-theme # Common theme for all Open edX projects readme_renderer # Validates README.rst for usage on PyPI Sphinx # Documentation builder twine +backports.zoneinfo; python_version<'3.9' # Needed for Python 3.12 compatibility diff --git a/requirements/doc.txt b/requirements/doc.txt index 7c6f85fd..c299e208 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -16,19 +16,18 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo==0.2.1 - # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/doc.in + # django beautifulsoup4==4.12.3 # via pydata-sphinx-theme certifi==2024.2.2 # via requests -cffi==1.16.0 - # via cryptography charset-normalizer==3.3.2 # via requests -cryptography==42.0.5 - # via secretstorage -django==4.2.10 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -54,10 +53,6 @@ importlib-resources==6.1.2 # via keyring jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via sphinx keyring==24.3.1 @@ -80,8 +75,6 @@ pbr==6.0.0 # via stevedore pkginfo==1.10.0 # via twine -pycparser==2.21 - # via cffi pydata-sphinx-theme==0.14.4 # via sphinx-book-theme pygments==2.17.2 @@ -116,8 +109,6 @@ rich==13.7.1 # via twine sailthru-client==2.2.3 # via -r requirements/base.in -secretstorage==3.3.3 - # via keyring simplejson==3.19.2 # via sailthru-client six==1.16.0 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 8528adba..921c5b5c 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -12,7 +12,7 @@ importlib-metadata==7.0.1 # via build packaging==23.2 # via build -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via diff --git a/requirements/quality.in b/requirements/quality.in index d375c7b9..58465891 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -6,3 +6,4 @@ edx-lint # edX pylint rules and plugins isort # to standardize order of imports pycodestyle # PEP 8 compliance validation pydocstyle # PEP 257 compliance validation +backports.zoneinfo; python_version<'3.9' # Needed for Python 3.12 compatibility diff --git a/requirements/quality.txt b/requirements/quality.txt index bd1b0a6b..30921d25 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -8,6 +8,10 @@ astroid==3.1.0 # via # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/quality.in click==8.1.7 # via # click-log diff --git a/requirements/test.in b/requirements/test.in index fca06233..51678531 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -10,3 +10,4 @@ mock pudb # For easier test debugging hypothesis[pytz] # For property-based testing hypothesis-pytest +backports.zoneinfo; python_version<'3.9' # Needed for Python 3.12 compatibility diff --git a/requirements/test.txt b/requirements/test.txt index e2c33d0c..c5d4b131 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,8 +10,11 @@ attrs==23.2.0 # via # -r requirements/base.in # hypothesis -backports-zoneinfo==0.2.1 - # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/test.in + # django certifi==2024.2.2 # via requests charset-normalizer==3.3.2 @@ -57,7 +60,7 @@ pudb==2024.1 # via -r requirements/test.in pygments==2.17.2 # via pudb -pytest==8.1.0 +pytest==8.0.2 # via # hypothesis-pytest # pytest-cov @@ -99,7 +102,7 @@ typing-extensions==4.10.0 # urwid urllib3==2.2.1 # via requests -urwid==2.6.7 +urwid==2.6.8 # via # pudb # urwid-readline diff --git a/setup.py b/setup.py index 83eb39f4..d5cc3239 100644 --- a/setup.py +++ b/setup.py @@ -120,13 +120,13 @@ def is_requirement(line): classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 3.2', '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.12', ], entry_points={ 'openedx.ace.channel': [ diff --git a/tox.ini b/tox.ini index 908fc813..936b0e93 100644 --- a/tox.ini +++ b/tox.ini @@ -1,27 +1,27 @@ [tox] -envlist = py38-django{32, 42}, quality +envlist = py{38, 312}-django{42}, docs, quality [testenv] -deps = - django32: Django>=3.2,<4.0 +deps = + setuptools django42: Django>=4.2,<4.3 - quality: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt - -r{toxinidir}/requirements/quality.txt -commands = +commands = python -Wd -m pytest {posargs} [testenv:docs] -setenv = +setenv = DJANGO_SETTINGS_MODULE = test_settings PYTHONPATH = {toxinidir} -allowlist_externals = +allowlist_externals = make rm -deps = +deps = + setuptools + wheel -r{toxinidir}/requirements/test.txt -r{toxinidir}/requirements/doc.txt -commands = +commands = doc8 --ignore-path docs/_build README.rst docs make -C docs clean make -C docs html @@ -29,19 +29,22 @@ commands = twine check dist/* [testenv:quality] -setenv = +setenv = DJANGO_SETTINGS_MODULE=test_settings PYTHONPATH = {toxinidir}/:{toxinidir}/edx_ace -basepython = python3.8 -allowlist_externals = +deps = + setuptools + quality: Django>=4.2,<4.3 + -r{toxinidir}/requirements/test.txt + -r{toxinidir}/requirements/quality.txt +allowlist_externals = make rm touch -commands = +commands = touch edx_ace/tests/__init__.py pylint edx_ace rm edx_ace/tests/__init__.py pycodestyle edx_ace isort --check-only --diff edx_ace manage.py setup.py test_settings.py make selfcheck -