Skip to content

Commit

Permalink
[3.12] gh-106503: asyncio._SelectorSocketTransport: fix cyclic refere…
Browse files Browse the repository at this point in the history
…nce on close(). (GH-106504) (#106514)

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

Co-authored-by: Andrew Geng <pteromys@gmail.com>
  • Loading branch information
miss-islington and pteromys committed Jul 7, 2023
1 parent 5293e01 commit 7e883d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/asyncio/selector_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ def _reset_empty_waiter(self):

def close(self):
self._read_ready_cb = None
self._write_ready = None
super().close()


Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ Marius Gedminas
Jan-Philip Gehrcke
Thomas Gellekum
Gabriel Genellina
Andrew Geng
Philip Georgi
Christos Georgiou
Elazar (אלעזר) Gershuni
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing
``_write_ready`` in ``close``.

0 comments on commit 7e883d7

Please sign in to comment.