vinissimus / async-asgi-testclient

A framework-agnostic library for testing ASGI web applications
MIT License
159 stars 20 forks source link

[odd] issue trying to `poetry add` this package #36

Closed dimaqq closed 3 years ago

dimaqq commented 3 years ago

I have this (admittedly broken) entry in my pyproject.toml:

[tool.poetry.scripts]
start = "poetry run uvicorn server:app --reload"

Adding and removing other deps works just fine, but when I tried to poetry add --dev async-asgi-testclient the addition crashed with:

Using version ^1.4.6 for async-asgi-testclient
...
  • Installing async-asgi-testclient (1.4.6): Failed
...
      Traceback (most recent call last):
        File "/Users/xxx-py3.9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2848, in get_entry_map
          ep_map = self._ep_map
        File "/Users/xxx-py3.9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2810, in __getattr__
          raise AttributeError(attr)
      AttributeError: _ep_map

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
       File "/Users/xxx-py3.9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2495, in parse
          raise ValueError(msg, src)
      ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format", 'start=poetryrunuvicornserver:app--reload')

Normally I'd blame poetry, but somehow only this package triggers this, so 🤷🏿

P.S. package gets installed correctly into a clean/healthy project. I'm still a little confused why installing this particular package trips on the "outside" of it...

masipcat commented 3 years ago

Hi!

I'm using async-asgi-testclient on several projects that use poetry and never got this error. I'd say this is related to the broken tool.poetry.scripts. I've tried to reproduce it locally with no luck. I'd say this is not a problem on async-asgi-testclient....

dimaqq commented 3 years ago

sure let's close 🤷🏿