Skip to content

gh-61103: use PEP 3118 codes in the ctypes#149344

Closed
skirpichev wants to merge 3 commits intopython:mainfrom
skirpichev:fix-ctypes-buffer
Closed

gh-61103: use PEP 3118 codes in the ctypes#149344
skirpichev wants to merge 3 commits intopython:mainfrom
skirpichev:fix-ctypes-buffer

Conversation

@skirpichev
Copy link
Copy Markdown
Member

@skirpichev skirpichev commented May 4, 2026

This change only buffer protocol support for complex types, _type_ properties aren't affected.

This change only buffer protocol support for complex types,
`_type_` properties aren't affected.
@skirpichev
Copy link
Copy Markdown
Member Author

@encukou, I think this should fix compatibility with NumPy (buffer protocol). We can decide later what to do with _type_ (use same code or not).

@encukou
Copy link
Copy Markdown
Member

encukou commented May 4, 2026

I'm worried that this is a breaking change relative to Python 3.14.
It should definitely be mentioned in What's New if it gets in.

But, with #148676 this would be redundant.

@skirpichev skirpichev requested a review from AA-Turner as a code owner May 4, 2026 13:02
@read-the-docs-community
Copy link
Copy Markdown

@skirpichev
Copy link
Copy Markdown
Member Author

It should definitely be mentioned in What's New if it gets in.

Done.

But, with #148676 this would be redundant.

(I think merging that pr is a bad idea.)

Though, you are right, my 3 PRs - only an alternative.

@skirpichev skirpichev closed this May 4, 2026
@skirpichev skirpichev deleted the fix-ctypes-buffer branch May 4, 2026 15:09
@vstinner
Copy link
Copy Markdown
Member

vstinner commented May 4, 2026

I merged my PR instead which changes ctypes _type_. This change would be an alternative if we decide later to leave _type_ unchanged and only change the used buffer format.

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.

3 participants