◐ Shell
reader mode source ↗
Skip to content

gh-141671: PyMODINIT_FUNC: apply __declspec(dllexport) on Windows#141672

Merged
encukou merged 11 commits into
python:mainfrom
encukou:pymodexport-always-export
Jan 7, 2026
Merged

gh-141671: PyMODINIT_FUNC: apply __declspec(dllexport) on Windows#141672
encukou merged 11 commits into
python:mainfrom
encukou:pymodexport-always-export

Conversation

@encukou

@encukou encukou commented Nov 17, 2025

Copy link
Copy Markdown
Member

@encukou

encukou commented Nov 17, 2025

Copy link
Copy Markdown
Member Author

cc @jaraco / @pfmoore: what are your thoughts on removing /EXPORT from setuptools/distutils on Python 3.15+?

@pfmoore

pfmoore commented Nov 17, 2025

Copy link
Copy Markdown
Member

TBH, I have no view. My knowledge of C is very out of date, so I wouldn't trust anything I might say anyway...

@da-woods

da-woods commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

The /EXPORT from setuptools has definitely caused Cython an amount of pain before (although some of that was self-inflicted....). It'd be nice not to have to define PyInit_ just to to make the name exist. Although I suspect we can't really avoid it in a realistic timeline.

(Edit: admittedly we also aren't the people that it's designed to help either)

@encukou

encukou commented Dec 16, 2025

Copy link
Copy Markdown
Member Author

Here's a version that removes some redundant defines (setting things to defaults).

@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. This change mostly moves code around, and just add __declspec(dllexport) on Windows.

@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2025
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit 5091b79 🤖

Results will be shown at:

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

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2025
Hide details View details @encukou encukou merged commit 8565ddd into python:main Jan 7, 2026
46 checks passed
@encukou encukou deleted the pymodexport-always-export branch January 7, 2026 12:09
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.

8 participants