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

Can't install wheels with non-normalized names #134

Closed
stefanor opened this issue Aug 15, 2022 · 2 comments · Fixed by #137
Closed

Can't install wheels with non-normalized names #134

stefanor opened this issue Aug 15, 2022 · 2 comments · Fixed by #137
Labels
type: bug A confirmed bug or unintended behavior

Comments

@stefanor
Copy link
Contributor

Names are parsed from the distribution filename, but never normalized.

If a distribution has a non-normalized filename, like Quart-0.17.0-py3-none-any.whl, then installation fails:

  File "/usr/bin/pybuild", line 367, in main
    run(func, i, version, c)
  File "/usr/bin/pybuild", line 317, in run
    result = func(context, args)
  File "/usr/share/dh-python/dhpython/build/plugin_pyproject.py", line 102, in build
    self.build_step2(context, args)
  File "/usr/share/dh-python/dhpython/build/plugin_pyproject.py", line 151, in build_step2
    install(
  File "/usr/lib/python3/dist-packages/installer/_core.py", line 77, in install
    root_scheme = _process_WHEEL_file(source)
  File "/usr/lib/python3/dist-packages/installer/_core.py", line 21, in _process_WHEEL_file
    stream = source.read_dist_info("WHEEL")
  File "/usr/lib/python3/dist-packages/installer/sources.py", line 139, in read_dist_info
    return self._zipfile.read(path).decode("utf-8")
  File "/usr/lib/python3.10/zipfile.py", line 1475, in read
    with self.open(name, "r", pwd) as fp:
  File "/usr/lib/python3.10/zipfile.py", line 1514, in open
    zinfo = self.getinfo(name)
  File "/usr/lib/python3.10/zipfile.py", line 1441, in getinfo
    raise KeyError(
KeyError: "There is no item named 'Quart-0.17.0.dist-info/WHEEL' in the archive"

From: https://bugs.debian.org/1008606
Part of the bigger issue in #97.

stefanor added a commit to stefanor/installer that referenced this issue Aug 15, 2022
Allowing us to unpack wheels with non-normalized filenames.

Part of pypa#97, but doesn't retrieve the names from distribution metadata,
yet.

Fixes: pypa#134
stefanor added a commit to stefanor/installer that referenced this issue Aug 15, 2022
Allowing us to unpack wheels with non-normalized filenames.

Part of pypa#97, but doesn't retrieve the names from distribution metadata,
yet.

Fixes: pypa#134
stefanor added a commit to stefanor/installer that referenced this issue Aug 16, 2022
Some wheels don't use normalized names for their .dist-info directories,
so search the wheel for them.

Fixes: pypa#134
stefanor added a commit to stefanor/installer that referenced this issue Aug 16, 2022
Some wheels don't use normalized names for their .dist-info directories,
so search the wheel for them.

Fixes: pypa#134
@pradyunsg pradyunsg added the type: bug A confirmed bug or unintended behavior label Nov 25, 2022
pradyunsg pushed a commit to stefanor/installer that referenced this issue Dec 7, 2022
Some wheels don't use normalized names for their .dist-info directories,
so search the wheel for them.

Fixes: pypa#134
stefanor added a commit to stefanor/installer that referenced this issue Dec 12, 2022
Some wheels don't use canonicalized names for their .dist-info
directories, so search the wheel for them.

Fixes: pypa#134
@dimaqq
Copy link

dimaqq commented Mar 2, 2023

I've played a bit with poetry==1.4.0 and I'm pretty sure it uses installer==0.6.0, the latest released.

Yet the above, linked error still happens.

It seems that the fix was not released?

@TillerBurr
Copy link

TillerBurr commented Mar 7, 2023

I've played a bit with poetry==1.4.0 and I'm pretty sure it uses installer==0.6.0, the latest released.

Yet the above, linked error still happens.

It seems that the fix was not released?

This was closed about a week after the 0.6.0 release was cut, so it would make sense that it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
4 participants