Skip to content

Restrict setuptools version in CI workflow#171

Open
alexanderwerning wants to merge 6 commits intomasterfrom
constrain-setuptools-workflow
Open

Restrict setuptools version in CI workflow#171
alexanderwerning wants to merge 6 commits intomasterfrom
constrain-setuptools-workflow

Conversation

@alexanderwerning
Copy link
Copy Markdown
Member

pkg_resources was removed in setuptools 82, but sacred depends on it.
For more information see: pypa/setuptools#5174

Copy link
Copy Markdown

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 aims to keep CI green by preventing setuptools upgrades that remove pkg_resources (which is still required by the sacred dependency used in the repo’s [all]/test extras).

Changes:

  • Pin setuptools to a fixed version during CI dependency installation.
  • Remove the Ubuntu 22.04 / Python 3.7 CI job from the test matrix.
  • Stabilize a to_list doctest output by forcing np.int64 dtype.

Reviewed changes

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

File Description
.github/workflows/tests.yml Pins setuptools in the CI install step and adjusts the OS/Python matrix (dropping 3.7/ubuntu-22.04).
padertorch/utils.py Adjusts a doctest to explicitly use np.int64 for consistent pretty-printed output.

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

- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools==75.3.4 wheel
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

Pinning to an exact setuptools==75.3.4 is more restrictive than necessary for the stated issue (pkg_resources removal in setuptools 82) and may require extra maintenance. Consider using a bounded constraint (e.g., <82) and/or adding an inline comment explaining the pin so it's clear when/why it can be relaxed.

Suggested change
python -m pip install --upgrade pip setuptools==75.3.4 wheel
# Pin setuptools below 82 to avoid pkg_resources removal; keep minimum at 75.3.4 for compatibility.
python -m pip install --upgrade pip "setuptools>=75.3.4,<82" wheel

Copilot uses AI. Check for mistakes.
Comment on lines 16 to 20
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [ubuntu-latest]
include:
- os: ubuntu-22.04
python-version: 3.7
- os: macos-latest
python-version: "3.12"
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

This hunk removes the Ubuntu 22.04 / Python 3.7 job, which (a) changes CI coverage and (b) leaves a now-dead reference to ubuntu-22.04 later in the workflow (Install linux dependencies uses if: ... || matrix.os == 'ubuntu-22.04'). If dropping 3.7/22.04 is intended, please also update the later if condition accordingly (and consider noting the coverage change in the PR description).

Copilot uses AI. Check for mistakes.
Restrict installation of linux dependencies to only 'ubuntu-latest'.
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