Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-103092: Isolate _ctypes, part 1 #103893

Merged
merged 9 commits into from
Apr 27, 2023

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Apr 26, 2023

Low-hanging fruit: port the easy types

@erlend-aasland erlend-aasland added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 27, 2023
@bedevere-bot
Copy link

🤖 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.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Apr 27, 2023
@erlend-aasland erlend-aasland merged commit e9c7772 into python:main Apr 27, 2023
@erlend-aasland erlend-aasland deleted the isolate-ctypes/part1 branch April 27, 2023 12:57
@swt2c
Copy link

swt2c commented Jul 18, 2023

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'>

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jul 18, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants