Skip to content

PEP 803: Position abi3t as a new variant; use Py_TARGET_ABI3T to select it#4747

Merged
encukou merged 6 commits intopython:mainfrom
encukou:803-separate-abi3
Feb 16, 2026
Merged

PEP 803: Position abi3t as a new variant; use Py_TARGET_ABI3T to select it#4747
encukou merged 6 commits intopython:mainfrom
encukou:803-separate-abi3

Conversation

@encukou
Copy link
Member

@encukou encukou commented Dec 17, 2025

  • Change is either:
    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

📚 Documentation preview 📚: https://pep-previews--4747.org.readthedocs.build/

Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks for this update @encukou. I will comment on DPO with a few thoughts, but while reading thought it'd be useful to notice the textual little things that could be improved - hence this review.

Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
@encukou
Copy link
Member Author

encukou commented Jan 22, 2026

Thank you!

@encukou encukou marked this pull request as ready for review January 22, 2026 14:56
@encukou encukou marked this pull request as draft January 23, 2026 10:14
@encukou encukou changed the title PEP 803: Position abi3t as a new variant; use Py_GIL_DISABLED to select it PEP 803: Position abi3t as a new variant; use Py_TARGET_ABI3T to select it Feb 12, 2026
@encukou
Copy link
Member Author

encukou commented Feb 12, 2026

From more discussion, a new knob called Py_TARGET_ABI3T looks best.

@encukou encukou marked this pull request as ready for review February 12, 2026 14:20
Copy link

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

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

I left a few more comments after my main one.

For what it's worth, I have a branch of PyO3 that compiles with _Py_OPAQUE_PYOBJECT set on the GIL-enabled build. If I also define Py_GIL_DISABLED, then I hit issues in PyO3 internals because PyCriticalSection isn't exposed. I could stub out the critical section wrappers like they're currently stubbed on the GIL-enabled build, but then the resulting extensions won't be safe on the free-threaded build.

The tests run, but I get a segfault early on that I'm still debugging - it may be a CPython bug but it may also be a bug in how I set up _Py_OPAQUE_PYOBJECT support in PyO3. I'm meeting with David Hewitt tomorrow morning to figure that out.

@encukou
Copy link
Member Author

encukou commented Feb 13, 2026

I plan to merge this early next week and update the discussion.
If you have a review in progress, let me know.

@encukou encukou merged commit 01ae9b7 into python:main Feb 16, 2026
5 checks passed
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.

3 participants