Skip to content

Pin setuptools<82 to fix pkg_resources removal breakage - #174631

Closed
seemethere wants to merge 3 commits into
gh/seemethere/121/basefrom
gh/seemethere/121/head
Closed

seemethere wants to merge 3 commits into
gh/seemethere/121/basefrom
gh/seemethere/121/head

Conversation

@seemethere

@seemethere seemethere commented Feb 9, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

setuptools 82.0.0 (released Feb 8, 2026) removed pkg_resources,
which breaks flake8-logging-format and other transitive dependencies
that import it at module load time. Pin setuptools<82 across all
build configs, Dockerfiles, CI scripts, and runtime dependencies
until affected packages migrate away from pkg_resources.

[ghstack-poisoned]
@seemethere
seemethere requested review from a team and jeffdaily as code owners February 9, 2026 23:16
@pytorch-bot

pytorch-bot Bot commented Feb 9, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/174631

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⏳ No Failures, 17 Pending

As of commit c98d592 with merge base 8f5c518 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the release notes: releng release notes category label Feb 9, 2026
seemethere added a commit that referenced this pull request Feb 9, 2026
setuptools 82.0.0 (released Feb 8, 2026) removed pkg_resources,
which breaks flake8-logging-format and other transitive dependencies
that import it at module load time. Pin setuptools<82 across all
build configs, Dockerfiles, CI scripts, and runtime dependencies
until affected packages migrate away from pkg_resources.


ghstack-source-id: 8f43967
Pull-Request: #174631
Comment thread requirements-build.txt
@@ -1,5 +1,5 @@
# Build System requirements
setuptools>=70.1.0
setuptools>=70.1.0,<82

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

IMO in practice it's less than 80

Comment thread tools/nightly.py
"uv",
"pip",
"setuptools",
"setuptools<82",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure what this thing is about, but I doubt it takes versions...

Comment thread aten/conda/meta.yaml Outdated
- cmake
- pyyaml
- setuptools
- setuptools <82

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TIL :) I'm about to delete this one

[ghstack-poisoned]
[ghstack-poisoned]
@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Feb 9, 2026
@seemethere

Copy link
Copy Markdown
Member Author

@pytorchbot merge -f "Needed to fix flaky lint"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
setuptools 82.0.0 (released Feb 8, 2026) removed pkg_resources,
which breaks flake8-logging-format and other transitive dependencies
that import it at module load time. Pin setuptools<82 across all
build configs, Dockerfiles, CI scripts, and runtime dependencies
until affected packages migrate away from pkg_resources.
Pull Request resolved: pytorch#174631
Approved by: https://github.com/malfet
@github-actions
github-actions Bot deleted the gh/seemethere/121/head branch March 12, 2026 02:23
sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
setuptools 82.0.0 (released Feb 8, 2026) removed pkg_resources,
which breaks flake8-logging-format and other transitive dependencies
that import it at module load time. Pin setuptools<82 in build configs,
linter scripts, and runtime dependencies until affected packages
migrate away from pkg_resources.

ghstack-source-id: fadfdf7
Pull-Request: pytorch/pytorch#174631
BLOrange-AMD pushed a commit to ROCm/pytorch that referenced this pull request Mar 17, 2026
setuptools 82.0.0 (released Feb 8, 2026) removed pkg_resources,
which breaks flake8-logging-format and other transitive dependencies
that import it at module load time. Pin setuptools<82 across all
build configs, Dockerfiles, CI scripts, and runtime dependencies
until affected packages migrate away from pkg_resources.
Pull Request resolved: pytorch#174631
Approved by: https://github.com/malfet
@adamjstewart

Copy link
Copy Markdown
Contributor

This seems rather heavy handed to require setuptools <82 at run-time just because of flake8-logging-format. Perhaps this could be restricted to developer installs so all users aren't affected?

pytorchmergebot pushed a commit that referenced this pull request Jun 16, 2026
Upper bound was originally introduced by #174631, but `pkg_resources` is not used by `torch.utils.cpp_extensions`

Test Plan: Install latest setuptools and all `cpp_extensions` test still work

Fixes #187188

Pull Request resolved: #187262
Approved by: https://github.com/malfet, https://github.com/atalman

Co-authored-by: Nikita Shulga <[email protected]>
atalman pushed a commit that referenced this pull request Jun 25, 2026
Remove setuptools upper bound (#187262)

Upper bound was originally introduced by #174631, but `pkg_resources` is not used by `torch.utils.cpp_extensions`

Test Plan: Install latest setuptools and all `cpp_extensions` test still work

Fixes #187188

Pull Request resolved: #187262
Approved by: https://github.com/malfet, https://github.com/atalman


(cherry picked from commit c776884)

Co-authored-by: Yufeng He <[email protected]>
Co-authored-by: Nikita Shulga <[email protected]>
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
Upper bound was originally introduced by pytorch#174631, but `pkg_resources` is not used by `torch.utils.cpp_extensions`

Test Plan: Install latest setuptools and all `cpp_extensions` test still work

Fixes pytorch#187188

Pull Request resolved: pytorch#187262
Approved by: https://github.com/malfet, https://github.com/atalman

Co-authored-by: Nikita Shulga <[email protected]>
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
Upper bound was originally introduced by pytorch#174631, but `pkg_resources` is not used by `torch.utils.cpp_extensions`

Test Plan: Install latest setuptools and all `cpp_extensions` test still work

Fixes pytorch#187188

Pull Request resolved: pytorch#187262
Approved by: https://github.com/malfet, https://github.com/atalman

Co-authored-by: Nikita Shulga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants