encode / uvicorn

An ASGI web server, for Python. 🦄
https://www.uvicorn.org/
BSD 3-Clause "New" or "Revised" License
8.57k stars 745 forks source link

Requirement typo? typing_extensions>=4.0 #2290

Closed thenewguy closed 7 months ago

thenewguy commented 7 months ago

Initial Checks

Discussion Link

none

Description

Skipped the very long template - not worried if you close it. Not sure this requires a discussion. Thanks!

Just happened to be tracking down the cause of ImportError: cannot import name 'NotRequired' from 'typing_extensions' while upgrading some older installations.

https://github.com/encode/uvicorn/blob/a2219eb2ed2bbda4143a0fb18c4b0578881b1ae8/pyproject.toml#L34

Not sure why but we ended up with a lower version of typing_extensions installed.

Should this line be "typing-extensions>=4.0; python_version < '3.11'" with a dash instead of an underscore? typing-extensions is what comes from pip freeze.

Example Code

No response

Python, Uvicorn & OS Version

upgrading older installations python 3.9

[!IMPORTANT]

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.

Fund with Polar

thenewguy commented 7 months ago

closing this - manually removing and rebuilding the environment replaced it with the underscore. Must be a specific environment problem