-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Crash msgspec with Python 3.13.* #142671
Copy link
Copy link
Closed as not planned
Labels
3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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)topic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Fields
Give feedbackNo fields configured for issues without a type.
Bug report
Bug description:
The original problem - jcrist/msgspec#960
In Python 3.13
PyObject_GC_Newdoes not do initialization inline values (aka_PyObject_InitInlineValues).In Python 3.14
PyObject_GC_Newdoes initialization inline values - https://github.com/python/cpython/blob/main/Python/gc.c#L2377-L2379Are there any reasons why
PyObject_GC_Newdoesn't do this initialization in Python 3.13?I tried to fix
msgspecby adding a call to the private function_PyObject_InitInlineValues, but this causes other problems.Can you tell me how to fix this place more correctly? I just came up with the idea to make a copy of the
_PyObject_InitInlineValuesfunction inmsgspecfor Python 3.13.CPython versions tested on:
3.13
Operating systems tested on:
Linux