Skip to content

feat: add Python 3.12 support and drop Python 3.8 - #1

Open
hiteshkava wants to merge 3 commits into
masterfrom
kavahd/python-3-12-support
Open

hiteshkava wants to merge 3 commits into
masterfrom
kavahd/python-3-12-support

Conversation

@hiteshkava

@hiteshkava hiteshkava commented Oct 6, 2026 •

Copy link
Copy Markdown

Description

Cherry-picked from openedx/xqueue-watcher#120 ("chore: drop Python 3.11 support"), following the same pattern used for the xqueue Python 3.12 upgrade (edx/xqueue#3). Our fork was sitting exactly at the state right before upstream openedx#120 (CI matrix ['3.11', '3.12'], common_constraints.txt matching pre-openedx#120 exactly), so the cherry-pick applied cleanly.

Changes

File Change Why
.github/workflows/ci.yml python-version: ['3.11', '3.12'] → ['3.12'] Drop Python 3.11, test only 3.12
requirements/common_constraints.txt Django<5.0 → Django<6.0; removed pip<24.3 and urllib3<2.3.0 pins Both upstream edx-lint issues these pins referenced are resolved; matches openedx#120
requirements/*.txt (base, ci, pip, pip_tools, production, test) Fully regenerated with Python 3.12 (make upgrade) Per the documented org-wide process
setup.py version='0.4' → '1.0.0' Dropping Python support is a breaking change (matches upstream's major version bump)

Out of scope

The repo's own Dockerfile (still Ubuntu 16.04 Xenial + Python 2) is untouched — production deploys via the AMI/Ansible xqwatcher GoCD pipeline, not Docker, and this Dockerfile appears unused.

Testing

  • pytest: 24/25 pass. The one failure (test_jailed_grader.py::test_correct) is a pre-existing environment gap (codejail/apparmor sandbox not configured in this dev container) — reproduced identically on Python 3.11 with the original, pre-upgrade requirements, confirming it's not a Python 3.12 regression.
  • All core modules (client, grader, jailedgrader, manager, settings) import cleanly under Python 3.12.3, and the CLI entrypoint (python -m xqueue_watcher -d <config_root>) starts up without error.
  • Checked jailedgrader.py's use of SourceFileLoader.load_module() — triggers a DeprecationWarning under 3.12 but still functions; not a current blocker, worth a follow-up to migrate to exec_module().

Related

  • Companion configuration role update: feat: upgrade xqwatcher to Python 3.12 configuration#387 — adds the Jammy/Python 3.12 install task this role was previously missing entirely
  • Companion edx-internal AMI pipeline bump: https://github.com/edx/edx-internal/pull/14969 — gocd/manually-created-pipelines/xqwatcher.yaml Ubuntu 20.04 → 22.04, plus the per-course PYTHON_EXECUTABLE/numpy pin updates
  • Open question, not resolved by this PR: two per-course grader sandboxes (MITx-7.QBWx, MITx-6.00x) still need their own verification against MIT's private grader repos — see edx-internal#14969 for the numpy/Python-version details on that

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