]> granicus.if.org Git - python/commit
bpo-34638: Store a weak reference to stream reader to break strong references loop...
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 12 Sep 2018 18:43:04 +0000 (11:43 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Sep 2018 18:43:04 +0000 (11:43 -0700)
commita5d1eb8d8b7add31b5f5d9bbb31cee1a491b2c08
tree8ffce2f8bcedaea78a0f0eb9c7e1c25f0a32707a
parentaca819fb494d4801b3e5b5b507b17cab772c1b40
bpo-34638: Store a weak reference to stream reader to break strong references loop (GH-9201)

Store a weak reference to stream readerfor breaking strong references

It breaks the strong reference loop between reader and protocol and allows to detect and close the socket if the stream is deleted (garbage collected)
Lib/asyncio/streams.py
Lib/asyncio/subprocess.py
Lib/test/test_asyncio/test_streams.py
Misc/NEWS.d/next/Library/2018-09-12-10-33-44.bpo-34638.xaeZX5.rst [new file with mode: 0644]