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

Issue with using on par with poetry #72

Closed
vrslev opened this issue Mar 20, 2023 · 3 comments
Closed

Issue with using on par with poetry #72

vrslev opened this issue Mar 20, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@vrslev
Copy link

vrslev commented Mar 20, 2023

Hi there! When I try to add Granian to a project, it fails.

/tmp 
❯ mkdir testpoetry-granian

/tmp 
❯ cd testpoetry-granian

/tmp/testpoetry-granian 
❯ poetry init -q

/tmp/testpoetry-granian is 📦 v0.1.0 via 🐍 v3.11.0 
❯ poetry add granian==0.3.0
Creating virtualenv testpoetry-granian in /private/tmp/testpoetry-granian/.venv

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 8 installs, 0 updates, 0 removals

  • Installing idna (3.4)
  • Installing sniffio (1.3.0)
  • Installing anyio (3.6.2)
  • Installing click (8.1.3)
  • Installing typer (0.7.0)
  • Installing uvloop (0.17.0)
  • Installing watchfiles (0.18.1)
  • Installing granian (0.3.0): Failed

  AssertionError

  In /Users/lev/Library/Caches/pypoetry/artifacts/60/fe/00/2931d21a92fc2dc50a454589ca558160dde1d497d46471b44c75b3c653/granian-0.3.0-cp311-cp311-macosx_11_0_arm64.whl, granian/__init__.py is not mentioned in RECORD

  at /opt/homebrew/Cellar/poetry/1.4.0/libexec/lib/python3.11/site-packages/installer/sources.py:158 in get_contents
      154│             if item.filename[-1:] == "/":  # looks like a directory
      155│                 continue
      156│ 
      157│             record = record_mapping.pop(item.filename, None)
    → 158│             assert record is not None, "In {}, {} is not mentioned in RECORD".format(
      159│                 self._zipfile.filename,
      160│                 item.filename,
      161│             )  # should not happen for valid wheels
      162│ 

/tmp/testpoetry-granian is 📦 v0.1.0 via 🐍 v3.11.2 
❯ 

Here are steps that I took:

cd /tmp
mkdir testpoetry-granian
cd testpoetry-granian
poetry init -q
poetry add granian==0.3.0

I'm using ARM Mac. Python 3.11.2, Poetry 1.4.0. Doesn't work with Granian 0.2.0 either.

@gi0baro
Copy link
Member

gi0baro commented Mar 21, 2023

It seems to me a bug in Poetry handling maturin packages, as:

  • it runs fine with poetry 1.3.x
  • it runs fine with 1.4 and poetry config experimental.new-installer false

I might upgrade the maturin version used for producing the wheels, but the whole thing is still quite strange to me..

gi0baro added a commit that referenced this issue Mar 21, 2023
@gi0baro
Copy link
Member

gi0baro commented Mar 21, 2023

This was actually a misconfig in maturin, should now be solved in granian 0.3.1

@gi0baro gi0baro closed this as completed Mar 21, 2023
@gi0baro gi0baro added the bug Something isn't working label Mar 21, 2023
@vrslev
Copy link
Author

vrslev commented Mar 21, 2023

@gi0baro Great! Thanks for the help ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants