[3.12] gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (GH-106504) (#106514)

gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (GH-106504)
(cherry picked from commit 3e5ce7968f)

Co-authored-by: Andrew Geng <pteromys@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-07-07 05:08:22 -07:00 committed by GitHub
parent 5293e01089
commit 7e883d76c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -1202,6 +1202,7 @@ class _SelectorSocketTransport(_SelectorTransport):
def close(self): def close(self):
self._read_ready_cb = None self._read_ready_cb = None
self._write_ready = None
super().close() super().close()

View file

@ -615,6 +615,7 @@ Marius Gedminas
Jan-Philip Gehrcke Jan-Philip Gehrcke
Thomas Gellekum Thomas Gellekum
Gabriel Genellina Gabriel Genellina
Andrew Geng
Philip Georgi Philip Georgi
Christos Georgiou Christos Georgiou
Elazar (אלעזר) Gershuni Elazar (אלעזר) Gershuni

View file

@ -0,0 +1,2 @@
Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing
``_write_ready`` in ``close``.