Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 11, 2023

The _stat C extension is now built with the limited C API.


📚 Documentation preview 📚: https://cpython-previews--110711.org.readthedocs.build/

@vstinner
Copy link
Member Author

@vstinner
Copy link
Member Author

@gpshead
Copy link
Member

gpshead commented Oct 11, 2023

I approved as this seems trivial so "lets do it!", obviously figuring out the windows build excitement in CI needs to happen first.

@vstinner
Copy link
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
Copy link
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 merwok changed the title gh-85283: _stat extension uses the limited C API gh-85283: _stat extension now uses the limited C API Oct 11, 2023
The _stat C extension is now built with the limited C API.
@vstinner vstinner merged commit 88ecb19 into python:main Oct 11, 2023
@vstinner vstinner deleted the limited_stat branch October 11, 2023 22:06
@vstinner
Copy link
Member Author

Merged, thanks for the review @gpshead and @erlend-aasland.

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants