Victor Stinner
Victor Stinner
Python 3.12 and main branches are affected (Python 3.11 and older are not affected). I can reproduce the issue on Linux with the script: ```py import subprocess program = r"Programs/_testembed"...
The error occurs when the `_ctypes` extension is imported the second time, so when `PyCData_Type` type is initialized for the second time by PyType_Ready(): ``` (...) #4 0x00007ffff7d1bc57 in __assert_fail...
> @encukou landed https://github.com/python/cpython/pull/116458, which also fixes this issue IIUC. Let's close it as resolved. Well, it is fixed in 3.13, but not in 3.12. Correct me if I'm wrong....
Attached PR gh-116937 implements the change.
The function was added by issue gh-90771.
> It can be implemented using only limited API I don't think that it's possible in practice. For example, Python 3.13 adds BEGIN_TYPE_LOCK() with `_PyCriticalSection` which is not part of...
@encukou: > I'll be interested in what other members of the C-API WG have to say. Ok, I created issue https://github.com/capi-workgroup/decisions/issues/20.
> Ok, I created issue https://github.com/capi-workgroup/decisions/issues/20. The C API Working Group approved this addition: https://github.com/capi-workgroup/decisions/issues/20.
Implemented in change https://github.com/python/cpython/commit/507896d97dcff2d7999efa264b29d9003c525c49
I would prefer to keep the default output short and readable. But why not adding more columns/lines if you pass an option. The option could be a list of metadata...