From 068832d0bfc09eb9ca2a59f449a8d6b8d56cd747 Mon Sep 17 00:00:00 2001 From: Muhammad Umar Khan Date: Tue, 2 Apr 2024 14:50:47 +0500 Subject: [PATCH] feat: add python 3.11 support --- .github/workflows/ci.yml | 6 +++--- edxval/__init__.py | 2 +- requirements/constraints.txt | 3 +++ requirements/dev.txt | 3 ++- requirements/quality.txt | 3 ++- requirements/test.txt | 3 ++- tox.ini | 15 ++++++--------- 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64f44ea1..f4461e9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [django32, django42, quality] + python-version: ['3.8', '3.11'] + toxenv: [django42, quality] steps: - uses: actions/checkout@v2 @@ -63,7 +63,7 @@ jobs: - name: Install Dependencies run: | - pip install "Django<4.0" + pip install "Django>=4.2,<4.3" pip install -r requirements/ci.txt pip install -r requirements/test.txt diff --git a/edxval/__init__.py b/edxval/__init__.py index ef90434f..8193684a 100644 --- a/edxval/__init__.py +++ b/edxval/__init__.py @@ -2,4 +2,4 @@ init """ -__version__ = '2.4.4' +__version__ = '2.5.0' diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 116e8bf2..20143e98 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,6 @@ # Common constraints for edx repos -c 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 2bc0d42b..510ccdae 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -18,8 +18,9 @@ astroid==3.1.0 # pylint-celery backports-tarfile==1.1.0 # via jaraco-context -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # django # djangorestframework cachetools==5.3.3 diff --git a/requirements/quality.txt b/requirements/quality.txt index 69fbe271..83001431 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -18,8 +18,9 @@ astroid==3.1.0 # pylint-celery backports-tarfile==1.1.0 # via jaraco-context -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # django # djangorestframework certifi==2024.2.2 diff --git a/requirements/test.txt b/requirements/test.txt index 6ecd109a..39e28d9c 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -12,8 +12,9 @@ appdirs==1.4.4 # via fs asgiref==3.8.1 # via django -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # django # djangorestframework certifi==2024.2.2 diff --git a/tox.ini b/tox.ini index 41e0ab2e..c8fffcd3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,20 @@ [tox] -envlist = py38-django{32,42}, quality +envlist = py{38,311}-django{42}, quality [testenv] -deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 +deps = django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt -commands = +commands = python -Wd -m pytest {posargs} [testenv:quality] basepython = python3.8 -allowlist_externals = +allowlist_externals = make -deps = +deps = -r{toxinidir}/requirements/quality.txt -commands = +commands = pylint edxval pycodestyle edxval pydocstyle edxval @@ -24,4 +22,3 @@ commands = make selfcheck python setup.py sdist bdist_wheel twine check dist/* -