8000 [3.11] gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842) by miss-islington · Pull Request #92905 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] gh-92841: Fix asy 8000 ncio's RuntimeError: Event loop is closed (GH-92842) #92905

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
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842)
(cherry picked from commit 33880b4)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
  • Loading branch information
arhadthedev authored and miss-islington committed May 17, 2022
commit 2e73d740a533f73afd1a97b647839ab4c4adb10f
2 changes: 1 addition & 1 deletion Lib/asyncio/proactor_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def close(self):
def __del__(self, _warn=warnings.warn):
if self._sock is not None:
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
self.close()
self._sock.close()

def _fatal_error(self, exc, message='Fatal error on pipe transport'):
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:mod:`asyncio` no longer throws ``RuntimeError: Event loop is closed`` on
interpreter exit after asynchronous socket activity. Patch by Oleg Iarygin.
0