ewels / rich-click

Format click help output nicely with rich.
https://ewels.github.io/rich-click/
MIT License
583 stars 33 forks source link

typing_extension requirement is too vague #203

Closed PatrickMassot closed 2 weeks ago

PatrickMassot commented 1 month ago

I just ran into trouble trying to use this awesome lib on a computer whose typing_extensions was too old. It was impossible to load richclick, with error ImportError: cannot import name 'NotRequired' from 'typing_extensions'. The solution was to upgrade typing_extensions on my system.

And indeed the pyproject.toml here simply specify a dependency on typing_extensions without any version bound. Could you please put a lower bound there?

My system was on 3.10.0.2 and indeed the documentation says that NotRequired was added in 3.11. There is no version 3.11 on PyPi, it jumps from 3.10 to 4.0. I just checked that upgrading to 4.0.0 allows to import rich_click, but I didn’t try to use it. So you could try requiring typing_extensions>=4.0.0 and this would already be progress.

dwreeves commented 1 month ago

Thanks for the note! I'll add a lower bound when I get a moment.

dwreeves commented 2 weeks ago

Thanks for opening the issue! It has now been resolved in the main branch.

I think this issue is probably too minor to justify a patch release, but whenever there is another release of rich-click, the lower bound will be part of it.