Skip to content

build: Pin setuptools & upgrade certifi, pip, and pip-tools [ulmo] - #4745

Merged
kdmccormick merged 5 commits into
release/ulmofrom
kdmccormick/certifi-ulmo
Oct 23, 2026
Merged

kdmccormick merged 5 commits into
release/ulmofrom
kdmccormick/certifi-ulmo

Conversation

@kdmccormick

@kdmccormick kdmccormick commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

This is both a security fix and a functional fix for the ulmo release.

Security: upgrades certifi from 2025.8.3 to 2026.10.19, pip from 24.2 to
26.2.2, and pip-tools from 7.5.0 to 7.6.2. certifi older than 2026.10.19
and pip older than 26.2.2 trust the compromised emSign intermediate CAs.
Also removes the pip<24.3 constraint from
requirements/common_constraints.txt, which was only needed until
pip-tools supported newer pip (pip-tools 7.6.2 does).

Functional: pins setuptools below 82 so course-discovery can start.
django-choices imports pkg_resources at runtime, and setuptools 82.0.0
removed it. setuptools wasn't pinned in the compiled requirements, so a
fresh ulmo environment got the latest setuptools and failed with No module named 'pkg_resources'. This adds a setuptools<82 constraint
and compiles base, test, local and production requirements with
--allow-unsafe, so setuptools is pinned at 80.9.0.

Also includes two CI fixes needed for checks to pass on this branch:

  • Use the pre-built edxops/discovery-dev image for CI instead of
    building the Dockerfile, which is based on ubuntu:focal and can no
    longer install Python 3.12 from the deadsnakes PPA. This backports
    only the .ci/docker-compose-ci.yml part of e519c28 (fix: use pre-built image instead of building from Dockerfile #4697).
  • Install requirements/pip.txt before the migrations check, so
    setuptools stays at its pinned version.

Requirements changes were generated with make upgrade limited to
--upgrade-package for certifi, pip, pip-tools and setuptools.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

Upgrades certifi from 2025.8.3 to 2026.10.19 and pip-tools from 7.5.0 to
7.6.2. certifi older than 2026.10.19 trusts the compromised emSign
intermediate CAs. Generated with `make upgrade` limited to
--upgrade-package for those packages.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Removes the `pip<24.3` constraint from requirements/common_constraints.txt,
which was only needed until pip-tools supported newer pip (pip-tools
7.6.2 does), and upgrades pip from 24.2 to 26.2.2. pip older than 26.2.2
trusts the compromised emSign intermediate CAs. Generated with `make
upgrade` limited to --upgrade-package for pip and pip-tools.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@kdmccormick kdmccormick changed the title build: Upgrade certifi and pip-tools [ulmo] build: Upgrade certifi, pip, and pip-tools [ulmo] Oct 23, 2026
kdmccormick and others added 3 commits October 23, 2026 11:53
The ulmo Dockerfile is based on ubuntu:focal and installs Python 3.12
from the deadsnakes PPA, which no longer publishes for focal, so the CI
image build failed (`Unable to locate package python3.12-dev`). Use the
pre-built edxops/discovery-dev image for CI, as verawood does. The CI
scripts still run `make requirements` inside the container, so tests use
this branch's own requirements.

This backports only the .ci/docker-compose-ci.yml part of e519c28
(#4697) and leaves the Dockerfile in place.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The migrations check installed requirements/local.txt directly, which
doesn't pin setuptools, so it got the latest setuptools (84.2.1). That
release no longer ships pkg_resources, which django-choices imports, so
the check failed with `No module named 'pkg_resources'`. Install
requirements/pip.txt first so setuptools stays at its pinned 80.9.0.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
django-choices imports pkg_resources at runtime, and setuptools 82.0.0
removed pkg_resources. setuptools wasn't pinned in the compiled
requirements, so any fresh environment got the latest setuptools and
course-discovery failed on startup with `No module named
'pkg_resources'`.

Adds a `setuptools<82` constraint and compiles base, test, local and
production requirements with --allow-unsafe, so setuptools is pinned
(at 80.9.0, the version already in requirements/pip.txt). Generated with
`make upgrade` limited to --upgrade-package setuptools==80.9.0.

Part of: openedx/public-engineering#574
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .ci/docker-compose-ci.yml
Comment on lines +32 to +36
# build:
# context: ../.
# target: dev
# args:
# PYTHON_VERSION: "${PYTHON_VERSION}"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
# build:
# context: ../.
# target: dev
# args:
# PYTHON_VERSION: "${PYTHON_VERSION}"

no need to leave commented-out CI code behind

@kdmccormick
kdmccormick marked this pull request as ready for review October 23, 2026 16:25
@kdmccormick
kdmccormick merged commit ee22700 into release/ulmo Oct 23, 2026
11 checks passed
@kdmccormick
kdmccormick deleted the kdmccormick/certifi-ulmo branch October 23, 2026 16:26
@kdmccormick kdmccormick changed the title build: Upgrade certifi, pip, and pip-tools [ulmo] build: Pin setuptools & upgrade certifi, pip, and pip-tools [ulmo] Oct 23, 2026
@kdmccormick

kdmccormick commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Oops, I meant to enable Auto-Merge, but I actually just merged.

@kdmccormick

Copy link
Copy Markdown
Member Author

@farhaanbukhsh could you retroactively review this one, and let me know if you have any concerns that should be addressed?

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.

1 participant