cunla / fakeredis-py

Implementation of Redis in python without having a Redis server running. Fully compatible with using redis-py.
https://fakeredis.moransoftware.ca/
BSD 3-Clause "New" or "Revised" License
299 stars 49 forks source link

typing_extensions in dependencies should be typing-extensions #330

Closed M1ha-Shvn closed 2 months ago

M1ha-Shvn commented 2 months ago

Describe the bug Not a bug, in reality, but lead to confusion in my case.

importlib.metadata.distribution shows typing_extensions requirement as typing_extensions (>=4.7,<5.0) ; python_version < "3.11"'. The correct name of the library is typing-extensions (I get it as it is written on pypi). This may lead to some confusions in scripts which analyze dependencies as Requirement("typing_extensions") is not equal to Requirement("typing-extensions") (nevertheless, both work and are installed correctly by pip).

To Reproduce

from importlib.metadata import distribution
from packaging.requirements import Requirement

dist = distribution("fakeredis")
for req in dist.requires:
    print(Requirement(req).name)

Expected behavior library name should be typing-extensions

Desktop (please complete the following information):

Upvote & Fund

Fund with Polar

cunla commented 2 months ago

Thanks for reporting this. Do you mind creating a PR for this change? (also run poetry update to update poetry.lock)

cunla commented 2 months ago

Nevermind, I got it