-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 #2836
Comments
Making this the tracking issue for Python 3.12 compatibility. Please post any incompatibilities found here. We probably need to update some dependencies, and add 3.12 testing to our CI. Rarely have any Python updates (other than asyncio loop argument removal) prompted for changes in Sanic itself. |
@ahopkins Is this feature something what is okay to pick up into progress by someone whom isn't part of the core maintainers group ? |
@iAndriy Feel free to hack it, PRs from anyone are welcome here! And core developers are quite overloaded already =) |
A good start would be to just add to the CI, open a PR, mark it as draft and list out all the errors you encountered. First and foremost add it to tox.ini and run the tests.
|
@ahopkins thanks for suggestion |
Some of upstreams libraries used by sanic doesn't support Python 3.12: The failure of test suite for py312 in #2870 is related to errors caused from by CIMultiDict |
This is usually what prevents the upgrade for us.Usually it's uvloop we have to wait for. We can ping @aaugustin to ask when he plans to add 3.12 to websockets. |
websockets works on Python 3.12 without any code changes. There's even Python 3.12 wheels for websockets 12.0 on PyPI. Only the Python 3.12 trove classifier is missing on PyPI. I will add it; however, I believe this metadata is indicative and doesn't affect whether pip & friends will accept to install a library. This shouldn't prevent you from moving forwards. If I'm missing something here and the missing classifier is actually a blocker, then I can do a quick 12.0.1 release just to fix that! |
Thanks @aaugustin! @iAndriy can you take a look? I don't think the lack of classifier would hold us back. |
@aaugustin Thanks for getting back and closing this metadata thing. @ahopkins |
@ahopkins I've updated MR, issues seems to be in the CIMultiDict call flow. For python3.12 the following call results in Segmentation Fault ( see screenshot), nonetheless it works if no kwargs used. |
Experiencing the same issue as @iAndriy Through |
Relevant issue within multidict: aio-libs/multidict#898
@JoeriHermans It seems to work without kwargs passing. |
Bump. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
Currently unable to use Sanic with Python 3.12
Describe the solution you'd like
uvloop 0.18.0 was just released and supports Python 3.12
It'd be great to get support for Python 3.12 on the next release of Sanic along with the 2022.12 LTS release
Additional context
No response
The text was updated successfully, but these errors were encountered: