Skip to content

fix: pinning setup tools to avoid pkg_resources removal issue#199

Merged
kiram15 merged 6 commits intomainfrom
kiram15/docker
Feb 25, 2026
Merged

fix: pinning setup tools to avoid pkg_resources removal issue#199
kiram15 merged 6 commits intomainfrom
kiram15/docker

Conversation

@kiram15
Copy link
Contributor

@kiram15 kiram15 commented Feb 19, 2026

setuptools v82.0.0 removed pkg_resources, causing ModuleNotFoundError in dependencies like djchoices. See recent docker build failures here. This PR pins the setup tools version in order to push out our enterprise Docker images.

Copilot AI review requested due to automatic review settings February 19, 2026 03:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a critical issue where setuptools v82.0.0 removed the pkg_resources module, causing ModuleNotFoundError in dependencies like djchoices. The fix pins setuptools to versions below 82.0.0 across multiple Docker images to prevent build failures.

Changes:

  • Added setuptools version constraint "setuptools<82.0.0" before installing requirements in multiple Dockerfiles
  • Applied consistently across both production and development stages where applicable
  • Includes explanatory comments for each pin

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dockerfiles/xqueue.Dockerfile Added setuptools pin in dev and production stages before requirements installation
dockerfiles/portal-designer.Dockerfile Added setuptools pin in app and devstack stages before requirements installation
dockerfiles/edx-platform.Dockerfile Added setuptools pin in builder-production and builder-development stages before requirements installation
dockerfiles/edx-notes-api.Dockerfile Added setuptools pin before requirements installation
dockerfiles/edx-exams.Dockerfile Added setuptools pin in app and devstack stages before requirements installation
dockerfiles/ecommerce.Dockerfile Added setuptools pin in prod and dev stages before requirements installation
dockerfiles/course-discovery.Dockerfile Added setuptools pin in prod and dev stages before requirements installation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 19, 2026 04:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 23, 2026 07:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@pwnage101 pwnage101 left a comment

Choose a reason for hiding this comment

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

We should take this opportunity to clean up where venv and pip come from. In summary we SHOULD NOT install python packages globally without using apt-get, we SHOULD leverage the venv module actually bundled with the python version we're using from the deadsnakes PPA, and we SHOULD NOT install random binaries from the internet (via get-pip.py) if avoidable.

Copilot AI review requested due to automatic review settings February 24, 2026 06:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 42 to +56
RUN apt-get update && apt-get -qy install --no-install-recommends \
build-essential \
language-pack-en \
locales \
pkg-config \
libmysqlclient-dev \
libssl-dev \
git \
wget \
curl \
libffi-dev \
libsqlite3-dev \
python3-pip \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-venv
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The header comment still lists python3-pip as an installed package, but this Dockerfile no longer installs it (it now relies on the venv-provided pip). Please update the package list comment to match the actual installed packages so it doesn’t mislead future edits.

Copilot uses AI. Check for mistakes.
@kiram15 kiram15 merged commit c8b4fba into main Feb 25, 2026
3 checks passed
@kiram15 kiram15 deleted the kiram15/docker branch February 25, 2026 23:15
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.

4 participants