Skip to content

chore: drop Python 3.11 support#38125

Open
feanil wants to merge 4 commits intomasterfrom
feanil/drop_python_3.11
Open

chore: drop Python 3.11 support#38125
feanil wants to merge 4 commits intomasterfrom
feanil/drop_python_3.11

Conversation

@feanil
Copy link
Contributor

@feanil feanil commented Mar 8, 2026

Summary

  • Drop Python 3.11 support: remove from CI test matrix, tox envlist, and package classifiers
  • Regenerate pinned requirements using Python 3.12

Context

Python 3.11 is being dropped across the Open edX ecosystem as part of the move
to standardize on Python 3.12. See the tracking issue for the full list of repos:
openedx/public-engineering#499

Test plan

  • CI passes with Python 3.12 only

feanil and others added 3 commits March 12, 2026 12:42
Remove Python 3.11 from all CI workflow matrices and update requires-python
to >=3.12 in pyproject.toml. Also remove ubuntu-22.04 compatibility include
entries from unit-tests.yml that were tied to Python 3.11 testing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pylint was upgraded from 3.x to 4.x by make upgrade, which now enforces
the 120-char line limit more strictly.

- cms/envs/devstack.py, production.py: split long lines in triple-quoted
  string literals (Markdown text, so Python newlines become spaces — no
  content change)
- test_containers.py: add pylint disable/enable around OLX assertion block
  where XML attribute strings cannot be split

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@feanil feanil force-pushed the feanil/drop_python_3.11 branch from 221ae18 to 620567e Compare March 12, 2026 16:50
Please see separately provided documentation.
\n - How to test: You must be logged in as course author for whatever course you want to test with.
You can use the [Swagger UI](https://{CMS_BASE}/authoring-api/ui/) to "Try out" the API with your test course. To do this, you must select the "Local" server.
You can use the [Swagger UI](https://{CMS_BASE}/authoring-api/ui/) to "Try out" the API
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for Reviews: Fix due to a newer version of pylint getting pulled in which is stricter about line lenght and better at detecting this violation.

setuptools 82+ removed pkg_resources, which pyfilesystem2 (fs) still
uses for namespace package declarations. The constraints.txt pin handles
this for full installs, but the static-assets-check workflow only installs
requirements/edx/assets.txt. Pre-installing pip-tools.txt ensures
setuptools 81.x is in place before the assets install runs.

See: PyFilesystem/pyfilesystem2#577

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@feanil feanil marked this pull request as ready for review March 13, 2026 13:48
@feanil feanil requested a review from kdmccormick as a code owner March 13, 2026 13:48
@feanil
Copy link
Contributor Author

feanil commented Mar 13, 2026

The two checks that are yellow are the old 3.11 required checks which we don't need because equivalent 3.12 checks are now running. I'll update the required checks list before merging this.

@feanil feanil requested a review from a team March 13, 2026 14:01
Copy link
Member

@Agrendalath Agrendalath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feanil, Python 3.11 is still used in the following places:

Comment on lines 52 to -71
# It's useful to run some subset of the tests on the older version of Ubuntu
# so that we don't spend too many resources on this but can find major issues quickly
# while we're in a situation where we support two versions. This section may be commented
# out when not in use to easily add/drop future support for any given major dependency.
#
# We're testing the older version of Ubuntu and running the xmodule tests since those rely on many
# dependent complex libraries and will hopefully catch most issues quickly.
include:
- shard_name: "xmodule-with-cms"
python-version: "3.11"
django-version: "pinned"
mongo-version: "7.0"
os-version: "ubuntu-22.04"
- shard_name: "xmodule-with-lms"
python-version: "3.11"
django-version: "pinned"
mongo-version: "7.0"
os-version: "ubuntu-22.04"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we comment it out instead of removing (like described in the comment)? Or should we remove the comment as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants