Skip to content

Workaround test failures with setuptools 80 #13357

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Apr 28, 2025

IIUC, setuptools 80 changed setup.py develop to use PEP 660?

This breaks our test suite which expects egg-link files to be created.

As part of the removal of the setup.py develop code path (scheduled for 25.3), we need to stop relying on egg-link to detect editable installs and use direct_url.json instead, so this will be revisited soon.

@sbidoul sbidoul added skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes labels Apr 28, 2025
@sbidoul sbidoul force-pushed the workaround-setuptools-80 branch from 654a05a to 99dcc23 Compare April 28, 2025 16:58
This breaks our test suite which expects egg-link files to be created.
@sbidoul sbidoul force-pushed the workaround-setuptools-80 branch from 99dcc23 to f124f60 Compare April 28, 2025 19:19
@sbidoul
Copy link
Member Author

sbidoul commented Apr 28, 2025

The setuptool PR that introduced the change: pypa/setuptools#4955

Copy link
Member

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

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

There's this slightly concerning line in the changelog:

Develop command no longer uses easy_install, but instead defers execution to pip (which then will re-invoke Setuptools via PEP 517 to build the editable wheel). Most of the options to develop are dropped. This is the final warning before the command is dropped completely in a few months. Use-cases relying on ‘setup.py develop’ should pin to older Setuptools version or migrate to modern build tooling. (#4955)

cc @jaraco just to confirm, the plan is remove setup.py develop at the same time or after pip removes its own fallback to setup.py develop (scheduled for pip 25.3 so in ~six months), right? We still call setup.py develop when the project does not have a pyproject.toml. The deprecation is tracked in #11457.

If the plan is to drop setup.py develop before pip, I'd like to be aware of your timeline.

@ichard26
Copy link
Member

@pfmoore can I merge this PR or do you want to wait? I'd say there's no point in waiting since we'd need working CI to even consider any other changes for a bugfix release, but I'll leave the decision to you.

@pfmoore
Copy link
Member

pfmoore commented Apr 28, 2025

Go for it. I agree - this isn't going to trigger a bugfix release, but it's fine to include in it if we do one. (Sorry, I should have been clearer about that distinction when I asked people to go easy on merges...)

@jaraco
Copy link
Member

jaraco commented Apr 28, 2025

cc @jaraco just to confirm, the plan is remove setup.py develop at the same time or after pip removes its own fallback to setup.py develop (scheduled for pip 25.3 so in ~six months), right? We still call setup.py develop when the project does not have a pyproject.toml. The deprecation is tracked in #11457.

I was not aware that pip still called setup.py develop. I'd thought I'd remembered that --use-pep517 became the default a long time ago. I guess the deprecation is just taking longer than I'd realized. I'm fine keeping the compatibility shim around for a while especially if that helps alleviate pressure in the transition. The currently posted earliest date for removal of setup.py develop is Nov 1.

Am I right in thinking that pip users can always pass --use-pep517 to avoid setup.py develop going back years of pip history?

@sbidoul
Copy link
Member Author

sbidoul commented Apr 29, 2025

Am I right in thinking that pip users can always pass --use-pep517 to avoid setup.py develop

@jaraco that is correct

@sbidoul sbidoul merged commit 12df3fd into pypa:main Apr 29, 2025
29 checks passed
@sbidoul sbidoul deleted the workaround-setuptools-80 branch April 29, 2025 05:45
@edmorley
Copy link
Contributor

edmorley commented Apr 29, 2025

Am I right in thinking that pip users can always pass --use-pep517 to avoid setup.py develop

Users can also:

  • Stop installing one of either wheel or setuptools (since pip defaults to PEP517 unless both setuptools and wheel are installed). Many environments already don't install wheel (eg get-pip.py and ensurepip) or don't install both packages (eg the Docker Hub Python images for Python 3.12+) in fact.
  • Pin setuptools in their environment (eg the Docker Hub Python images already pin to older setuptools for Python 3.11 and older)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants