Skip to content

gh-103092: Isolate _ctypes, part 1 - #103893

Merged
erlend-aasland merged 9 commits into
python:mainfrom
erlend-aasland:isolate-ctypes/part1
Apr 27, 2023
Merged

gh-103092: Isolate _ctypes, part 1#103893
erlend-aasland merged 9 commits into
python:mainfrom
erlend-aasland:isolate-ctypes/part1

Conversation

@erlend-aasland

@erlend-aaslanderlend-aasland commented Apr 26, 2023

Copy link
Copy Markdown
Contributor

Low-hanging fruit: port the easy types

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

Copy link
Copy Markdown

🤖 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-botbedevere-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:mainApr 27, 2023
@erlend-aasland
erlend-aasland deleted the isolate-ctypes/part1 branch April 27, 2023 12:57
@swt2c

Copy link
Copy Markdown

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

erlend-aasland commented Jul 18, 2023

Copy link
Copy Markdown
ContributorAuthor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@erlend-aasland@bedevere-bot@swt2c@kumaraditya303