Repository navigation
chore: cherry-pick Python 3.12 upgrade (openedx/xqueue#982, #977) - #3
Merged
Merged
Conversation
naincy128
force-pushed
the
cherry-pick/python-312-upgrade
branch
3 times, most recently
from
October 1, 2026 06:44
5aff4c0 to
db3b8db
Compare
naincy128
force-pushed
the
cherry-pick/python-312-upgrade
branch
from
October 1, 2026 09:37
6b31f35 to
cee144e
Compare
rahulkanneri-2u
approved these changes
Oct 1, 2026
alenkadev
approved these changes
Oct 5, 2026
naincy128
force-pushed
the
cherry-pick/python-312-upgrade
branch
2 times, most recently
from
October 5, 2026 12:39
ecdd9af to
9577135
Compare
naincy128
force-pushed
the
cherry-pick/python-312-upgrade
branch
from
October 6, 2026 04:56
9577135 to
7ebcced
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades xqueue (
edx/xqueue) to Python 3.12 and Django 5.2, based on the upstream Open edX changes, with the fixes needed to keep CI, branch rules and production file storage working.1. Python 3.12 (upstream cherry-pick)
Cherry-picked from openedx/xqueue#982:
tox.ini,ci.ymlandmysql8-migrations-check.yml.make upgrade). Production moves from Django 4.2.23 to 5.2.17.requirements/common_constraints.txtsynced with the current shared edx-lint constraints.Makefile:make upgradeno longer strips the Django pin fromrequirements/test.txt. With only one Django version under test, tox no longer needs to control it.2. Django 5.2 storage settings
Django 5.1+ removed
DEFAULT_FILE_STORAGE/STATICFILES_STORAGEand silently ignores them. Without a fix, uploaded submission files would be saved to local disk instead of S3 on Django 5.2. Based on upstream openedx/xqueue#977:xqueue/settings.py: definesSTORAGESwith Django's default backends.xqueue/production.py: maps legacyDEFAULT_FILE_STORAGE/STATICFILES_STORAGEkeys from the deployment YAML intoSTORAGES, so no deployment config change is needed. The production config still setsXQUEUE_DEFAULT_FILE_STORAGE: S3Boto3Storage.DICT_UPDATE_KEYS = ('STORAGES',): a partialSTORAGESin the YAML is merged into the defaults rather than replacing them.3. CI
.github/docker-compose-ci.yml: the test container moves fromedxops/xqueue-dev:latest(Ubuntu 20.04, where Python 3.12 can't be installed) toubuntu:22.04. Tests still run inside the container, as on master..github/workflows/ci.yml:DEBIAN_FRONTEND=noninteractive, plus the packages a plain Ubuntu image needs (build-essential pkg-config default-libmysqlclient-dev git memcached)./tmp/venv/bin/tox, since tox is installed in that venv.py312-quality, so the quality job runs the real pep8 check instead of the tests.django42test env fromtox.iniand the CI matrix. Production pins Django 5.2, andtest.txtnow pins it too.4. Checks required by the
masterbranch rulesetThe "Main / Release" ruleset requires
commitlint / commitlint,testsandversion-check / version-check. Before this PR, xqueue reported only the first, so nothing could merge tomaster.ci.yml: new aggregatetestsjob (needs: build,if: always()). It passes only if everybuildmatrix job passed.if: always()makes it fail rather than be skipped when a build fails, because GitHub would treat a skipped required check as passing..github/workflows/lockfileversion-check.ymlreportsversion-check / version-check. It's the same check asopenedx/.githublockfileversion-check-v3.yml(package-lock.jsonmust uselockfileVersion: 3), but it passes when there is nopackage-lock.json. The shared workflow can't be used here because it fails when the file is missing.Testing
build (py312, django52, mysql80),build (py312, quality, mysql80),check migration for MySql8,commitlint,testsandversion-checkall pass.manage.py check: no issues;makemigrations --check: no changes. Migration 0005 had already movedindex_togethertoindexes.xqueue.productionwith three deployment YAML styles:DEFAULT_FILE_STORAGE: S3Boto3Storage→default_storageis S3;STORAGES→ S3;requirements.txtinstalls and imports on Python 3.11. Production runs 3.11 until the configuration change below is deployed.version-checkscript:lockfileVersion: 3→ pass;lockfileVersion: 2→ fail.Jira
Upstream references
STORAGESsetting