Skip to content

Conversation

@sbidoul
Copy link
Member

@sbidoul sbidoul commented Dec 28, 2023

No description provided.

@sbidoul sbidoul added the skip news Does not need a NEWS file entry (eg: trivial changes) label Dec 28, 2023
@sbidoul
Copy link
Member Author

sbidoul commented Dec 28, 2023

No idea yet why those tests are failing. I can't reproduce locally.

@ichard26
Copy link
Member

@sbidoul I was setting up a fresh pip development environment last night and I ran into similar issues locally. I've tracked it down to the latest setuptools release: v69.0.3. This release contains pypa/setuptools@d0b0a4d which changes egg_info to preserve underscores in distribution names.

If you remove the cached nox environments, AFAIU you should run into similar failures.

~/dev/oss/pip ❯ pip install setuptools==69.0.2 -q                                                                                         main +4 -1 •  v3.11.7 (venv) 

~/dev/oss/pip ❯ pip install tests/data/src/requires_capitalized/ --no-deps -q && pip show Requires-Capitalized                    main +4 -1 •  v3.11.7 (venv) in 436ms
Name: Requires-Capitalized
Version: 0.1
Summary: 
Home-page: 
Author: 
Author-email: 
License: 
Location: /home/ichard26/dev/oss/pip/venv/lib/python3.11/site-packages
Requires: simple
Required-by: 

~/dev/oss/pip ❯ pip install setuptools==69.0.3 -q                                                                                 main +4 -1 •  v3.11.7 (venv) in 932ms

~/dev/oss/pip ❯ pip install tests/data/src/requires_capitalized/ --no-deps -q && pip show Requires-Capitalized                  main +4 -1 •  v3.11.7 (venv) in 4s437ms
Name: Requires_Capitalized
Version: 0.1
Summary: 
Home-page: 
Author: 
Author-email: 
License: 
Location: /home/ichard26/dev/oss/pip/venv/lib/python3.11/site-packages
Requires: simple
Required-by: 

~/dev/oss/pip ❯                                                                                                                   main +4 -1 •  v3.11.7 (venv) in 893ms

If you force the test suite to use the previous setuptools release, the failing tests start to pass again.

diff --git a/tests/requirements-common_wheels.txt b/tests/requirements-common_wheels.txt
index 6403ed738..a440487e8 100644
--- a/tests/requirements-common_wheels.txt
+++ b/tests/requirements-common_wheels.txt
@@ -6,6 +6,7 @@
 # (Adjust artifact directory used based on preference and operating system)
 
 setuptools >= 40.8.0, != 60.6.0
+setuptools == 69.0.2
 wheel
 # As required by pytest-cov.
 coverage >= 4.4

This probably warrants a new issue, but I'm not making that call as a brand new contributor 🙂

@pradyunsg
Copy link
Member

@ichard26 Would you like to file a PR fixing the tests that are failing due to the normalisation changes?

@ichard26
Copy link
Member

Sure! That'd be great. I've got people over tomorrow so I'm not sure how long the PR will take, but I'll take a crack at it.

@ichard26
Copy link
Member

ichard26 commented Jan 4, 2024

I need some pip developer input on pypa/setuptools#4167 to fix the failing tests. Either pip needs to update its egg-link logic to be more permissive or setuptools will revert part of a behavioural change.

@sbidoul
Copy link
Member Author

sbidoul commented Jan 15, 2024

🍏

- id: trailing-whitespace
exclude: .patch

- repo: https://github.com/psf/black
Copy link
Contributor

Choose a reason for hiding this comment

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

For a faster mypyc-compiled wheel:

Suggested change
- repo: https://github.com/psf/black
- repo: https://github.com/psf/black-pre-commit-mirror

Copy link
Member

Choose a reason for hiding this comment

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

Not for right now, but maybe at some point we should switch to ruff instead of black? Presumably it's even faster...

https://docs.astral.sh/ruff/formatter/

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 I use the ruff formatter on several of my projects and have been very satisfied with it.

@sbidoul sbidoul merged commit 5efa3e8 into pypa:main Jan 15, 2024
@sbidoul sbidoul deleted the upgrade-linters-sbi branch January 15, 2024 11:45
@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.

Labels

skip news Does not need a NEWS file entry (eg: trivial changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants