Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update legacy editables support for compatibility with setuptools >= 69 #12477

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Jan 14, 2024

Since version 69, setuptools preserves _ in Name metadata and .egg-link files (before it converted them to -).

This is an attempt to make pip freeze and pip uninstall compatible with that behaviour, as well as fix various part of the testsuite that depended on that. The changes should be compatible with previous setuptools versions too.

This includes and extends #12458.

@notatallshaw
Copy link
Member

notatallshaw commented Jan 14, 2024

Obvious question, but is there an easy way to run the Pip test suite using setuptools<69?

Some users pin their build dependencies either for their own project via pyproject.toml or for all their dependencies via PIP_CONSTRAINTS or using pip-tools.

@sbidoul sbidoul force-pushed the fix-test-suite-setuptools69-sbi branch from 630ba15 to 98dc4b2 Compare January 14, 2024 17:38
@sbidoul
Copy link
Member Author

sbidoul commented Jan 14, 2024

You can test that by constraining setuptools in test/requirements.txt and tests/requirements-common_wheels.txt, and emptying the tests/data/common_wheels directory before running the nox test session.

@notatallshaw
Copy link
Member

Thanks, I tested this branch locally using setuptools<69 on Linux Python 3.11 and all tests passed.

I did have one flaky test test_download_info_archive_cache_with_invalid_origin but that seems flaky on first run every time I changed my environment, regardless of what branch I was running it against.

@pradyunsg pradyunsg merged commit 9f5082e into pypa:main Jan 15, 2024
26 checks passed
@sbidoul sbidoul deleted the fix-test-suite-setuptools69-sbi branch January 15, 2024 10:05
@sbidoul
Copy link
Member Author

sbidoul commented Jan 15, 2024

Thanks for confirming @notatallshaw. I have not experienced the flakyness myself, though.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants