From 4b19a5adc8d0ec7f37531ccc731ba4e4ae1a7292 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 6 Mar 2026 14:02:05 -0500 Subject: [PATCH 1/7] chore: drop Python 3.11 support Remove Python 3.11 from the CI matrix, tox envlist, setup.py classifiers, and Dockerfile. Update python_requires to >=3.12. Python 3.12 remains. Part of the Open edX initiative to drop Python 3.11 support: https://github.com/openedx/public-engineering/issues/499 Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 2 +- Dockerfile | 2 +- setup.py | 3 +-- tox.ini | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00e429a..0a6ea1d 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'] + python-version: ['3.12'] toxenv: [ formatting,quality,django42,django52 ] steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index 010a787..2d37a7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.10-alpine3.20 +FROM python:3.12-alpine3.20 WORKDIR /app diff --git a/setup.py b/setup.py index afcbceb..01aefab 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n setup( - python_requires=">=3.11", + python_requires=">=3.12", classifiers=[ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", @@ -130,7 +130,6 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Utilities", ], diff --git a/tox.ini b/tox.ini index 0b9d5ec..51c3601 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{311,312}-django{42,52}, quality, formatting +envlist = py{312}-django{42,52}, quality, formatting [pytest] DJANGO_SETTINGS_MODULE = test_settings From 3f33e2f708db11abca28ecbffd0157bcfbe9080f Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 6 Mar 2026 14:03:16 -0500 Subject: [PATCH 2/7] chore: upgrade Python requirements for Python 3.12 Regenerate all pinned requirements files using Python 3.12. Co-Authored-By: Claude Sonnet 4.6 --- requirements/base.txt | 26 +++--- requirements/ci.txt | 82 +++++++++-------- requirements/common_constraints.txt | 13 +-- requirements/dev.txt | 133 +++++++++++++++------------- requirements/pip-tools.txt | 16 ++-- requirements/pip.txt | 14 +-- requirements/quality.txt | 60 +++++++------ requirements/test.txt | 41 +++++---- 8 files changed, 202 insertions(+), 183 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 438d603..a29a6f5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,32 +1,30 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -asgiref==3.8.1 +asgiref==3.11.1 # via django -attrs==25.3.0 +attrs==25.4.0 # via -r requirements/base.in -certifi==2025.4.26 +certifi==2026.2.25 # via requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.5 # via requests -django==4.2.20 +django==5.2.12 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -idna==3.10 +idna==3.11 # via requests -lxml==5.4.0 +lxml==6.0.2 # via -r requirements/base.in -requests==2.32.3 +requests==2.32.5 # via -r requirements/base.in -sqlparse==0.5.3 +sqlparse==0.5.5 # via django -urllib3==2.2.3 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # requests +urllib3==2.6.3 + # via requests youtube-dl==2021.12.17 # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index ea3c316..36acf40 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,61 +1,60 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -asgiref==3.8.1 +asgiref==3.11.1 # via # -r requirements/quality.txt # django -attrs==25.3.0 +attrs==25.4.0 # via -r requirements/quality.txt -black==25.1.0 +black==26.3.0 # via -r requirements/quality.txt -cachetools==5.5.2 +cachetools==7.0.3 # via tox -certifi==2025.4.26 +certifi==2026.2.25 # via # -r requirements/quality.txt # requests -chardet==5.2.0 - # via tox -charset-normalizer==3.4.2 +charset-normalizer==3.4.5 # via # -r requirements/quality.txt # requests -click==8.1.8 +click==8.3.1 # via # -r requirements/quality.txt # black colorama==0.4.6 # via tox -coverage[toml]==7.8.0 +coverage[toml]==7.13.4 # via # -r requirements/ci.in # -r requirements/quality.txt # pytest-cov -distlib==0.3.9 +distlib==0.4.0 # via virtualenv -django==4.2.20 +django==5.2.12 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt -filelock==3.18.0 +filelock==3.25.0 # via + # python-discovery # tox # virtualenv -flake8==7.2.0 +flake8==7.3.0 # via -r requirements/quality.txt -idna==3.10 +idna==3.11 # via # -r requirements/quality.txt # requests -iniconfig==2.1.0 +iniconfig==2.3.0 # via # -r requirements/quality.txt # pytest -lxml==5.4.0 +lxml==6.0.2 # via -r requirements/quality.txt mccabe==0.7.0 # via @@ -65,64 +64,77 @@ mypy-extensions==1.1.0 # via # -r requirements/quality.txt # black -packaging==25.0 +packaging==26.0 # via # -r requirements/quality.txt # black # pyproject-api # pytest # tox -pathspec==0.12.1 +pathspec==1.0.4 # via # -r requirements/quality.txt # black -platformdirs==4.3.7 +platformdirs==4.9.4 # via # -r requirements/quality.txt # black + # python-discovery # tox # virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via # -r requirements/quality.txt # pytest + # pytest-cov # tox -pycodestyle==2.13.0 +pycodestyle==2.14.0 # via # -r requirements/quality.txt # flake8 -pyflakes==3.3.2 +pyflakes==3.4.0 # via # -r requirements/quality.txt # flake8 -pyproject-api==1.9.0 +pygments==2.19.2 + # via + # -r requirements/quality.txt + # pytest +pyproject-api==1.10.0 # via tox -pytest==8.3.5 +pytest==9.0.2 # via # -r requirements/quality.txt # pytest-cov # pytest-django # pytest-mock -pytest-cov==6.1.1 +pytest-cov==7.0.0 # via -r requirements/quality.txt -pytest-django==4.11.1 +pytest-django==4.12.0 # via -r requirements/quality.txt -pytest-mock==3.14.0 +pytest-mock==3.15.1 # via -r requirements/quality.txt -requests==2.32.3 +python-discovery==1.1.0 + # via virtualenv +pytokens==0.4.1 + # via + # -r requirements/quality.txt + # black +requests==2.32.5 # via -r requirements/quality.txt -sqlparse==0.5.3 +sqlparse==0.5.5 # via # -r requirements/quality.txt # django -tox==4.25.0 +tomli-w==1.2.0 + # via tox +tox==4.48.1 # via -r requirements/ci.in -urllib3==2.2.3 +urllib3==2.6.3 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # requests -virtualenv==20.31.1 +virtualenv==21.1.0 # via tox xmlformatter==0.2.8 # via -r requirements/quality.txt diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 1511019..72cc4cc 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -12,20 +12,9 @@ # this file from Github directly. It does not require packaging in edx-lint. # using LTS django version -Django<5.0 +Django<6.0 # elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. # elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html # See https://github.com/openedx/edx-platform/issues/35126 for more info elasticsearch<7.14.0 - -# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected -django-simple-history==3.0.0 - -# Cause: https://github.com/openedx/edx-lint/issues/458 -# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved. -pip<24.3 - -# Cause: https://github.com/openedx/edx-lint/issues/475 -# This can be unpinned once https://github.com/openedx/edx-lint/issues/476 has been resolved. -urllib3<2.3.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 89a1ad8..897ee45 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,51 +1,45 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -asgiref==3.8.1 +asgiref==3.11.1 # via # -r requirements/ci.txt # -r requirements/quality.txt # django -attrs==25.3.0 +attrs==25.4.0 # via # -r requirements/ci.txt # -r requirements/quality.txt -backports-tarfile==1.2.0 - # via jaraco-context -black==25.1.0 +black==26.3.0 # via # -r requirements/ci.txt # -r requirements/quality.txt -build==1.2.2.post1 +build==1.4.0 # via # -r requirements/pip-tools.txt # pip-tools bump2version==1.0.1 # via -r requirements/dev.in -cachetools==5.5.2 +cachetools==7.0.3 # via # -r requirements/ci.txt # tox -certifi==2025.4.26 +certifi==2026.2.25 # via # -r requirements/ci.txt # -r requirements/quality.txt # requests -cffi==1.17.1 +cffi==2.0.0 # via cryptography -chardet==5.2.0 - # via - # -r requirements/ci.txt - # tox -charset-normalizer==3.4.2 +charset-normalizer==3.4.5 # via # -r requirements/ci.txt # -r requirements/quality.txt # requests -click==8.1.8 +click==8.3.1 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -56,64 +50,63 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.8.0 +coverage[toml]==7.13.4 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest-cov -cryptography==44.0.3 +cryptography==46.0.5 # via secretstorage -distlib==0.3.9 +distlib==0.4.0 # via # -r requirements/ci.txt # virtualenv -django==4.2.20 +django==5.2.12 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.txt # -r requirements/quality.txt -docutils==0.21.2 +docutils==0.22.4 # via readme-renderer -filelock==3.18.0 +filelock==3.25.0 # via # -r requirements/ci.txt + # python-discovery # tox # virtualenv -flake8==7.2.0 +flake8==7.3.0 # via # -r requirements/ci.txt # -r requirements/quality.txt -id==1.5.0 +id==1.6.1 # via twine -idna==3.10 +idna==3.11 # via # -r requirements/ci.txt # -r requirements/quality.txt # requests -importlib-metadata==8.7.0 - # via keyring -iniconfig==2.1.0 +iniconfig==2.3.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest jaraco-classes==3.4.0 # via keyring -jaraco-context==6.0.1 +jaraco-context==6.1.0 # via keyring -jaraco-functools==4.1.0 +jaraco-functools==4.4.0 # via keyring jeepney==0.9.0 # via # keyring # secretstorage -keyring==25.6.0 +keyring==25.7.0 # via twine -lxml==5.4.0 +lxml==6.0.2 # via # -r requirements/ci.txt # -r requirements/quality.txt -markdown-it-py==3.0.0 +markdown-it-py==4.0.0 # via rich mccabe==0.7.0 # via @@ -122,7 +115,7 @@ mccabe==0.7.0 # flake8 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.7.0 +more-itertools==10.8.0 # via # jaraco-classes # jaraco-functools @@ -131,9 +124,9 @@ mypy-extensions==1.1.0 # -r requirements/ci.txt # -r requirements/quality.txt # black -nh3==0.2.21 +nh3==0.3.3 # via readme-renderer -packaging==25.0 +packaging==26.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -144,43 +137,49 @@ packaging==25.0 # pytest # tox # twine -pathspec==0.12.1 + # wheel +pathspec==1.0.4 # via # -r requirements/ci.txt # -r requirements/quality.txt # black -pip-tools==7.4.1 +pip-tools==7.5.3 # via -r requirements/pip-tools.txt -platformdirs==4.3.7 +platformdirs==4.9.4 # via # -r requirements/ci.txt # -r requirements/quality.txt # black + # python-discovery # tox # virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest + # pytest-cov # tox -pycodestyle==2.13.0 +pycodestyle==2.14.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # flake8 -pycparser==2.22 +pycparser==3.0 # via cffi -pyflakes==3.3.2 +pyflakes==3.4.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # flake8 -pygments==2.19.1 +pygments==2.19.2 # via + # -r requirements/ci.txt + # -r requirements/quality.txt + # pytest # readme-renderer # rich -pyproject-api==1.9.0 +pyproject-api==1.10.0 # via # -r requirements/ci.txt # tox @@ -189,63 +188,75 @@ pyproject-hooks==1.2.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.3.5 +pytest==9.0.2 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest-cov # pytest-django # pytest-mock -pytest-cov==6.1.1 +pytest-cov==7.0.0 # via # -r requirements/ci.txt # -r requirements/quality.txt -pytest-django==4.11.1 +pytest-django==4.12.0 # via # -r requirements/ci.txt # -r requirements/quality.txt -pytest-mock==3.14.0 +pytest-mock==3.15.1 # via # -r requirements/ci.txt # -r requirements/quality.txt +python-discovery==1.1.0 + # via + # -r requirements/ci.txt + # virtualenv +pytokens==0.4.1 + # via + # -r requirements/ci.txt + # -r requirements/quality.txt + # black readme-renderer==44.0 # via twine -requests==2.32.3 +requests==2.32.5 # via # -r requirements/ci.txt # -r requirements/quality.txt - # id # requests-toolbelt # twine requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine -rich==14.0.0 +rich==14.3.3 # via twine -secretstorage==3.3.3 +secretstorage==3.5.0 # via keyring -sqlparse==0.5.3 +sqlparse==0.5.5 # via # -r requirements/ci.txt # -r requirements/quality.txt # django -tox==4.25.0 +tomli-w==1.2.0 + # via + # -r requirements/ci.txt + # tox +tox==4.48.1 # via -r requirements/ci.txt -twine==6.1.0 +twine==6.2.0 # via -r requirements/dev.in -urllib3==2.2.3 +urllib3==2.6.3 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.txt # -r requirements/quality.txt + # id # requests # twine -virtualenv==20.31.1 +virtualenv==21.1.0 # via # -r requirements/ci.txt # tox -wheel==0.45.1 +wheel==0.46.3 # via # -r requirements/dev.in # -r requirements/pip-tools.txt @@ -258,8 +269,6 @@ youtube-dl==2021.12.17 # via # -r requirements/ci.txt # -r requirements/quality.txt -zipp==3.21.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 1dd71b5..d89516b 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,22 +1,24 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -build==1.2.2.post1 +build==1.4.0 # via pip-tools -click==8.1.8 +click==8.3.1 # via pip-tools -packaging==25.0 - # via build -pip-tools==7.4.1 +packaging==26.0 + # via + # build + # wheel +pip-tools==7.5.3 # via -r requirements/pip-tools.in pyproject-hooks==1.2.0 # via # build # pip-tools -wheel==0.45.1 +wheel==0.46.3 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index a124796..084d708 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,16 +1,16 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -wheel==0.45.1 +packaging==26.0 + # via wheel +wheel==0.46.3 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -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 +pip==26.0.1 + # via -r requirements/pip.in +setuptools==82.0.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index e8a11fa..f51d9de 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,89 +1,95 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -asgiref==3.8.1 +asgiref==3.11.1 # via # -r requirements/test.txt # django -attrs==25.3.0 +attrs==25.4.0 # via -r requirements/test.txt -black==25.1.0 +black==26.3.0 # via -r requirements/quality.in -certifi==2025.4.26 +certifi==2026.2.25 # via # -r requirements/test.txt # requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.5 # via # -r requirements/test.txt # requests -click==8.1.8 +click==8.3.1 # via black -coverage[toml]==7.8.0 +coverage[toml]==7.13.4 # via # -r requirements/test.txt # pytest-cov -django==4.2.20 +django==5.2.12 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt -flake8==7.2.0 +flake8==7.3.0 # via -r requirements/quality.in -idna==3.10 +idna==3.11 # via # -r requirements/test.txt # requests -iniconfig==2.1.0 +iniconfig==2.3.0 # via # -r requirements/test.txt # pytest -lxml==5.4.0 +lxml==6.0.2 # via -r requirements/test.txt mccabe==0.7.0 # via flake8 mypy-extensions==1.1.0 # via black -packaging==25.0 +packaging==26.0 # via # -r requirements/test.txt # black # pytest -pathspec==0.12.1 +pathspec==1.0.4 # via black -platformdirs==4.3.7 +platformdirs==4.9.4 # via black -pluggy==1.5.0 +pluggy==1.6.0 # via # -r requirements/test.txt # pytest -pycodestyle==2.13.0 + # pytest-cov +pycodestyle==2.14.0 # via flake8 -pyflakes==3.3.2 +pyflakes==3.4.0 # via flake8 -pytest==8.3.5 +pygments==2.19.2 + # via + # -r requirements/test.txt + # pytest +pytest==9.0.2 # via # -r requirements/test.txt # pytest-cov # pytest-django # pytest-mock -pytest-cov==6.1.1 +pytest-cov==7.0.0 # via -r requirements/test.txt -pytest-django==4.11.1 +pytest-django==4.12.0 # via -r requirements/test.txt -pytest-mock==3.14.0 +pytest-mock==3.15.1 # via -r requirements/test.txt -requests==2.32.3 +pytokens==0.4.1 + # via black +requests==2.32.5 # via -r requirements/test.txt -sqlparse==0.5.3 +sqlparse==0.5.5 # via # -r requirements/test.txt # django -urllib3==2.2.3 +urllib3==2.6.3 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt # requests xmlformatter==0.2.8 diff --git a/requirements/test.txt b/requirements/test.txt index 4e8503d..68d8de5 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,63 +1,66 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -asgiref==3.8.1 +asgiref==3.11.1 # via # -r requirements/base.txt # django -attrs==25.3.0 +attrs==25.4.0 # via -r requirements/base.txt -certifi==2025.4.26 +certifi==2026.2.25 # via # -r requirements/base.txt # requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.5 # via # -r requirements/base.txt # requests -coverage[toml]==7.8.0 +coverage[toml]==7.13.4 # via # -r requirements/test.in # pytest-cov # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt -idna==3.10 +idna==3.11 # via # -r requirements/base.txt # requests -iniconfig==2.1.0 +iniconfig==2.3.0 # via pytest -lxml==5.4.0 +lxml==6.0.2 # via -r requirements/base.txt -packaging==25.0 +packaging==26.0 # via pytest -pluggy==1.5.0 +pluggy==1.6.0 + # via + # pytest + # pytest-cov +pygments==2.19.2 # via pytest -pytest==8.3.5 +pytest==9.0.2 # via # -r requirements/test.in # pytest-cov # pytest-django # pytest-mock -pytest-cov==6.1.1 +pytest-cov==7.0.0 # via -r requirements/test.in -pytest-django==4.11.1 +pytest-django==4.12.0 # via -r requirements/test.in -pytest-mock==3.14.0 +pytest-mock==3.15.1 # via -r requirements/test.in -requests==2.32.3 +requests==2.32.5 # via -r requirements/base.txt -sqlparse==0.5.3 +sqlparse==0.5.5 # via # -r requirements/base.txt # django -urllib3==2.2.3 +urllib3==2.6.3 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # requests xmlformatter==0.2.8 From 414fb52a30f9ecb2ac88b60ab117951c5b5b32c8 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 6 Mar 2026 14:10:04 -0500 Subject: [PATCH 3/7] chore: bump version to 1.0.0 Co-Authored-By: Claude Sonnet 4.6 --- src/cc2olx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc2olx/__init__.py b/src/cc2olx/__init__.py index 493f741..5becc17 100644 --- a/src/cc2olx/__init__.py +++ b/src/cc2olx/__init__.py @@ -1 +1 @@ -__version__ = "0.3.0" +__version__ = "1.0.0" From 27b4042d7043fb8f80be1af0b6ff93858930f1a3 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 11 Mar 2026 09:55:06 -0400 Subject: [PATCH 4/7] fix: normalize lxml 6 to

in QTI problem descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lxml.html.fromstring() wraps bare text (no surrounding HTML tags) in a block element. In lxml < 6 this produced

; lxml 6 changed it to . See the lxml changelog: https://github.com/lxml/lxml/blob/master/CHANGES.txt is an inline element. OLX problem descriptions placed directly inside CAPA response elements (e.g. , ) are rendered by Open edX's CAPA engine generically — all child XML elements are passed through to HTML output without special-casing by tag name (see xblocks-contrib responsetypes.py render_html). Using an inline element results in question text rendered without block-level spacing, which is visually incorrect. Normalize any lxml-produced wrapper to

so descriptions are always block-level, matching the OLX convention and the platform's expected presentation: https://docs.openedx.org/en/latest/educators/navigation/olx.html Co-Authored-By: Claude Sonnet 4.6 --- src/cc2olx/content_processors/qti.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/cc2olx/content_processors/qti.py b/src/cc2olx/content_processors/qti.py index 4fe8013..9fc63a9 100644 --- a/src/cc2olx/content_processors/qti.py +++ b/src/cc2olx/content_processors/qti.py @@ -457,6 +457,21 @@ def _create_problem_description(description_html_str: str) -> xml.dom.minidom.El description_html_str = urllib.parse.unquote(description_html_str) element = html.fromstring(description_html_str) + # lxml.html.fromstring wraps bare text (no surrounding HTML tags) in a + # block element. In lxml < 6 this was

; lxml 6 changed it to . + # See: https://github.com/lxml/lxml/blob/master/CHANGES.txt + # + # is an inline element. Problem descriptions inside OLX response + # elements (e.g. , ) are rendered + # by Open edX's CAPA renderer generically — all child elements are passed + # through to HTML. Using an inline element results in question text with + # no block-level spacing, which is visually incorrect. + # + # Normalize to

so descriptions are always block-level, matching the + # OLX convention and the platform's expected presentation. + # Ref: https://docs.openedx.org/en/latest/educators/navigation/olx.html + if element.tag == "span": + element.tag = "p" xml_string = etree.tostring(element) return xml.dom.minidom.parseString(xml_string).firstChild From 7fb8c253cf74566b1259f61d2572289c67726973 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 11 Mar 2026 09:56:06 -0400 Subject: [PATCH 5/7] feat!: drop Django 4.2 support Django 4.2 reached end-of-life in April 2024. Remove the django42 tox env and classifier. Also update the coverage upload condition from django42 to django52 so coverage continues to be reported. BREAKING CHANGE: Django 4.2 is no longer supported. Requires Django 5.2+. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 4 ++-- setup.py | 1 - tox.ini | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a6ea1d..2672f17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: os: - ubuntu-latest python-version: ['3.12'] - toxenv: [ formatting,quality,django42,django52 ] + toxenv: [ formatting,quality,django52 ] steps: - uses: actions/checkout@v4 - name: setup python @@ -36,7 +36,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.toxenv=='django42' + if: matrix.toxenv=='django52' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/setup.py b/setup.py index 01aefab..c7dd812 100644 --- a/setup.py +++ b/setup.py @@ -122,7 +122,6 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "Framework :: Django", - "Framework :: Django :: 4.2", "Framework :: Django :: 5.2", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: Unix", diff --git a/tox.ini b/tox.ini index 51c3601..764c1a2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{312}-django{42,52}, quality, formatting +envlist = py{312}-django{52}, quality, formatting [pytest] DJANGO_SETTINGS_MODULE = test_settings @@ -19,7 +19,6 @@ commands = black --check --diff --line-length 120 src tests setup.py setenv = PYTHONPATH = {toxinidir} deps = - django42: Django>=4.2,<4.3 django52: Django>=5.2,<5.3 -r{toxinidir}/requirements/test.txt commands = From ced4326d3d53aad38f3bfb4fa69db96123e71f15 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 11 Mar 2026 12:23:05 -0400 Subject: [PATCH 6/7] style: apply black 26.3.0 formatting black upgraded from an older version via make upgrade. Three files needed reformatting to satisfy the updated style rules. Co-Authored-By: Claude Sonnet 4.6 --- src/cc2olx/external/canvas/__init__.py | 1 - src/cc2olx/models.py | 6 ++---- src/cc2olx/xml/cc_xml.py | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cc2olx/external/canvas/__init__.py b/src/cc2olx/external/canvas/__init__.py index 75afb14..4a79266 100644 --- a/src/cc2olx/external/canvas/__init__.py +++ b/src/cc2olx/external/canvas/__init__.py @@ -1,6 +1,5 @@ from .module_meta import ModuleMeta - __all__ = [ "ModuleMeta", ] diff --git a/src/cc2olx/models.py b/src/cc2olx/models.py index ee7a0b0..befb579 100644 --- a/src/cc2olx/models.py +++ b/src/cc2olx/models.py @@ -375,15 +375,13 @@ def get_course_xml(self): def get_run_xml(self): text = ( - dedent( - """\ + dedent("""\ \ - """ - ) + """) .format( title=self.get_title(), language=self.get_language(), diff --git a/src/cc2olx/xml/cc_xml.py b/src/cc2olx/xml/cc_xml.py index b182790..328239c 100644 --- a/src/cc2olx/xml/cc_xml.py +++ b/src/cc2olx/xml/cc_xml.py @@ -3,7 +3,6 @@ from lxml import etree - QTI_NAMESPACE = "http://www.imsglobal.org/xsd/ims_qtiasiv1p2" From ba570bc246ee948d2ed3a65433621ff303c5cedd Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 7 Apr 2026 11:51:48 -0400 Subject: [PATCH 7/7] docs: Update src/cc2olx/__init__.py Co-authored-by: Kyle McCormick --- src/cc2olx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc2olx/__init__.py b/src/cc2olx/__init__.py index 5becc17..6a9beea 100644 --- a/src/cc2olx/__init__.py +++ b/src/cc2olx/__init__.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "0.4.0"