◐ Shell
reader mode source ↗
Skip to content

gh-140550: Initial implementation of PEP 793 – PyModExport#140556

Merged
encukou merged 87 commits into
python:mainfrom
encukou:modexport-rebased
Nov 5, 2025
Merged

gh-140550: Initial implementation of PEP 793 – PyModExport#140556
encukou merged 87 commits into
python:mainfrom
encukou:modexport-rebased

Conversation

@encukou

@encukou encukou commented Oct 24, 2025

Copy link
Copy Markdown
Member

This adds the initial implementation of PEP-793.
See the issue for follow-up tasks.

89 hidden items Load more…

@encukou encukou left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hide comment

Thank you for the initial review!

Yes, but there's a lot of tests. And I've also renamed things that changed semantics, so unrelated changes/backports will conflict or fail to build, rather than merge cleanly at the Git level but be subtly broken.

@encukou

encukou commented Oct 28, 2025

Copy link
Copy Markdown
Member Author

!buildbot AMD64.FreeBSD.Refleaks

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit 01d52ba 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F140556%2Fmerge

The command will test the builders whose names match following regular expression: AMD64.FreeBSD.Refleaks

The builders matched are:

  • AMD64 FreeBSD Refleaks PR

@encukou

encukou commented Oct 29, 2025

Copy link
Copy Markdown
Member Author

Do you plan to add documentation in a separated PR?

Yes. There's a lot to add since the PEP calls for soft-deprecation of PyInit_; see the issue.

encukou and others added 2 commits November 3, 2025 14:52
Co-authored-by: Kumar Aditya <kumaraditya@python.org>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

LGTM. Just please move _PyModule_GetGCHooks() to pycore_moduleobject.h.

@encukou

encukou commented Nov 5, 2025

Copy link
Copy Markdown
Member Author

Thank you for the review!

Hide details View details @encukou encukou merged commit 589a03a into python:main Nov 5, 2025
46 checks passed
@encukou encukou deleted the modexport-rebased branch November 5, 2025 11:31
@vstinner

vstinner commented Nov 5, 2025

Copy link
Copy Markdown
Member

Congrats :-)

@vstinner

vstinner commented Nov 5, 2025

Copy link
Copy Markdown
Member

make check-limited-abi does now fail on the main branch:

./python -E ./Tools/build/generate-build-details.py `cat pybuilddir.txt`/build-details.json
Checked 115 modules (37 built-in, 77 shared, 1 n/a on linux-x86_64, 0 disabled, 0 missing, 0 failed on import)
./python ./Tools/build/stable_abi.py --all
File /home/vstinner/python/main/Doc/data/stable_abi.dat differs from expected!
--- /home/vstinner/python/main/Doc/data/stable_abi.dat
+++ <expected>
@@ -979,14 +979,6 @@
 type,Py_buffer,3.11,,full-abi
 type,Py_intptr_t,3.2,,
 macro,Py_mod_abi,3.15,,
-macro,Py_mod_doc,3.15,,
-macro,Py_mod_methods,3.15,,
-macro,Py_mod_name,3.15,,
-macro,Py_mod_state_clear,3.15,,
-macro,Py_mod_state_free,3.15,,
-macro,Py_mod_state_size,3.15,,
-macro,Py_mod_state_traverse,3.15,,
-macro,Py_mod_token,3.15,,
 macro,Py_mp_ass_subscript,3.2,,
 macro,Py_mp_length,3.2,,
 macro,Py_mp_subscript,3.2,,

I created #141056 to fix the issue.

@encukou

encukou commented Nov 5, 2025

Copy link
Copy Markdown
Member Author

Thank you!

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…honGH-140556)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
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.

4 participants