-
Notifications
You must be signed in to change notification settings - Fork 565
Compensate for asyncio changes in Python 3.13.3/3.14 #662
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
Merged
fantix
merged 3 commits into
MagicStack:master
from
cjwatson:asyncio-compensate-task-name
Apr 17, 2025
Merged
Compensate for asyncio changes in Python 3.13.3/3.14 #662
fantix
merged 3 commits into
MagicStack:master
from
cjwatson:asyncio-compensate-task-name
Apr 17, 2025
+8
−5
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
In python/cpython@38a9956 (backported to 3.13 as python/cpython@7b0543e), Python moved the responsibility for setting the task name from `asyncio.create_task` to the `Task` constructor. While `uvloop` itself is unaffected, this causes `test_set_task_name` to fail when run with `asyncio`. Compensate for that in this particular test. It's possible that `uvloop`'s behaviour should be changed to match `asyncio`'s depending on the Python version, but that seems like a more involved change. For now, this at least gets the tests passing again. Most of this analysis and patch were from Martin Hostettler in https://bugs.debian.org/1101258#24; I just tweaked the patch slightly to ensure it still passes on older Python versions.
The test failures seem unrelated to my change. |
I'm testing this together with #658 applied in Fedora. The remaining failures I get are:
|
1st1
approved these changes
Apr 16, 2025
@fantix our CI seem to consistently crash |
This was for Cython 3.0 beta to test with Python 3.13, but it's now breaking our tests with Cython 3.1, while Cython 3.0 stable is out.
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.
In
python/cpython@38a9956 (backported to 3.13 as
python/cpython@7b0543e), Python moved the responsibility for setting the task name from
asyncio.create_task
to theTask
constructor. Whileuvloop
itself is unaffected, this causestest_set_task_name
to fail when run withasyncio
. Compensate for that in this particular test.It's possible that
uvloop
's behaviour should be changed to matchasyncio
's depending on the Python version, but that seems like a more involved change. For now, this at least gets the tests passing again.Most of this analysis and patch were from Martin Hostettler in https://bugs.debian.org/1101258#24; I just tweaked the patch slightly to ensure it still passes on older Python versions.