[issue23209] asyncio: break some cycles

2015-01-15 Thread STINNER Victor
STINNER Victor added the comment: I noticed that _ProactorBasePipeTransport doesn't clear its reference to the socket when it is closed. I changed this in the following commit (now merged in Python 3.4 & 3.5): https://code.google.com/p/tulip/source/detail?r=61ce7def97272ab1a6488545dc392160c2fbe

[issue23209] asyncio: break some cycles

2015-01-13 Thread STINNER Victor
STINNER Victor added the comment: I closed the issue #23225, so I'm also closing this issue. Thanks again Martin. -- resolution: -> fixed status: open -> closed ___ Python tracker _

[issue23209] asyncio: break some cycles

2015-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1544bdc409be by Victor Stinner in branch '3.4': Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal https://hg.python.org/cpython/rev/1544bdc409be New changeset 6e7403bc906f by Victor Stinner in branch 'default': Issue #2320

[issue23209] asyncio: break some cycles

2015-01-12 Thread STINNER Victor
STINNER Victor added the comment: I opened the issue #23225 "selectors: raise an exception if the selector is closed" which is a different approach (but it should also fix the reference cycle, I kept the "self._map = None" change). -- ___ Python tra

[issue23209] asyncio: break some cycles

2015-01-12 Thread Martin Richard
Martin Richard added the comment: I updated the selector patch so BaseSelector.get_key() raises KeyError if the mapping is None. All the (non skipped) tests in test_selectors.py passed. Anyway, if there is an other problem with freeing the mapping object (I don't know, maybe "reopening" a loop

[issue23209] asyncio: break some cycles

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Ooops, test_selectors fails because get_key() raises "TypeError: 'NoneType' object is not subscriptable" when the selector is closed. A different fix should be written. I'm now using tox to run the Tulip test suite, I'm surprised that I didn't notice the fail

[issue23209] asyncio: break some cycles

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7438f2e30908 by Victor Stinner in branch '3.4': Issue #23209: Revert change on selectors, test_selectors failed. https://hg.python.org/cpython/rev/7438f2e30908 New changeset 27cbc877447b by Victor Stinner in branch 'default': (Merge 3.4) Issue #2320

[issue23209] asyncio: break some cycles

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Hi Martin, thanks for the patch. It looks good to me. I applied it to Tulip, Python 3.4 and Python 3.5. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue23209] asyncio: break some cycles

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 376c5398f28d by Victor Stinner in branch '3.4': Issue #23209: Break some reference cycles in asyncio. Patch written by Martin https://hg.python.org/cpython/rev/376c5398f28d -- nosy: +python-dev ___ Python

[issue23209] asyncio: break some cycles

2015-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: All three changes look good to me. The selectors.py fix should be applied to CPython first; the others to Tulip first. -- ___ Python tracker

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
Changes by Martin Richard : -- components: +asyncio nosy: +gvanrossum, haypo, yselivanov type: -> performance versions: +Python 3.4 ___ Python tracker ___ __

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
New submission from Martin Richard: Hi, I would like to submit 3 trivial modifications which break a cycle each. It is not much, but those three cycles caused a lot of objects to be garbage collected. They can now be freed using the reference counting mechanism, and therefore, reduce the late