-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
The function object has a number of settable attributes. For the following, setting the value calls _PyFunction_SetVersion(op, 0)
:
__defaults__
__kwdefaults__
__code__
__annotations__
But for the following, there is no such call:
__dict__
__name__
__qualname__
__type_params__
I don't think any of these four should affect the interpreter loop, but neither should __annotations__
. Should these setters also set the version for consistency, or should __annotations__
not set it as changing the annotations shouldn't affect the runtime?
cc @markshannon who added this in #27078.
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error