py-call-osafterfork isn't needed in python 3.13+ - #2736
Draft
duzumaki wants to merge 1 commit into
Draft
Conversation
duzumaki
force-pushed
the
no_double_unlock_pls
branch
from
September 15, 2025 12:58
80072e0 to
491f782
Compare
duzumaki
force-pushed
the
no_double_unlock_pls
branch
2 times, most recently
from
September 15, 2025 13:21
1f9a875 to
e223990
Compare
…on already alreases the lock after the fork
duzumaki
force-pushed
the
no_double_unlock_pls
branch
from
September 15, 2025 13:22
e223990 to
cb2a437
Compare
xrmx
reviewed
Sep 21, 2025
xrmx
left a comment
Collaborator
There was a problem hiding this comment.
Is there a reason the PR is in draft?
| PyOS_AfterFork_Child(); | ||
| #endif | ||
| } | ||
| #if PY_VERSION_HEX < 0x030D0000 |
Collaborator
There was a problem hiding this comment.
Please move preprocessor directives to column 0, also you can use #ifdef UWSGI_PY313
| if (!up.call_uwsgi_fork_hooks && up.call_osafterfork) { | ||
| // before python 3.7 | ||
| #ifdef HAS_NOT_PYOS_FORK_STABLE_API | ||
| PyOS_AfterFork(); |
Collaborator
There was a problem hiding this comment.
looks like there's one tab too much
|
We also encountered this issue when updating Python to version 3.13. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2710
in 3.13, there's a new mutex type that now cares if the mutex is unlocked while not currently locked
A warning should be emitted to advise to use
py-call-uwsgi-fork-hooksif running against 3.13 (+ a doc update that suggests to usepy-call-uwsgi-fork-hooksoverpy-call-osafterforksince maintainers want to support py-call-osafterfork for LTS reasons, my suggestion would be to just remove
py-call-osafterforkentirely otherwise