◐ Shell
clean mode source ↗

gh-85283: _stat extension now uses the limited C API by vstinner · Pull Request #110711 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@vstinner

@vstinner vstinner commented

Oct 11, 2023

edited by github-actions Bot

Loading

Copy link Copy Markdown

Member

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


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

@vstinner

Copy link Copy Markdown

Member Author

@gpshead

gpshead commented

Oct 11, 2023

Copy link Copy Markdown

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

Copy link Copy Markdown

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 Copy Markdown

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.

gpshead reacted with hooray emoji

@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 Copy Markdown

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

Reviewers

@gpshead gpshead gpshead approved these changes

@erlend-aasland erlend-aasland erlend-aasland approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner @gpshead @erlend-aasland