Implement TypeGuard (PEP 649)#803
Merged
JelleZijlstra merged 9 commits intopython:masterfrom May 1, 2021
Merged
Conversation
Member
Author
|
Whew I finally managed to defeat Python 3.5.2. @Fidget-Spinner would you mind reviewing this PR? |
Member
Indeed, no f-strings are a pain I thought I'd never experience again :(.
Sure, I'll try to review it by this weekend (caught up with some other stuff right now). |
Fidget-Spinner
approved these changes
Apr 30, 2021
Member
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM. I can see the parallels with Final (I also learnt a lot about typing's older incarnations - e.g. didn't know _eval_type was strictly compulsory in older versions).
Supporting so many versions of typing is tricky. Thanks for handling the backport!
Member
Author
|
Thanks for the review! Now it's time to prepare a release. |
zundertj
added a commit
to zundertj/polars
that referenced
this pull request
Dec 27, 2021
Closes pola-rs#2185. Im not 100% sure this has not been in before v4, i.e. the PR (python/typing#803) was merged May 1, and the same day 3.10.0 of the package was released. However, I dont think it hurts to push to v4?
ritchie46
pushed a commit
to pola-rs/polars
that referenced
this pull request
Dec 28, 2021
Closes #2185. Im not 100% sure this has not been in before v4, i.e. the PR (python/typing#803) was merged May 1, and the same day 3.10.0 of the package was released. However, I dont think it hurts to push to v4?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should be the last missing piece for a 3.10-compatible release.
The implementation was mostly inspired by that of
Final, with an additional special case for 3.9.