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
reqs: add typing-extension dependency #1263
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1263 +/- ##
==========================================
+ Coverage 89.10% 89.12% +0.01%
==========================================
Files 181 181
Lines 24124 24075 -49
Branches 3667 3668 +1
==========================================
- Hits 21496 21457 -39
+ Misses 2048 2040 -8
+ Partials 580 578 -2
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think when will python 3.11 be shipped with ubuntu? I guess at that point we could remove 3.10 in general, IMO.
Until then, I am fine with having this additional dependency.
Yeah ideally we'd drop it as soon as we drop 3.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
requirements.txt
Outdated
@@ -1,2 +1,3 @@ | |||
pip<24.0 | |||
immutabledict<2.2.6 | |||
typing-extensions<4.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typing-extensions<4.8 | |
typing-extensions>=4.8,<5 |
as suggested on the homepage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give it a go, although it might not work with some of the dependency tracking tools, will report back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked! I was too pessimistic. Let's see how dependabot deals with the update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I don't think we want to remove Python 3.10 support any time soon though (if we can easily keep compatibility, we should). But I think that depending on typing-extensions is quite safe!
Self is a very useful type to have available, introduced in 3.11. In Python 3.10 a third-party module is required for the same functionality. I reckon the extra dependency is worth it for the kind of thing we'd like to express.
It seems to me like it's necessary to make it a required dependency as core code should be able to use Self, so users of pip install should inherit it as well. It's a bit annoying to have a dependency that's only required for python 3.10 but it seems worth it to me.