-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Fix __annotations__ getters and setters in type and module #106719
Comments
serhiy-storchaka
added
type-bug
An unexpected behavior, bug, or error
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
labels
Jul 13, 2023
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 13, 2023
…d module types No longer suppress arbitrary errors. Simplify the code.
terryjreedy
changed the title
Fix __annotations__ getters and setters in type and module
Fix Jul 14, 2023
__annotations__
getters and setters in type and module
terryjreedy
changed the title
Fix
Fix __annotations__ getters and setters in type and module
Jul 14, 2023
__annotations__
getters and setters in type and module
serhiy-storchaka
added a commit
that referenced
this issue
Jul 18, 2023
…le types (GH-106720) No longer suppress arbitrary errors. Simplify the code.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 18, 2023
…d module types (pythonGH-106720) No longer suppress arbitrary errors. Simplify the code. (cherry picked from commit e1c295e) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 18, 2023
…type and module types (pythonGH-106720) No longer suppress arbitrary errors. Simplify the code.. (cherry picked from commit e1c295e) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are several issues in the code of
__annotations__
getters and setters intype
andmodule
types.PyDict_Contains()
returns -1 on error. The code interprets it as a positive answer.PyDict_Contains()
is not needed in all these cases at first place. Just try to get or delete an attribute and analyze the result.module.__dict__
(including MemoryError and KeyboardInterrupt) are replaced with a TypeError.Linked PRs
The text was updated successfully, but these errors were encountered: