-
-
Notifications
You must be signed in to change notification settings - Fork 124
Fix error message when subclassing TypeVarTuple #679
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
base: main
Are you sure you want to change the base?
Fix error message when subclassing TypeVarTuple #679
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #679 +/- ##
==========================================
- Coverage 97.36% 97.36% -0.01%
==========================================
Files 3 3
Lines 7680 7706 +26
==========================================
+ Hits 7478 7503 +25
- Misses 202 203 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Co-authored-by: Jelle Zijlstra <[email protected]>
CHANGELOG.md
Outdated
@@ -1,5 +1,6 @@ | |||
# Unreleased | |||
|
|||
- Fix error message when trying to subclass `typing_extensions.TypeVarTuple`. |
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.
Maybe?
- Fix error message when trying to subclass `typing_extensions.TypeVarTuple`. | |
- Update error message when attempting to subclass `typing_extensions.TypeVarTuple` | |
to align with the message produced by `typing` in Python 3.12+. |
The upstream message changed as part of python/cpython#103764 if that's worth incorporating.
Also, feel free to credit yourself by appending Patch by $your_preferred_name
:-)
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.
Yeah, yours is better. Took that and added the patch by line <3
Issue discovered by running CPython 3.12 test_typing.py on typing_extensions: https://github.com/JanEricNitschke/typing_extensions/actions/runs/17692936537/job/50288896717#step:7:120
Test from here: https://github.com/python/cpython/blob/main/Lib/test/test_typing.py#L1526
Regex from here (adjusted to also handle typing_extensions): https://github.com/python/cpython/blob/main/Lib/test/test_typing.py#L61