From 73ab5d8e6e8bace825dee1cead7ee8b4ed67872a Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 5 Apr 2024 17:03:40 +0500 Subject: [PATCH] feat: add python 312 support --- .github/workflows/ci.yml | 4 +-- requirements/base.txt | 28 +++++++++-------- requirements/ci.txt | 8 ++--- requirements/constraints.txt | 3 ++ requirements/dev.txt | 61 +++++++++++++++++++----------------- requirements/pip-tools.txt | 16 +++++----- requirements/pip.txt | 4 +-- requirements/quality.txt | 44 ++++++++++++++------------ requirements/test.txt | 40 ++++++++++++----------- tox.ini | 12 +------ 10 files changed, 115 insertions(+), 105 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17fc6d68c..5d40d9519 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04] - python-version: [3.8] - toxenv: [py38-django32, py38-django42, quality, translations-django32, translations-django42] + python-version: [3.8, 3.12] + toxenv: [django42, quality, translations-django42] steps: - name: checkout repo diff --git a/requirements/base.txt b/requirements/base.txt index 62a6ed0f6..7ba947c27 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,17 +6,21 @@ # appdirs==1.4.4 # via fs -asgiref==3.7.2 +asgiref==3.8.1 # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django bleach[css]==6.1.0 # via -r requirements/base.in -boto3==1.34.49 +boto3==1.34.78 # via fs-s3fs -botocore==1.34.49 +botocore==1.34.78 # via # boto3 # s3transfer -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # django-appconf @@ -39,7 +43,7 @@ jmespath==1.0.1 # botocore lazy==1.6 # via xblock -lxml==5.1.0 +lxml==5.2.1 # via xblock mako==1.3.2 # via xblock @@ -47,19 +51,17 @@ markupsafe==2.1.5 # via # mako # xblock -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via xblock -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # botocore # xblock pytz==2024.1 - # via - # django - # xblock + # via xblock pyyaml==6.0.1 # via xblock -s3transfer==0.10.0 +s3transfer==0.10.1 # via boto3 simplejson==3.19.2 # via xblock @@ -77,7 +79,7 @@ typing-extensions==4.10.0 # via asgiref urllib3==1.26.18 # via botocore -web-fragments==2.1.0 +web-fragments==2.2.0 # via xblock webencodings==0.5.1 # via @@ -85,7 +87,7 @@ webencodings==0.5.1 # tinycss2 webob==1.8.7 # via xblock -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/ci.txt b/requirements/ci.txt index e7a876093..c085cbcf7 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via tox chardet==5.2.0 # via tox @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/ci.in virtualenv==20.25.1 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 289e45347..84a58bca5 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,3 +12,6 @@ -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt pylint==2.4.2 + +# For python greater than or equal to 3.9 backports.zoneinfo causing failures +backports.zoneinfo; python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index 90445782a..bbcb5b0ce 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,7 +12,7 @@ arrow==1.3.0 # via # -r requirements/quality.txt # cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/quality.txt # django @@ -21,26 +21,31 @@ astroid==2.3.3 # -r requirements/quality.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/quality.txt + # django binaryornot==0.4.4 # via # -r requirements/quality.txt # cookiecutter bleach[css]==6.1.0 # via -r requirements/quality.txt -boto3==1.34.49 +boto3==1.34.78 # via # -r requirements/quality.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.78 # via # -r requirements/quality.txt # boto3 # s3transfer -build==1.0.3 +build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools -cachetools==5.3.2 +cachetools==5.3.3 # via # -r requirements/ci.txt # tox @@ -71,7 +76,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via # -r requirements/quality.txt # edx-lint @@ -83,17 +88,17 @@ cookiecutter==2.6.0 # via # -r requirements/quality.txt # xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/quality.txt # pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/quality.txt distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt @@ -116,7 +121,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 @@ -136,8 +141,9 @@ idna==3.6 # via # -r requirements/quality.txt # requests -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip-tools.txt # build iniconfig==2.0.0 @@ -166,7 +172,7 @@ lazy-object-proxy==1.4.3 # via # -r requirements/quality.txt # astroid -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/quality.txt # edx-i18n-tools @@ -196,11 +202,11 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/quality.txt -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/quality.txt # xblock -packaging==23.2 +packaging==24.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -209,7 +215,7 @@ packaging==23.2 # pyproject-api # pytest # tox -path==16.10.0 +path==16.12.1 # via # -r requirements/quality.txt # edx-i18n-tools @@ -217,7 +223,7 @@ pbr==6.0.0 # via # -r requirements/quality.txt # stevedore -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.txt platformdirs==4.2.0 # via @@ -274,16 +280,16 @@ pyproject-hooks==1.0.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.0.2 +pytest==8.1.1 # via # -r requirements/quality.txt # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/quality.txt pytest-django==4.8.0 # via -r requirements/quality.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/quality.txt # arrow @@ -297,7 +303,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/quality.txt - # django # xblock pyyaml==6.0.1 # via @@ -311,11 +316,11 @@ requests==2.31.0 # -r requirements/quality.txt # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via # -r requirements/quality.txt # cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/quality.txt # boto3 @@ -361,9 +366,9 @@ tomli==2.0.1 # pyproject-hooks # pytest # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/ci.txt -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via # -r requirements/quality.txt # arrow @@ -381,7 +386,7 @@ virtualenv==20.25.1 # via # -r requirements/ci.txt # tox -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/quality.txt # xblock @@ -396,7 +401,7 @@ webob==1.8.7 # -r requirements/quality.txt # xblock # xblock-sdk -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools @@ -404,13 +409,13 @@ wrapt==1.11.2 # via # -r requirements/quality.txt # astroid -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/quality.txt # xblock-sdk xblock-sdk==0.7.0 # via -r requirements/quality.txt -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/pip-tools.txt # importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 44c48d996..748bf44e6 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,17 @@ # # make upgrade # -build==1.0.3 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +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.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via @@ -23,9 +25,9 @@ tomli==2.0.1 # build # pip-tools # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 66656035b..cf449024a 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 6a8d97eee..35a7d7e39 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -12,7 +12,7 @@ arrow==1.3.0 # via # -r requirements/test.txt # cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/test.txt # django @@ -20,17 +20,22 @@ astroid==2.3.3 # via # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/test.txt + # django binaryornot==0.4.4 # via # -r requirements/test.txt # cookiecutter bleach[css]==6.1.0 # via -r requirements/test.txt -boto3==1.34.49 +boto3==1.34.78 # via # -r requirements/test.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.78 # via # -r requirements/test.txt # boto3 @@ -56,19 +61,19 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via edx-lint cookiecutter==2.6.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/test.txt # pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/test.txt -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -128,7 +133,7 @@ lazy==1.6 # xblock lazy-object-proxy==1.4.3 # via astroid -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/test.txt # edx-i18n-tools @@ -156,15 +161,15 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/test.txt -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/test.txt # xblock -packaging==23.2 +packaging==24.0 # via # -r requirements/test.txt # pytest -path==16.10.0 +path==16.12.1 # via # -r requirements/test.txt # edx-i18n-tools @@ -203,16 +208,16 @@ pypng==0.20220715.0 # via # -r requirements/test.txt # xblock-sdk -pytest==8.0.2 +pytest==8.1.1 # via # -r requirements/test.txt # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.txt pytest-django==4.8.0 # via -r requirements/test.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.txt # arrow @@ -226,7 +231,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/test.txt - # django # xblock pyyaml==6.0.1 # via @@ -240,11 +244,11 @@ requests==2.31.0 # -r requirements/test.txt # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via # -r requirements/test.txt # cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/test.txt # boto3 @@ -281,7 +285,7 @@ tomli==2.0.1 # -r requirements/test.txt # coverage # pytest -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via # -r requirements/test.txt # arrow @@ -295,7 +299,7 @@ urllib3==1.26.18 # -r requirements/test.txt # botocore # requests -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/test.txt # xblock @@ -312,7 +316,7 @@ webob==1.8.7 # xblock-sdk wrapt==1.11.2 # via astroid -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/test.txt # xblock-sdk diff --git a/requirements/test.txt b/requirements/test.txt index 2c6a0b980..15ad9a49a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,19 +10,24 @@ appdirs==1.4.4 # fs arrow==1.3.0 # via cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django binaryornot==0.4.4 # via cookiecutter bleach[css]==6.1.0 # via -r requirements/base.txt -boto3==1.34.49 +boto3==1.34.78 # via # -r requirements/base.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.78 # via # -r requirements/base.txt # boto3 @@ -37,9 +42,9 @@ click==8.1.7 # via cookiecutter cookiecutter==2.6.0 # via xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/test.in # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt @@ -85,7 +90,7 @@ lazy==1.6 # via # -r requirements/base.txt # xblock -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/base.txt # edx-i18n-tools @@ -107,14 +112,14 @@ mdurl==0.1.2 # via markdown-it-py mock==5.1.0 # via -r requirements/test.in -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/base.txt # -r requirements/test.in # xblock -packaging==23.2 +packaging==24.0 # via pytest -path==16.10.0 +path==16.12.1 # via edx-i18n-tools pluggy==1.4.0 # via pytest @@ -124,15 +129,15 @@ pygments==2.17.2 # via rich pypng==0.20220715.0 # via xblock-sdk -pytest==8.0.2 +pytest==8.1.1 # via # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.in pytest-django==4.8.0 # via -r requirements/test.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/base.txt # arrow @@ -143,7 +148,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/base.txt - # django # xblock pyyaml==6.0.1 # via @@ -155,9 +159,9 @@ requests==2.31.0 # via # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/base.txt # boto3 @@ -187,7 +191,7 @@ tomli==2.0.1 # via # coverage # pytest -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via arrow typing-extensions==4.10.0 # via @@ -199,7 +203,7 @@ urllib3==1.26.18 # -r requirements/base.txt # botocore # requests -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/base.txt # xblock @@ -214,7 +218,7 @@ webob==1.8.7 # -r requirements/base.txt # xblock # xblock-sdk -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/base.txt # xblock-sdk diff --git a/tox.ini b/tox.ini index 87c416a16..06ed9963e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,42},quality,translations-django{32,42} +envlist = py{38, 312}-django{42},quality,translations-django{42} [pycodestyle] exclude = .git,.tox @@ -20,7 +20,6 @@ allowlist_externals = make mkdir deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands = @@ -35,15 +34,6 @@ commands = pylint drag_and_drop_v2 pylint tests --rcfile=tests/pylintrc -[testenv:translations-django32] -allowlist_externals = - make -deps = - Django>=3.2,<4.0 - -r{toxinidir}/requirements/test.txt -commands = - make check_translations_up_to_date - [testenv:translations-django42] allowlist_externals = make