Skip to content

chore: drop Python 3.11 support - #38125

Merged
feanil merged 5 commits into
masterfrom
feanil/drop_python_3.11
Mar 17, 2026
Merged

feanil merged 5 commits into
masterfrom
feanil/drop_python_3.11

Conversation

@feanil

@feanil feanil commented Mar 8, 2026 •

Copy link
Copy Markdown
Contributor

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
feanil force-pushed the feanil/drop_python_3.11 branch 2 times, most recently from 221ae18 to 620567e Compare March 12, 2026 16:50
Comment thread cms/envs/devstack.py
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
Copy Markdown
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.

@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

feanil commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

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

@Agrendalath Agrendalath left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch, I'll add this back. We'll want it for future upgrades.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@feanil, tiny nit - you have restored this code between the comment lines (instead of adding it below them).

feanil and others added 4 commits March 16, 2026 13:50
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@feanil
feanil force-pushed the feanil/drop_python_3.11 branch from 4c07b49 to 81bbeaa Compare March 16, 2026 17:58
@feanil
feanil requested a review from Agrendalath March 16, 2026 17:58
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

@feanil, tiny nit - you have restored this code between the comment lines (instead of adding it below them).

And add back and comment the old 3.11 tests for when we drop future
major dependencies.
@feanil
feanil force-pushed the feanil/drop_python_3.11 branch from 81bbeaa to ba8b7e4 Compare March 17, 2026 00:45

@sameeramin sameeramin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍🏼

@feanil
feanil merged commit 875a38b into master Mar 17, 2026
50 checks passed
@feanil
feanil deleted the feanil/drop_python_3.11 branch March 17, 2026 14:38
@feanil feanil linked an issue Mar 17, 2026 that may be closed by this pull request
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.

[DEPR]: Python 3.11 Support

3 participants