gh-127529: Correct asyncio.selector_events.BaseSelectorEventLoop._accept_connection's behaviour for handling ConnectionAbortedError#127532
Conversation
…tLoop._accept_connection's behaviour for handling ConnectionAbortedError
|
Force pushes to correct typo / my suckiness at reStructuredText |
|
@1st1 @asvetlov @kumaraditya303 @willingc Trivial PR to review + merge before the new year / before it fades out of memory? 🚀 |
|
You need to add tests for this. |
…abortederror to test graceful handling of ConnectionAbortedError
|
Hi @kumaraditya303 , thanks for the reply! I've added a test to |
Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst
Outdated
Show resolved
Hide resolved
…handling `ConnectionAbortedError` (python#127532) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
…handling `ConnectionAbortedError` (python#127532) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
@kumaraditya303 don't we want to backport this to 3.13? WDYT? |
|
@kumaraditya303 I think we still need to backport this, right? Looks like it is blocking the 3.13 backport of #134392 |
|
Thanks @jb2170 for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…handling `ConnectionAbortedError` (pythonGH-127532) (cherry picked from commit 830e106) Co-authored-by: jb2170 <email@jb2170.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
GH-142738 is a backport of this pull request to the 3.13 branch. |
Thanks for the reminder, I'll get this and the other one backported. |
Closes #127529
All good to go.
ConnectionAbortedErrornowcontinues instead ofreturning. Improves OpenBSD performance. Full writeup in the issue.I've left
InterruptedErrorgrouped withBlockingIOErrorto bothreturnearly, instead ofInterruptedErrorcontinueing andBlockingIOErrorreturning. PEP-475 should makeInterruptedErrornever appear right, but hey if it's not broken don't fix it. Best to play it safe with the urgency of signals, especially as asyncio uses them for a wakeup fd.BaseSelectorEventLoop._accept_connectionreturns when it shouldcontinueonConnectionAbortedError#127529