Update asyncio library#6601
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (21)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
fanninpm
left a comment
There was a problem hiding this comment.
Please rebase this branch on a fresh copy of main, then note the following little changes.
This PR also contains a "rider". At RustPython, we prefer to keep our PRs limited in scope, so you don't have to slog through 58 separate review comments.
Sorry, something went wrong.
|
@fanninpm thanks for all the comments! I'll go through them, and resolve them! (Also hope you had a great New Year + Happy Holiday season!) Could you also clarify what you mean by rider (I could not understand from the wikipedia link, and didn't find anything online). Do you mean the dual function of updating the library + adding the tests? (And if so, how would you suggest proceeding? Opening a new PR/closing this one?) |
Sorry, something went wrong.
e5c9bfc to
f53db35
Compare
January 2, 2026 22:53
|
@fanninpm, nevermind, I see what you mean 😓 I completely did not realize that unrelated commits had came with this PR. Thanks for catching it! |
Sorry, something went wrong.
|
@fanninpm everything should be good; I've made the formatting changes. As a clarification, I found some of the tests were automatically skipped in RustPython, but were running fine on CPython. The reason is commented below each instance of this occurring |
Sorry, something went wrong.
There was a problem hiding this comment.
Moral of the story: Don't skip any tests you don't have to skip. Most of the time, marking it as an expected failure will work and will let someone know that they totally accidentally made a test now pass.
Skipping a test should only be done if RustPython panics or hangs or if a test is flaky. Commenting out a test should only be done only in the extremest of circumstances: e.g., the test raises a syntax error in RustPython.
Sorry, something went wrong.
|
@fanninpm For all the CPython specific tests, If I don't add the explicit skip, it still skips, but for a different reason (for example if I remove the skip in I figured better to be thorough and add the explicit skip, so when "TODO: RustPython" is searched, it shows up. Let me know if you want me to remove it |
Sorry, something went wrong.
Does the
It might be better to just leave a comment, rather than a |
Sorry, something went wrong.
No it does not
Ok, I'll make the changes |
Sorry, something went wrong.
|
@fanninpm Made all changes! I was able to change all the skips into expectedFailures (/removed the ones in test_tasks), and I removed all the CPython skips. Please let me know if there is anything else I should fix (assuming the tests all pass)! |
Sorry, something went wrong.
fe90bee to
56be451
Compare
January 5, 2026 18:13
|
Re: the CPython specific tests, should I also add an issue for those? |
Sorry, something went wrong.
|
As an update, I've narrowed down the hang to an issue in the wait method of the Condition class. I think it's an issue with the AST generation? (but not 100%) The test that is failing is Whereas in CPython, the program is supposed to go from F) to G), RustPython instead goes from F) to B), re-entering the final statement again (reaquiring the lock again at C), reaching a deadlock state, and hanging. |
Sorry, something went wrong.
|
Thanks! That looks like a compiler bug. Is it possible to create a minimal reproducible script? 'the C _asyncio module' is a c module but probably not a CPython specific feature. We just need to implement it later. Though we usually prefer to update asyncio and test_asyncio at the same time, test_asyncio anyway even didn't exist in RustPython. Let's split this PR to 2 parts. Upgrade asyncio first, and see what's happening to other libraries. Currently it is not able to check because test_asyncio is hanging and other tests are not running. If no problem, asyncio will be merged. Then let's try to add test_asyncio again. It will take time due to the compiler problem |
Sorry, something went wrong.
56be451 to
ead7e0c
Compare
January 6, 2026 05:07
I'll work on getting something reproducible! In the meantime, Reopening this PR (Force pushing accidentally closed the issue) |
Sorry, something went wrong.
c7c7175 to
eba0a63
Compare
January 6, 2026 05:13
|
Great! Failing test is unexpected success |
Sorry, something went wrong.
Is it certain that this is not a fluke? |
Sorry, something went wrong.
|
usually not when 3 CI envs agree on |
Sorry, something went wrong.
|
@terryluan12 could you remove expectedFailure marker from the successful one? |
Sorry, something went wrong.
|
@youknowone @fanninpm It seems |
Sorry, something went wrong.
|
@terryluan12 If you can find out what test is the cause, mark it as |
Sorry, something went wrong.
|
Sounds good. I'm looking right now. I think I found it, but just need to confirm |
Sorry, something went wrong.
youknowone
left a comment
There was a problem hiding this comment.
Adding information "random" is important. Otherwise another patch will remove the line, and watching CI passes just like now without patch, and then the CI will hang again
Sorry, something went wrong.
|
Sounds good! In terms of |
Sorry, something went wrong.
|
Lol, okay, this is so hacked together. Thoughts @youknowone @fanninpm ? (I annotated the lines added, but they will not be on the final commit) |
Sorry, something went wrong.
|
We usually don't edit the inside of test without a good reason. Because editing inside increase the cost of updating the test to a new version. Is this test critical enough to enable by editing test code? Otherwise marking the entire test expectedFailure is more desired. |
Sorry, something went wrong.
I'm not sure what's meant by criticality, but the main issue is that these tests are run/created dynamically. So this test is used for the WithProcessesTestManagerRestart, WithThreadsTestManagerRestart, and WithManagerTestManagerRestart test classes. As a result, if it's marked expectedFailure, then it will be expectedFailure for all three test classes; but the issue is that it succeeds for two out of the three classes, so no matter what, tests will fail |
Sorry, something went wrong.
|
You can create an override of the method in the subclass |
Sorry, something went wrong.
|
Code has been automatically formatted The code in this PR has been formatted using git pull origin update_asyncio |
Sorry, something went wrong.
f2146f8 to
6281a3b
Compare
January 10, 2026 16:26
763b0ad to
ccb382f
Compare
January 10, 2026 21:16
|
Could you please rebase this branch on a fresh copy of |
Sorry, something went wrong.
|
This must be almost done. Could you rebase this one to the main? |
Sorry, something went wrong.
3615b3f to
f37485f
Compare
January 15, 2026 00:56
|
I believe the failure in the ubuntu CI, is the same issue as #6716. Other than that, this should be good to rereview! |
Sorry, something went wrong.
f37485f to
32d8e6c
Compare
January 15, 2026 05:49
youknowone
left a comment
There was a problem hiding this comment.
Thank you!
Sorry, something went wrong.
c5deb74
into
RustPython:main
Jan 15, 2026
Notes:
test_server.py,test_proactor_events.py,test_buffered_proto.py,test_sslproto.py,test_subprocess.py(kinda), andtest_windows_events.pyandtest_windows_utils.pytest_ssl.TestSSL.test_create_server_ssl_1andtest_ssl.TestSSL.test_create_server_ssl_over_ssldue to lack of memorytest_subprocess.pyandtest_events.py