-
Notifications
You must be signed in to change notification settings - Fork 691
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
Support for Python 3.12 (assistance required) #2542
Merged
Merged
Conversation
This file contains 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
This is the backtrace when loading the module:
|
Lalufu
force-pushed
the
lalufu/feature-python312
branch
from
July 30, 2023 06:50
8e8cf98
to
9a1bcdf
Compare
Can you just move the |
I'm honestly not sure, the two calls are in different functions that are
called at different stages of module initialization. I don't know enough
about the internals of uwsgi to determine if this would be safe or not.
|
I did a quick test and it seems to work, but a) I don't use uwsgi, and b) this project declares itself in "maintenance" mode. |
Lalufu
force-pushed
the
lalufu/feature-python312
branch
from
September 30, 2023 17:36
9a1bcdf
to
6c937ba
Compare
Thanks for the hint. I've tested this with what projects I have that use
python, and it doesn't seem to blow up in an obvious way so far.
|
xrmx
reviewed
Oct 3, 2023
That should work, too. I wasn't sure what style guide, if any, uwsgi
follows, and tried to change as little as possible.
|
Please also add 3.12 to the ci:
|
From just looking at the diff, I'm not sure this is going to fly.
Python 3.12 has finally deprecated and removed `distutils`, so I'm not
sure there is an appropriate package to be installed? Not familiar with
ubuntu enough and their packaging.
|
Lalufu
force-pushed
the
lalufu/feature-python312
branch
from
October 3, 2023 17:39
6c937ba
to
443328e
Compare
The code compiles, and runs all my (admittedly pretty primitive) web applications. There may still be hidden issues in more complicated scenarios (like threading support).
Lalufu
force-pushed
the
lalufu/feature-python312
branch
from
October 5, 2023 17:39
443328e
to
1881628
Compare
Thanks! |
9 tasks
Won't we need to add 3.12 in trove classifiers as well like following PR: |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Oct 29, 2023
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.
This is an incomplete attemt to support the upcoming Python 3.12. Fedora 39 will ship with this, and has already built a beta release in the tree
With the changes contained in this MR so far, the code compiles against 3.12, but crashes almost immediately upon module load.
The current problem, as far as I can determine, is that
uwsgi_python_init
callsPy_Initialize()
, and laterinit_uwsgi_embedded_module()
tries to callPyImport_AppendInittab()
. As of 3.12, this is no longer allowed (see https://github.com/python/cpython/blob/97a6a418167f1c8bbb014fab813e440b88cf2221/Python/import.c#L1419)