Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins/python: use PyOS_*Fork stable API functions on 3.7+ #2655

Merged
merged 4 commits into from
Sep 8, 2024

Conversation

xrmx
Copy link
Collaborator

@xrmx xrmx commented Jul 21, 2024

To avoid calling functions made private from 3.13+. And probably fixing issues with C extensions.

xrmx added 2 commits July 21, 2024 15:49
To avoid calling functions made private from 3.13+.
And probably fixing issues with C extensions.
As it should have been since years :_)
@xrmx xrmx force-pushed the drop-pyimport-private-for-modern-python branch 7 times, most recently from c1a3093 to 8d12fa1 Compare July 21, 2024 19:01
xrmx added 2 commits July 21, 2024 21:02
That is still in beta but removed private C APIs we were using.
@xrmx xrmx force-pushed the drop-pyimport-private-for-modern-python branch from 8d12fa1 to d6211dc Compare July 21, 2024 19:03
@Lalufu
Copy link
Contributor

Lalufu commented Aug 14, 2024

I've build some packages for the upcoming Fedora 41 with this (which will ship 3.13 and currently has RC versions), and I can confirm that the code builds, and it so far hasn't blown up with the test cases that I have.

As for the patch itself, may I suggest not nesting the #ifdef statements for 3.12 and 3.13, but make 3.13 a separate section as the other major versions are? I know this leads to a bit more code duplication, as little changes between the two, but it makes it much easier to see what the code/structures look like for different versions.

@xrmx
Copy link
Collaborator Author

xrmx commented Sep 8, 2024

@Lalufu thanks for checking, I'll merge this as is and then we can revise it later.

@xrmx xrmx merged commit 2397c96 into unbit:master Sep 8, 2024
27 checks passed
Lalufu added a commit to Lalufu/uwsgi that referenced this pull request Sep 8, 2024
As mentioned in unbit#2655, this changes
the way support for python 3.13 is handled. Instead of handling python
3.13 as a minor change from 3.12, and handling support for it under the
3.12 `#ifdef` blocks, this breaks out 3.13 into its own block, apart
from 3.12. This makes the code a bit more verbose, but makes it easier
to see what the structures look like for different python versions.
xrmx pushed a commit to xrmx/uwsgi that referenced this pull request Sep 15, 2024
As mentioned in unbit#2655, this changes
the way support for python 3.13 is handled. Instead of handling python
3.13 as a minor change from 3.12, and handling support for it under the
3.12 `#ifdef` blocks, this breaks out 3.13 into its own block, apart
from 3.12. This makes the code a bit more verbose, but makes it easier
to see what the structures look like for different python versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants