Skip to content

Fix binary wheel build for Python 3.14#267

Merged
gmloose merged 3 commits intomasterfrom
RAP-1254_fix-binary-wheel-build-for-python314
Nov 3, 2025
Merged

Fix binary wheel build for Python 3.14#267
gmloose merged 3 commits intomasterfrom
RAP-1254_fix-binary-wheel-build-for-python314

Conversation

@gmloose
Copy link
Collaborator

@gmloose gmloose commented Oct 30, 2025

In Python 3.14, the default method that multiprocessing uses to start a process on POSIX platforms changed from fork to forkserver. We cannot use forkserver, unless we restructure our code, so we need to explicitly set the start method to fork when running on Linux using Python 3.14 or later.

Fixes #265

In Python 3.14, the default method that `multiprocessing` uses to start a process on POSIX platforms changed from `fork` to `forkserver`.
We cannot use `forkserver`, unless we restructure our code, so we need to explicitly set the start method to `fork` when running on Linux using Python 3.14 or later.
@gmloose gmloose self-assigned this Oct 30, 2025
@gmloose gmloose requested a review from darafferty October 30, 2025 17:10
Copy link
Collaborator

@darafferty darafferty left a comment

Choose a reason for hiding this comment

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

Looks good -- nice that the fix was so simple.

@gmloose
Copy link
Collaborator Author

gmloose commented Oct 30, 2025

I was wondering. There are now two cases in which we basically enforce the use of fork as start method, by overriding a different default. Apparently, we need to use fork. Is there a reason why we do not do this unconditionally?

@darafferty
Copy link
Collaborator

Yes, good point. It would be simpler just to set it always to fork.

@gmloose
Copy link
Collaborator Author

gmloose commented Nov 3, 2025

I changed the code to always use fork.

@gmloose gmloose requested a review from darafferty November 3, 2025 10:40
Copy link
Collaborator

@darafferty darafferty left a comment

Choose a reason for hiding this comment

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

Looks good.

@gmloose gmloose merged commit 8b33037 into master Nov 3, 2025
1 check passed
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.

Cannot build binary wheel for Python 3.14

2 participants