gh-85283: _stat extension now uses the limited C API by vstinner · Pull Request #110711 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Merged
Merged
Conversation
Member
The _stat C extension is now built with the limited C API.
📚 Documentation preview 📚: https://cpython-previews--110711.org.readthedocs.build/
bedevere-app
Bot
added
the
awaiting review
label
bedevere-app
Bot
mentioned this pull request
vstinner
commented
Oct 11, 2023
vstinner commented
Member Author
- Discussion: https://discuss.python.org/t/use-the-limited-c-api-for-some-of-our-stdlib-c-extensions/32465
- Previous attempt at the end of August: PR gh-85283: _stat extension uses the limited C API #108573
vstinner
commented
Oct 11, 2023
vstinner commented
Member Author
gpshead
approved these changes
bedevere-app
Bot
added
awaiting core review
and removed
awaiting review
labels
gpshead
commented
Oct 11, 2023
gpshead commented
Member
I approved as this seems trivial so "lets do it!", obviously figuring out the windows build excitement in CI needs to happen first.
vstinner
commented
Oct 11, 2023
vstinner commented
Member Author
What's going on? Now Windows build fails with:
LINK : fatal error LNK1104: cannot open file 'python313_d.lib' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
vstinner
commented
Oct 11, 2023
vstinner commented
Member Author
LINK : fatal error LNK1104: cannot open file 'python313_d.lib' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
Ok, I found the root issue and wrote a fix: PR gh-110725. The problem comes from PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros which have a different implementation depending if the 3 Py_BUILD_CORE macros are defined or not.
merwok
changed the title
gh-85283: _stat extension uses the limited C API
gh-85283: _stat extension now uses the limited C API
The _stat C extension is now built with the limited C API.
vstinner
force-pushed
the
limited_stat
branch
from
052d021 to
a0cc4f5
Compare
erlend-aasland
approved these changes
vstinner
merged commit
88ecb19
into
python:main
vstinner
deleted the
limited_stat
branch
bedevere-app
Bot
removed
the
awaiting core review
label
vstinner
commented
Oct 12, 2023
vstinner commented
Member Author
Merged, thanks for the review @gpshead and @erlend-aasland.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request
…0711) pythongh-85283: _stat extension uses the limited C API The _stat C extension is now built with the limited C API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment