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

Drop typing-extensions in recent Python versions #587

Closed

Conversation

Dreamsorcerer
Copy link

It would be best to drop typing-extensions as a dependency when it's no longer needed. This removes the dependency on Python 3.11+.

@gabrieldemarmiesse
Copy link
Owner

Thank you for the pull request. I appreciate it and I see that in the short term, it will drop a dependency, which is always good.

I'm more worried about the long term. typing_extensions is extremely useful in general. It has no dependencies itself, so having the latest version isn't usually a problem. As python introduces new typing features, we'll likely use them. So we will need to add typing-extensions again. To avoid this back and forth, I believe that making typing-extensions a permanent dependencies of python-on-whales is reasonnable. It will make the adoption of future typing features much easier.

I'll close this PR, but if you believe there is something I'm missing, do not hesitate to continue this conversation :)

@Dreamsorcerer
Copy link
Author

I think people typically prefer to have less dependencies when they are not needed (this can also affect downstream decisions on packaging/supporting a package). I think anything past 3.11 are generally going to be nice-to-have features that can be utilised once upgrading to that version of Python, as opposed to important features that are needed for typing to actually work on the project. You'll notice that currently there is only 1 thing being used from typing-extensions (with 1 more being added in #580).

It's up to you, but I wouldn't anticipate any requirement to use typing-extensions in future in order to correctly type the project (i.e. It should be easy to resist re-adding typing-extensions in future).

@LewisGaul
Copy link
Collaborator

Personally I'm not too worried about the typing-extensions package being a dependency (as a user), and I can understand wanting to be free to use all the latest typing features (that's the whole point of the package, right? :) ). That's coming from a position where I definitely agree that I prefer to have less dependencies (see #512 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants