From 2188ce1b5926eb488fbbafd5a2142dff2f1dd751 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 23 Feb 2024 07:37:46 -0500 Subject: [PATCH] feat: add python 3.11 support --- .github/workflows/ci.yml | 6 ++++-- requirements/base.txt | 6 ++++-- requirements/ci.txt | 2 +- requirements/constraints.txt | 3 +++ requirements/dev.txt | 9 +++++---- requirements/doc.txt | 5 +++-- requirements/pip-tools.txt | 7 +------ requirements/quality.txt | 3 ++- requirements/test.txt | 3 ++- tox.ini | 24 +++++++++++------------- 10 files changed, 36 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8fc968..92f39cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,10 @@ jobs: strategy: 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@v4 - name: setup python diff --git a/requirements/base.txt b/requirements/base.txt index c0b4661..f902be3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,8 +6,10 @@ # asgiref==3.8.1 # via django -backports-zoneinfo==0.2.1 - # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt diff --git a/requirements/ci.txt b/requirements/ci.txt index c9dd749..c085cbc 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,7 +12,7 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # tox # virtualenv diff --git a/requirements/constraints.txt b/requirements/constraints.txt index d91704b..2d27179 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,6 @@ # Common constraints for edx repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + +# For python greater than or equal to 3.9 backports.zoneinfo is causing failures +backports.zoneinfo;python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index c040252..758a734 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -13,11 +13,12 @@ astroid==3.1.0 # -r requirements/quality.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/quality.txt # django -build==1.1.1 +build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools @@ -77,7 +78,7 @@ exceptiongroup==1.2.0 # via # -r requirements/quality.txt # pytest -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/ci.txt # tox @@ -100,7 +101,7 @@ jinja2==3.1.3 # -r requirements/quality.txt # code-annotations # diff-cover -lxml==5.1.0 +lxml==5.2.0 # via edx-i18n-tools markupsafe==2.1.5 # via diff --git a/requirements/doc.txt b/requirements/doc.txt index 97916e5..23788b7 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -16,8 +16,9 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # django beautifulsoup4==4.12.3 @@ -63,7 +64,7 @@ jinja2==3.1.3 # via sphinx markupsafe==2.1.5 # via jinja2 -nh3==0.2.15 +nh3==0.2.17 # via readme-renderer packaging==24.0 # via diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index aad9d38..a065a69 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,10 @@ # # make upgrade # -build==1.1.1 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # build -packaging==24.0 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 007a603..1d0ddfc 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -12,8 +12,9 @@ astroid==3.1.0 # via # pylint # pylint-celery -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # django click==8.1.7 diff --git a/requirements/test.txt b/requirements/test.txt index e769e43..e58f62d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -8,8 +8,9 @@ asgiref==3.8.1 # via # -r requirements/base.txt # django -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # django coverage[toml]==7.4.4 diff --git a/tox.ini b/tox.ini index 5894f0c..5fbf2af 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,24 @@ [tox] -envlist = py38-django{32,42}, quality, docs +envlist = py{38, 312}-django{42}, quality, docs [testenv] -deps = - django32: Django>=3.2,<4.0 +deps = django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.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 = -r{toxinidir}/requirements/doc.txt twine -commands = +commands = doc8 --ignore-path docs/_build README.rst docs rm -f docs/xss_utils.rst rm -f docs/modules.rst @@ -29,16 +28,16 @@ commands = twine check dist/* [testenv:quality] -setenv = +setenv = DJANGO_SETTINGS_MODULE = test_settings PYTHONPATH = {toxinidir} -allowlist_externals = +allowlist_externals = make rm touch -deps = +deps = -r{toxinidir}/requirements/quality.txt -commands = +commands = touch tests/__init__.py pylint xss_utils tests tests_utils manage.py setup.py rm tests/__init__.py @@ -46,4 +45,3 @@ commands = pydocstyle xss_utils tests manage.py setup.py isort --check-only --diff tests test_utils xss_utils manage.py setup.py test_settings.py make selfcheck -