From efc46e35a964191c1c3959a37633e1c514fd4570 Mon Sep 17 00:00:00 2001 From: Abubakar Khawaja Date: Thu, 8 May 2025 13:01:54 +0500 Subject: [PATCH 1/5] feat: drop support for python3.8 and add python3.12 --- .github/workflows/ci.yml | 13 +- .github/workflows/pypi-publish.yml | 6 +- CHANGELOG.rst | 9 +- README.rst | 2 +- loncapa/loncapa_check.py | 1 - requirements/base.in | 2 - requirements/base.txt | 4 +- requirements/ci.txt | 40 ++++--- requirements/dev.txt | 184 ++++++++++++++--------------- requirements/doc.txt | 139 ++++++++++------------ requirements/pip-tools.txt | 21 ++-- requirements/pip.txt | 12 +- requirements/quality.txt | 130 ++++++++++---------- requirements/test.txt | 26 ++-- setup.py | 8 +- tests_eia.py | 2 +- tox.ini | 2 +- verifiers/draganddrop.py | 6 +- 18 files changed, 285 insertions(+), 322 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1fa3d3..b883823 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,12 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.8'] - toxenv: ["py38", "quality"] - + python-version: ['3.12', '3.11'] + toxenv: ["py312", "py311", "quality"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -37,8 +36,8 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'py38' - uses: codecov/codecov-action@v4 + if: (matrix.python-version == '3.11' && matrix.toxenv == 'py311') || (matrix.python-version == '3.12' && matrix.toxenv == 'py312') + uses: codecov/codecov-action@v5 with: flags: unittests fail_ci_if_error: true diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index da353d4..42c80d8 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -11,11 +11,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 186e70c..74d73b1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,14 @@ Unreleased * +[1.1.0] - 2023-10-04 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Changed +_______ + +* Dropped support for Python 3.8 and added support for Python 3.12. + [1.0.0] - 2022-05-17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -24,4 +32,3 @@ _____ * First release on PyPI. * codejail includes moved from edx-platform to individual pypi package. - diff --git a/README.rst b/README.rst index 5c35d03..177529e 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ One Time Setup cd codejail-includes # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it - mkvirtualenv -p python3.8 codejail-includes + mkvirtualenv -p python3.11 codejail-includes Every time you develop something in this repo diff --git a/loncapa/loncapa_check.py b/loncapa/loncapa_check.py index 80a0a51..b69a8b9 100644 --- a/loncapa/loncapa_check.py +++ b/loncapa/loncapa_check.py @@ -8,7 +8,6 @@ import math import random -from six.moves import range def lc_random(lower, upper, stepsize): diff --git a/requirements/base.in b/requirements/base.in index c272242..ddfb00e 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1,4 +1,2 @@ # Core requirements for using this application -c constraints.txt - -six diff --git a/requirements/base.txt b/requirements/base.txt index 20629f7..1f4abdb 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,8 +1,6 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -six==1.16.0 - # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index e5f81f0..4fe9c79 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,30 +1,34 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -distlib==0.3.7 +cachetools==5.5.2 + # via tox +chardet==5.2.0 + # via tox +colorama==0.4.6 + # via tox +distlib==0.3.9 # via virtualenv -filelock==3.12.4 +filelock==3.18.0 # via # tox # virtualenv -packaging==23.2 - # via tox -platformdirs==3.11.0 - # via virtualenv -pluggy==1.3.0 - # via tox -py==1.11.0 - # via tox -six==1.16.0 +packaging==25.0 + # via + # pyproject-api + # tox +platformdirs==4.3.7 + # via + # tox + # virtualenv +pluggy==1.5.0 # via tox -tomli==2.0.1 +pyproject-api==1.9.0 # via tox -tox==3.28.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/ci.in -virtualenv==20.24.6 +tox==4.25.0 + # via -r requirements/ci.in +virtualenv==20.31.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 4d519eb..39fbf1d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,29 +1,40 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -astroid==3.0.1 +astroid==3.3.9 # via # -r requirements/quality.txt # pylint # pylint-celery -build==1.0.3 +backports-tarfile==1.2.0 + # via + # -r requirements/quality.txt + # jaraco-context +build==1.2.2.post1 # via # -r requirements/pip-tools.txt # pip-tools -certifi==2023.7.22 +cachetools==5.5.2 + # via + # -r requirements/ci.txt + # tox +certifi==2025.4.26 # via # -r requirements/quality.txt # requests chardet==5.2.0 - # via diff-cover -charset-normalizer==3.3.1 + # via + # -r requirements/ci.txt + # diff-cover + # tox +charset-normalizer==3.4.2 # via # -r requirements/quality.txt # requests -click==8.1.7 +click==8.1.8 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -35,73 +46,77 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.5.0 +code-annotations==2.3.0 # via # -r requirements/quality.txt # edx-lint -coverage[toml]==7.3.2 +colorama==0.4.6 + # via + # -r requirements/ci.txt + # tox +coverage[toml]==7.8.0 # via # -r requirements/quality.txt - # coverage # pytest-cov -diff-cover==7.7.0 +diff-cover==9.2.4 # via -r requirements/dev.in -dill==0.3.7 +dill==0.4.0 # via # -r requirements/quality.txt # pylint -distlib==0.3.7 +distlib==0.3.9 # via # -r requirements/ci.txt # virtualenv -docutils==0.20.1 +docutils==0.21.2 # via # -r requirements/quality.txt # readme-renderer -edx-lint==5.3.6 +edx-lint==5.6.0 # via -r requirements/quality.txt -exceptiongroup==1.1.3 - # via - # -r requirements/quality.txt - # pytest -filelock==3.12.4 +filelock==3.18.0 # via # -r requirements/ci.txt # tox # virtualenv -idna==3.4 +id==1.5.0 # via # -r requirements/quality.txt - # requests -importlib-metadata==6.8.0 + # twine +idna==3.10 # via - # -r requirements/pip-tools.txt # -r requirements/quality.txt - # build - # keyring - # twine -importlib-resources==6.1.0 + # requests +importlib-metadata==8.7.0 # via # -r requirements/quality.txt # keyring -iniconfig==2.0.0 +iniconfig==2.1.0 # via # -r requirements/quality.txt # pytest -isort==5.12.0 +isort==6.0.1 # via # -r requirements/quality.txt # pylint -jaraco-classes==3.3.0 +jaraco-classes==3.4.0 # via # -r requirements/quality.txt # keyring -jinja2==3.1.2 +jaraco-context==6.0.1 + # via + # -r requirements/quality.txt + # keyring +jaraco-functools==4.1.0 + # via + # -r requirements/quality.txt + # keyring +jinja2==3.1.6 # via # -r requirements/quality.txt # code-annotations # diff-cover -keyring==24.2.0 +keyring==25.6.0 # via # -r requirements/quality.txt # twine @@ -109,7 +124,7 @@ markdown-it-py==3.0.0 # via # -r requirements/quality.txt # rich -markupsafe==2.1.3 +markupsafe==3.0.2 # via # -r requirements/quality.txt # jinja2 @@ -121,60 +136,56 @@ mdurl==0.1.2 # via # -r requirements/quality.txt # markdown-it-py -more-itertools==10.1.0 +more-itertools==10.7.0 # via # -r requirements/quality.txt # jaraco-classes -nh3==0.2.14 + # jaraco-functools +nh3==0.2.21 # via # -r requirements/quality.txt # readme-renderer -packaging==23.2 +packaging==25.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt # -r requirements/quality.txt # build + # pyproject-api # pytest # tox -pbr==5.11.1 + # twine +pbr==6.1.1 # via # -r requirements/quality.txt # stevedore -pip-tools==7.3.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.txt -pkginfo==1.9.6 - # via - # -r requirements/quality.txt - # twine -platformdirs==3.11.0 +platformdirs==4.3.7 # via # -r requirements/ci.txt # -r requirements/quality.txt # pylint + # tox # virtualenv -pluggy==1.3.0 +pluggy==1.5.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # diff-cover # pytest # tox -py==1.11.0 - # via - # -r requirements/ci.txt - # tox -pycodestyle==2.11.1 +pycodestyle==2.13.0 # via -r requirements/quality.txt pydocstyle==6.3.0 # via -r requirements/quality.txt -pygments==2.16.1 +pygments==2.19.1 # via # -r requirements/quality.txt # diff-cover # readme-renderer # rich -pylint==3.0.2 +pylint==3.3.7 # via # -r requirements/quality.txt # edx-lint @@ -185,7 +196,7 @@ pylint-celery==0.3 # via # -r requirements/quality.txt # edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via # -r requirements/quality.txt # edx-lint @@ -194,31 +205,37 @@ pylint-plugin-utils==0.8.2 # -r requirements/quality.txt # pylint-celery # pylint-django -pyproject-hooks==1.0.0 +pyproject-api==1.9.0 + # via + # -r requirements/ci.txt + # tox +pyproject-hooks==1.2.0 # via # -r requirements/pip-tools.txt # build -pytest==7.4.2 + # pip-tools +pytest==8.3.5 # via # -r requirements/quality.txt # pytest-cov -pytest-cov==4.1.0 +pytest-cov==6.1.1 # via -r requirements/quality.txt -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/quality.txt # code-annotations -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements/quality.txt # code-annotations -readme-renderer==42.0 +readme-renderer==44.0 # via # -r requirements/quality.txt # twine -requests==2.31.0 +requests==2.32.3 # via # -r requirements/quality.txt + # id # requests-toolbelt # twine requests-toolbelt==1.0.0 @@ -229,21 +246,19 @@ rfc3986==2.0.0 # via # -r requirements/quality.txt # twine -rich==13.6.0 +rich==14.0.0 # via # -r requirements/quality.txt # twine -six==1.16.0 +six==1.17.0 # via - # -r requirements/ci.txt # -r requirements/quality.txt # edx-lint - # tox snowballstemmer==2.2.0 # via # -r requirements/quality.txt # pydocstyle -stevedore==5.1.0 +stevedore==5.4.1 # via # -r requirements/quality.txt # code-annotations @@ -251,53 +266,32 @@ text-unidecode==1.3 # via # -r requirements/quality.txt # python-slugify -tomli==2.0.1 - # via - # -r requirements/ci.txt - # -r requirements/pip-tools.txt - # -r requirements/quality.txt - # build - # coverage - # pip-tools - # pylint - # pyproject-hooks - # pytest - # tox -tomlkit==0.12.1 +tomlkit==0.13.2 # via # -r requirements/quality.txt # pylint -tox==3.28.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/ci.txt -twine==4.0.2 +tox==4.25.0 + # via -r requirements/ci.txt +twine==6.1.0 # via -r requirements/quality.txt -typing-extensions==4.8.0 - # via - # -r requirements/quality.txt - # astroid - # pylint - # rich -urllib3==2.0.7 +urllib3==2.2.3 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # requests # twine -virtualenv==20.24.6 +virtualenv==20.31.1 # via # -r requirements/ci.txt # tox -wheel==0.41.2 +wheel==0.45.1 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.17.0 +zipp==3.21.0 # via - # -r requirements/pip-tools.txt # -r requirements/quality.txt # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index af83123..03d3467 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,93 +1,91 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -accessible-pygments==0.0.4 +accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.13 +alabaster==1.0.0 # via sphinx -babel==2.13.1 +babel==2.17.0 # via # pydata-sphinx-theme # sphinx -beautifulsoup4==4.12.2 +backports-tarfile==1.2.0 + # via jaraco-context +beautifulsoup4==4.13.4 # via pydata-sphinx-theme -build==1.0.3 +build==1.2.2.post1 # via -r requirements/doc.in -certifi==2023.7.22 +certifi==2025.4.26 # via requests -charset-normalizer==3.3.1 +charset-normalizer==3.4.2 # via requests -coverage[toml]==7.3.2 +coverage[toml]==7.8.0 # via # -r requirements/test.txt - # coverage # pytest-cov -doc8==1.1.1 +doc8==1.1.2 # via -r requirements/doc.in -docutils==0.19 +docutils==0.21.2 # via # doc8 # pydata-sphinx-theme # readme-renderer # restructuredtext-lint # sphinx -exceptiongroup==1.1.3 - # via - # -r requirements/test.txt - # pytest -idna==3.4 +id==1.5.0 + # via twine +idna==3.10 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.8.0 - # via - # build - # keyring - # sphinx - # twine -importlib-resources==6.1.0 +importlib-metadata==8.7.0 # via keyring -iniconfig==2.0.0 +iniconfig==2.1.0 # via # -r requirements/test.txt # pytest -jaraco-classes==3.3.0 +jaraco-classes==3.4.0 + # via keyring +jaraco-context==6.0.1 # via keyring -jinja2==3.1.2 +jaraco-functools==4.1.0 + # via keyring +jinja2==3.1.6 # via sphinx -keyring==24.2.0 +keyring==25.6.0 # via twine markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==3.0.2 # via jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.1.0 - # via jaraco-classes -nh3==0.2.14 +more-itertools==10.7.0 + # via + # jaraco-classes + # jaraco-functools +nh3==0.2.21 # via readme-renderer -packaging==23.2 +packaging==25.0 # via # -r requirements/test.txt # build # pydata-sphinx-theme # pytest # sphinx -pbr==5.11.1 + # twine +pbr==6.1.1 # via stevedore -pkginfo==1.9.6 - # via twine -pluggy==1.3.0 +pluggy==1.5.0 # via # -r requirements/test.txt # pytest -pydata-sphinx-theme==0.14.1 +pydata-sphinx-theme==0.15.4 # via sphinx-book-theme -pygments==2.16.1 +pygments==2.19.1 # via # accessible-pygments # doc8 @@ -95,20 +93,19 @@ pygments==2.16.1 # readme-renderer # rich # sphinx -pyproject-hooks==1.0.0 +pyproject-hooks==1.2.0 # via build -pytest==7.4.2 +pytest==8.3.5 # via # -r requirements/test.txt # pytest-cov -pytest-cov==4.1.0 +pytest-cov==6.1.1 # via -r requirements/test.txt -pytz==2023.3.post1 - # via babel -readme-renderer==42.0 +readme-renderer==44.0 # via twine -requests==2.31.0 +requests==2.32.3 # via + # id # requests-toolbelt # sphinx # twine @@ -118,54 +115,48 @@ restructuredtext-lint==1.4.0 # via doc8 rfc3986==2.0.0 # via twine -rich==13.6.0 +rich==14.0.0 # via twine -six==1.16.0 - # via -r requirements/test.txt +roman-numerals-py==3.1.0 + # via sphinx snowballstemmer==2.2.0 # via sphinx -soupsieve==2.5 +soupsieve==2.7 # via beautifulsoup4 -sphinx==6.2.1 +sphinx==8.2.3 # via # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.4 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx -stevedore==5.1.0 +stevedore==5.4.1 # via doc8 -tomli==2.0.1 - # via - # -r requirements/test.txt - # build - # coverage - # doc8 - # pyproject-hooks - # pytest -twine==4.0.2 +twine==6.1.0 # via -r requirements/doc.in -typing-extensions==4.8.0 +typing-extensions==4.13.2 # via + # beautifulsoup4 # pydata-sphinx-theme - # rich -urllib3==2.0.7 +urllib3==2.2.3 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # requests # twine -zipp==3.17.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.21.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 50d35f2..1dd71b5 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,30 +1,23 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -build==1.0.3 +build==1.2.2.post1 # via pip-tools -click==8.1.7 +click==8.1.8 # via pip-tools -importlib-metadata==6.8.0 +packaging==25.0 # via build -packaging==23.2 - # via build -pip-tools==7.3.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in -pyproject-hooks==1.0.0 - # via build -tomli==2.0.1 +pyproject-hooks==1.2.0 # via # build # pip-tools - # pyproject-hooks -wheel==0.41.2 +wheel==0.45.1 # 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 0c788d6..a124796 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,16 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -wheel==0.41.2 +wheel==0.45.1 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.3.1 - # via -r requirements/pip.in -setuptools==68.2.2 +pip==24.2 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/pip.in +setuptools==80.3.1 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 57fac64..b0b820c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,98 +1,98 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -astroid==3.0.1 +astroid==3.3.9 # via # pylint # pylint-celery -certifi==2023.7.22 +backports-tarfile==1.2.0 + # via jaraco-context +certifi==2025.4.26 # via requests -charset-normalizer==3.3.1 +charset-normalizer==3.4.2 # via requests -click==8.1.7 +click==8.1.8 # via # click-log # code-annotations # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.5.0 +code-annotations==2.3.0 # via edx-lint -coverage[toml]==7.3.2 +coverage[toml]==7.8.0 # via # -r requirements/test.txt - # coverage # pytest-cov -dill==0.3.7 +dill==0.4.0 # via pylint -docutils==0.20.1 +docutils==0.21.2 # via readme-renderer -edx-lint==5.3.6 +edx-lint==5.6.0 # via -r requirements/quality.in -exceptiongroup==1.1.3 - # via - # -r requirements/test.txt - # pytest -idna==3.4 +id==1.5.0 + # via twine +idna==3.10 # via requests -importlib-metadata==6.8.0 - # via - # keyring - # twine -importlib-resources==6.1.0 +importlib-metadata==8.7.0 # via keyring -iniconfig==2.0.0 +iniconfig==2.1.0 # via # -r requirements/test.txt # pytest -isort==5.12.0 +isort==6.0.1 # via # -r requirements/quality.in # pylint -jaraco-classes==3.3.0 +jaraco-classes==3.4.0 # via keyring -jinja2==3.1.2 +jaraco-context==6.0.1 + # via keyring +jaraco-functools==4.1.0 + # via keyring +jinja2==3.1.6 # via code-annotations -keyring==24.2.0 +keyring==25.6.0 # via twine markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==3.0.2 # via jinja2 mccabe==0.7.0 # via pylint mdurl==0.1.2 # via markdown-it-py -more-itertools==10.1.0 - # via jaraco-classes -nh3==0.2.14 +more-itertools==10.7.0 + # via + # jaraco-classes + # jaraco-functools +nh3==0.2.21 # via readme-renderer -packaging==23.2 +packaging==25.0 # via # -r requirements/test.txt # pytest -pbr==5.11.1 + # twine +pbr==6.1.1 # via stevedore -pkginfo==1.9.6 - # via twine -platformdirs==3.11.0 +platformdirs==4.3.7 # via pylint -pluggy==1.3.0 +pluggy==1.5.0 # via # -r requirements/test.txt # pytest -pycodestyle==2.11.1 +pycodestyle==2.13.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pygments==2.16.1 +pygments==2.19.1 # via # readme-renderer # rich -pylint==3.0.2 +pylint==3.3.7 # via # -r requirements/quality.in # edx-lint @@ -101,64 +101,54 @@ pylint==3.0.2 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via edx-lint pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pytest==7.4.2 +pytest==8.3.5 # via # -r requirements/test.txt # pytest-cov -pytest-cov==4.1.0 +pytest-cov==6.1.1 # via -r requirements/test.txt -python-slugify==8.0.1 +python-slugify==8.0.4 # via code-annotations -pyyaml==6.0.1 +pyyaml==6.0.2 # via code-annotations -readme-renderer==42.0 +readme-renderer==44.0 # via twine -requests==2.31.0 +requests==2.32.3 # via + # id # requests-toolbelt # twine requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine -rich==13.6.0 +rich==14.0.0 # via twine -six==1.16.0 - # via - # -r requirements/test.txt - # edx-lint +six==1.17.0 + # via edx-lint snowballstemmer==2.2.0 # via pydocstyle -stevedore==5.1.0 +stevedore==5.4.1 # via code-annotations text-unidecode==1.3 # via python-slugify -tomli==2.0.1 - # via - # -r requirements/test.txt - # coverage - # pylint - # pytest -tomlkit==0.12.1 +tomlkit==0.13.2 # via pylint -twine==4.0.2 +twine==6.1.0 # via -r requirements/quality.in -typing-extensions==4.8.0 - # via - # astroid - # pylint - # rich -urllib3==2.0.7 +urllib3==2.2.3 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # requests # twine -zipp==3.17.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.21.0 + # 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 217a236..bcd9284 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,30 +1,20 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -coverage[toml]==7.3.2 - # via - # coverage - # pytest-cov -exceptiongroup==1.1.3 +coverage[toml]==7.8.0 + # via pytest-cov +iniconfig==2.1.0 # via pytest -iniconfig==2.0.0 +packaging==25.0 # via pytest -packaging==23.2 +pluggy==1.5.0 # via pytest -pluggy==1.3.0 - # via pytest -pytest==7.4.2 +pytest==8.3.5 # via # -r requirements/test.in # pytest-cov -pytest-cov==4.1.0 +pytest-cov==6.1.1 # via -r requirements/test.in -six==1.16.0 - # via -r requirements/base.txt -tomli==2.0.1 - # via - # coverage - # pytest diff --git a/setup.py b/setup.py index 3bd843a..e29b4b4 100755 --- a/setup.py +++ b/setup.py @@ -3,12 +3,11 @@ Package metadata for codejail-includes. """ import os -import re import sys from setuptools import setup -VERSION = '1.0.0' +VERSION = '1.1.0' def load_requirements(*requirements_paths): @@ -64,7 +63,7 @@ def is_requirement(line): ], install_requires=load_requirements('requirements/base.in'), include_package_data=True, - python_requires=">=3.8", + python_requires=">=3.11", license="AGPL 3.0", zip_safe=False, keywords='Python edx', @@ -74,6 +73,7 @@ def is_requirement(line): '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/tests_eia.py b/tests_eia.py index 0531b88..5fee6b2 100644 --- a/tests_eia.py +++ b/tests_eia.py @@ -2,7 +2,7 @@ import unittest -from eia import * +from eia import iseia, E48, E96, E192 class Test_Eia(unittest.TestCase): diff --git a/tox.ini b/tox.ini index 2522208..b220667 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,quality +envlist = py311,py312,quality [testenv] allowlist_externals = diff --git a/verifiers/draganddrop.py b/verifiers/draganddrop.py index 484dad8..e9b1661 100644 --- a/verifiers/draganddrop.py +++ b/verifiers/draganddrop.py @@ -26,8 +26,6 @@ import json -import six -from six.moves import zip def flat_user_answer(user_answer): @@ -104,8 +102,8 @@ def __eq__(self, other): isinstance(other[0], (list, int, float))): return self.coordinate_positions_compare(other) - elif (isinstance(self[0], (six.text_type, str)) and - isinstance(other[0], (six.text_type, str))): + elif (isinstance(self[0], str) and + isinstance(other[0], str)): return ''.join(self) == ''.join(other) else: # improper argument types: no (float / int or lists of list #and float / int pair) or two string / unicode lists pair From 22238bfd3f15dc4565a2b7531d52711a689d9b92 Mon Sep 17 00:00:00 2001 From: Abubakar Khawaja Date: Wed, 14 May 2025 15:03:01 +0500 Subject: [PATCH 2/5] build: upgrade to Python 3.12 and bump version to 2.0.0 --- .github/workflows/pypi-publish.yml | 2 +- CHANGELOG.rst | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 42c80d8..ea81e83 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -15,7 +15,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 74d73b1..4c151a5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,7 @@ Unreleased * -[1.1.0] - 2023-10-04 +[2.0.0] - 2025-05-17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Changed diff --git a/setup.py b/setup.py index e29b4b4..e92e11a 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup -VERSION = '1.1.0' +VERSION = '2.0.0' def load_requirements(*requirements_paths): From 5fc6784fd6e8011b3aca96596efb4aa7aae0b193 Mon Sep 17 00:00:00 2001 From: Abubakar Khawaja Date: Wed, 4 Jun 2025 09:39:56 +0500 Subject: [PATCH 3/5] chore: remove old python version from ci coverage --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b883823..96574c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.12', '3.11'] - toxenv: ["py312", "py311", "quality"] + python-version: ['3.11', '3.12'] + toxenv: ["py311", "py312", "quality"] steps: - uses: actions/checkout@v4 - name: setup python @@ -36,7 +36,7 @@ jobs: run: tox - name: Run coverage - if: (matrix.python-version == '3.11' && matrix.toxenv == 'py311') || (matrix.python-version == '3.12' && matrix.toxenv == 'py312') + if: matrix.python-version == '3.12' && matrix.toxenv == 'py312' uses: codecov/codecov-action@v5 with: flags: unittests From 7ad54705753603598c023f8b2494c77f0faccdcf Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 4 Jun 2025 11:49:24 -0400 Subject: [PATCH 4/5] fix: Update ci.yml There were spacing related syntax errors that needed to be resolved. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96574c8..523b2bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.11', '3.12'] - toxenv: ["py311", "py312", "quality"] + python-version: ['3.11', '3.12'] + toxenv: ["py311", "py312", "quality"] steps: - uses: actions/checkout@v4 - name: setup python From 8052ce5a804c1337368c1747a2aa28f5892865c2 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 4 Jun 2025 12:13:30 -0400 Subject: [PATCH 5/5] fix: Run tests on the correct python versions. The tox env can't run if the underlying python version doesn't exist. --- .github/workflows/ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 523b2bf..8f2b901 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: matrix: os: [ubuntu-latest] python-version: ['3.11', '3.12'] - toxenv: ["py311", "py312", "quality"] + toxenv: ['default', 'quality'] steps: - uses: actions/checkout@v4 - name: setup python @@ -31,12 +31,18 @@ jobs: run: pip install -r requirements/ci.txt - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox + run: | + if [ "${{ matrix.toxenv }}" = "default" ]; then + PYVER=${{ matrix.python-version }} + TOXENV=py${PYVER//./} + else + TOXENV=${{ matrix.toxenv }} + fi + echo "Resolved TOXENV=$TOXENV" + TOXENV=$TOXENV tox - name: Run coverage - if: matrix.python-version == '3.12' && matrix.toxenv == 'py312' + if: matrix.python-version == '3.12' && matrix.toxenv == 'default' uses: codecov/codecov-action@v5 with: flags: unittests