-
-
Notifications
You must be signed in to change notification settings - Fork 36.5k
Python 3.13.0a3 metaclass __call__ runs only once #114806
Copy link
Copy link
Closed
Labels
3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
Metaclass
__call__is expected to run everytime a class is instantiated but in Python 3.13 it only run once.Minimal reproducer:
On python 3.12, the output is:
On python 3.13 (docker image
3.13.0a3-bullseye), the output is unexpectedly:CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Linked PRs