You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the new wheel release has broken pypdfium2 installation because wheels with multiple .-separated tags are now erroneously considered invalid:
File "/home/mara/projects/pypdfium2/setupsrc/pl_setup/setup_base.py", line 77, in mkwheel
setuptools.setup(
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 385, in run
with WheelFile(wheel_path, "w", self.compression) as wf:
File "/tmp/pip-build-env-jzav0p36/overlay/lib/python3.10/site-packages/wheel/wheelfile.py", line 45, in __init__
raise WheelError(f"Bad wheel filename {basename!r}")
wheel.cli.WheelError: Bad wheel filename 'pypdfium2-3.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
[end of output]
It might even be more severe possibly? The example below is not even a multi-tag
I pulled an example off of the PEP-491 -- specifically distribution-1.0-1-py27-none-any.whl
took the WHEEL_INFO_RE -- which appears to be re.compile('^(?P<namever>(?P<name>[^-]+?)-(?P<ver>[^-]+?))(-(?P<build>\\d[^-]*))?\n -(?P<pyver>[^-]+?)-(?P<abi>[^-]+?)-(?P<plat>[^.]+?)\\.whl$', re.VERBOSE)
The differences are negligible, and I have little interest in fine tuning this regex since wheel name parsing will be delegated to packaging from v1.0.0 forward.
We can use the following method to test: wheel unpack "pypdfium2-3.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
if wheel with commit 88f02bc (and without 4419390), the result is: Bad wheel filename 'pypdfium2-3.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
if wheel without commit 88f02bc, the result is: Unpacking to: ./pypdfium2-3.6.0...OK
Activity
mara004 commentedon Nov 4, 2022
Presumably introduced with commit 88f02bc?
Blacklist broken wheel release
[-]New release broke multi-tag wheels[/-][+]Multi-tag wheels broken since v0.38.0[/+]Blacklist broken wheel release
jacobdr commentedon Nov 4, 2022
It might even be more severe possibly? The example below is not even a multi-tag
distribution-1.0-1-py27-none-any.whlWHEEL_INFO_RE-- which appears to bere.compile('^(?P<namever>(?P<name>[^-]+?)-(?P<ver>[^-]+?))(-(?P<build>\\d[^-]*))?\n -(?P<pyver>[^-]+?)-(?P<abi>[^-]+?)-(?P<plat>[^.]+?)\\.whl$', re.VERBOSE)[-]Multi-tag wheels broken since v0.38.0[/-][+]Wheel name validation broken[/+]agronholm commentedon Nov 5, 2022
This is caused by an unfortunate error in the platform part of the regex. I have a fix almost ready and will publish a patch release very soon.
mara004 commentedon Nov 5, 2022
Thanks for the quick fix!
Looking at the PyPI history, you may want to consider yanking v0.38.1 as well.
mara004 commentedon Nov 6, 2022
pip also has such a regex:
https://github.com/pypa/pip/blob/90f51db1a32592430f2e4f6fbb9efa7a3a249423/src/pip/_internal/models/wheel.py#L15
I think it differs slightly. Is that on purpose?
agronholm commentedon Nov 6, 2022
The differences are negligible, and I have little interest in fine tuning this regex since wheel name parsing will be delegated to
packagingfrom v1.0.0 forward.zhuofeng6 commentedon Feb 21, 2023
Why is the file name not completely matched?
pfmoore commentedon Feb 21, 2023
It's just the repr of the match object:
xiaoge1001 commentedon Dec 18, 2023
I think it's introduced with commit 88f02bc.
We can use the following method to test:
wheel unpack "pypdfium2-3.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"if wheel with commit 88f02bc (and without 4419390), the result is:
Bad wheel filename 'pypdfium2-3.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'if wheel without commit 88f02bc, the result is:
Unpacking to: ./pypdfium2-3.6.0...OKFixed parsing of wheel file names with multiple platform tags