gh-103092: Isolate _ctypes, part 1 by erlend-aasland · Pull Request #103893 · python/cpython
🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit a276753 🤖
If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.
Hi @erlend-aasland, as part of this, it seems that CArgObject moved from builtins to _ctypes. Just confirming that was intentional?
3.11:
>>> import ctypes
>>> type(ctypes.byref(ctypes.c_int(0)))
<class 'CArgObject'>
3.12
>>> import ctypes
>>> type(ctypes.byref(ctypes.c_int(0)))
<class '_ctypes.CArgObject'>
CArgsObject still belongs to ctypes, just as it does in 3.11. What changed was its fully qualified name only. That change is deliberate because it is needed to be able to look up the module the heap type belongs to.
EDIT: Thinking about it, I think the last sentence I wrote above is not right; I'm pretty sure module lookup would work anyways (but I don't intend to pursue this right now).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters