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

Install from pypi or any whl fails if filename case does not match internal dist-info case #7635

Closed
4 tasks done
jgentil opened this issue Mar 9, 2023 · 3 comments
Closed
4 tasks done
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@jgentil
Copy link

jgentil commented Mar 9, 2023

Boilerplate

  • Poetry version: 1.4.0

  • Python version: 3.11.1

  • OS version and name: MacOS 12.6.3

  • pyproject.toml: (irrelevant-happens in a fresh project)

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Traceback

$ poetry add fastapi-restful

Using version ^0.4.3 for fastapi-restful

Updating dependencies
Resolving dependencies... (0.5s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing fastapi-restful (0.4.3): Failed

  KeyError

  "There is no item named 'FastApi_RESTful-0.4.3.dist-info/WHEEL' in the archive"

  at /usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/zipfile.py:1473 in getinfo
      1469│     def getinfo(self, name):
      1470│         """Return the instance of ZipInfo given 'name'."""
      1471│         info = self.NameToInfo.get(name)
      1472│         if info is None:
    → 1473│             raise KeyError(
      1474│                 'There is no item named %r in the archive' % name)
      1475│
      1476│         return info
      1477│

Issue

If you download the actual wheel file from PyPI for this project, it's named FastApi_RESTful-0.4.3-py3-none-any.whl but internally if you unzip it, it contains these files:

$ unzip ../FastApi_RESTful-0.4.3-py3-none-any.whl

Archive:  ../FastApi_RESTful-0.4.3-py3-none-any.whl
  inflating: fastapi_restful/__init__.py
  inflating: fastapi_restful/api_model.py
  inflating: fastapi_restful/api_settings.py
  inflating: fastapi_restful/camelcase.py
  inflating: fastapi_restful/cbv.py
  inflating: fastapi_restful/cbv_base.py
  inflating: fastapi_restful/enums.py
  inflating: fastapi_restful/guid_type.py
  inflating: fastapi_restful/inferring_router.py
  inflating: fastapi_restful/openapi.py
  inflating: fastapi_restful/py.typed
  inflating: fastapi_restful/session.py
  inflating: fastapi_restful/tasks.py
  inflating: fastapi_restful/timing.py
  inflating: fastapi_restful-0.4.3.dist-info/LICENSE
  inflating: fastapi_restful-0.4.3.dist-info/WHEEL
  inflating: fastapi_restful-0.4.3.dist-info/METADATA
  inflating: fastapi_restful-0.4.3.dist-info/RECORD

The case discrepancy between the .whl name and the .dist-info directory is causing the issue. PEP 427 doesn't really explicitly talk about case sensitivity. This is a regression from Poetry 1.3.x and pip allows for the .dist-info directory to be found case-insensitively.

@jgentil jgentil added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 9, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Mar 9, 2023

you've checked the "I searched for duplicates" box. DId you really?

#7572

@jgentil
Copy link
Author

jgentil commented Mar 9, 2023

Yeah, I searched and it didn't show up. Too many open issues I guess? Apologies for the duplicate.

@jgentil jgentil closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants