unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.45k stars 688 forks source link

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

Closed xrmx closed 3 weeks ago

xrmx commented 2 months ago

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

Lalufu commented 1 month ago

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 commented 3 weeks ago

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