Skip to content

Conversation

@Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Jan 13, 2026

This uses the infrastructure from #5728 to enable subclassing native types on abi3 for 3.12+.

Closes #1344

@Icxolu Icxolu changed the title enable extending native types on abi3 enable extending native types on abi3 for 3.12+ Jan 13, 2026
@Tpt
Copy link
Contributor

Tpt commented Jan 14, 2026

Thank you so much for this!

Closes #1344

Nit: I am not sure this is fully true. Supporting 3.10+ is likely required to get rid of things like create_exception!

@MatthieuDartiailh
Copy link
Contributor

Out of curiosity will this enable support for subclassing PyList or will extra work be required for this ?

@Icxolu
Copy link
Contributor Author

Icxolu commented Jan 14, 2026

Out of curiosity will this enable support for subclassing PyList or will extra work be required for this ?

Not with this one, but I do have a followup ready which does add support for that after this one.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, just some tiny nits for comments to add, update. Thanks!

@Icxolu
Copy link
Contributor Author

Icxolu commented Jan 14, 2026

Nit: I am not sure this is fully true. Supporting 3.10+ is likely required to get rid of things like create_exception!

It's true that this is not unconditionally, but I think it's still a significant step forward and we can track additional extensions in a new issue.

@Icxolu Icxolu enabled auto-merge January 14, 2026 17:39
@Icxolu Icxolu added this pull request to the merge queue Jan 14, 2026
Merged via the queue into PyO3:main with commit b3fb6aa Jan 14, 2026
43 of 44 checks passed
@Icxolu Icxolu deleted the inherit-abi3 branch January 14, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support subclassing from native types in abi3

4 participants