Replace custom wheel filename regex with standard packaging parse_wheel_filename#12917
Replace custom wheel filename regex with standard packaging parse_wheel_filename#12917notatallshaw wants to merge 3 commits intopypa:mainfrom
parse_wheel_filename#12917Conversation
|
|
|
Looks good :) |
b21d906 to
785266e
Compare
785266e to
4491bf9
Compare
b798ed8 to
f2bd16d
Compare
This fails consistently in CI, but inconsistently locally 🙁, I will investigate. |
|
@notatallshaw it fails consistently locally for me. I copied the old Wheel class, creating both the new and old classes to compare the final attributes. It looks like the packaging-based implementation is normalizing the wheel name hence the FileNotFoundError. The headers are placed in a directory with the normalized name (although the dist-info is still not normalized...) diff --git a/tests/functional/test_install_wheel.py b/tests/functional/test_install_wheel.py
index 7e7aeaf7a..e01ecfb57 100644
--- a/tests/functional/test_install_wheel.py
+++ b/tests/functional/test_install_wheel.py
@@ -190,7 +190,7 @@ def test_install_from_wheel_with_headers(script: PipTestEnvironment) -> None:
dist_info_folder = script.site_packages / "headers.dist-0.1.dist-info"
result.did_create(dist_info_folder)
- header_scheme_path = get_header_scheme_path_for_script(script, "headers.dist")
+ header_scheme_path = get_header_scheme_path_for_script(script, "headers-dist")
header_path = header_scheme_path / "header.h"
assert header_path.read_text() == header_text |
Ah, that checks out. Heh. |
f2bd16d to
5dc5761
Compare
|
This is ready for review and merge. |
|
Holding off on merging this until the discussion in pypa/packaging#873 has concluded, may end up pushing this to a later pip release. |
|
I've found a real world examples where this PR would currently throw an error but there is no deprecation warning:
I don't think this is a supported use case, but I don't want to surprise users, so I plan to do the following in a new PR:
The new deprecation warning will be for it to be gone in pip 25.3. |
This will be marked ready for review once
_in wheel version file name has been deprecated, see #12914