-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Add test checking value of a TypedDict's __total__ attribute when there is an assignment in the class body. #130460
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
Conversation
In relation to python#109544 which changed this behavior. Signed-off-by: Daniel Sperber <github.blurry@9ox.net>
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Thanks @Daraan for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…re is an assignment in the class body. (pythonGH-130460) In relation to pythonGH-109544 which changed this behavior. (cherry picked from commit d8ce092) Co-authored-by: Daraan <github.blurry@9ox.net> Signed-off-by: Daniel Sperber <github.blurry@9ox.net>
GH-130462 is a backport of this pull request to the 3.13 branch. |
…hen there is an assignment in the class body. (GH-130460) (#130462) Add test checking value of a TypedDict's __total__ attribute when there is an assignment in the class body. (GH-130460) In relation to GH-109544 which changed this behavior. (cherry picked from commit d8ce092) Signed-off-by: Daniel Sperber <github.blurry@9ox.net> Co-authored-by: Daraan <github.blurry@9ox.net>
#109544 introduced a change in an out of spec usage when a value is assigned to
__total__
in the class body.In such a case the assigned value is currently overwritten. Added a test cast for verification (asked by @JelleZijlstra).
Related comments from
typing_extensions
python/typing_extensions#519 (comment)
python/typing_extensions#519 (comment)