This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Got resource warning when running test_base_events (test_asyncio)
Type: resource usage Stage:
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, python-dev, vajrasky
Priority: normal Keywords: patch

Created on 2013-11-14 08:08 by vajrasky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
resource_warning_test_base_events_asyncio.patch vajrasky, 2013-11-14 08:08 review
Messages (3)
msg202820 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-11-14 08:08
$ ./python Lib/test/test_asyncio/test_base_events.py 
............................./home/ethan/Documents/code/python/cpython3.4/Lib/unittest/case.py:158: ResourceWarning: unclosed <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>
  callable_obj(*args, **kwargs)
..............
----------------------------------------------------------------------
Ran 43 tests in 0.219s

OK
sys:1: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 0)>
sys:1: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 0)>
sys:1: ResourceWarning: unclosed <socket.socket fd=9, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 0)>

Attached the patch to close the leak in the test.
msg202867 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-14 18:06
New changeset df50f73f03ca by Guido van Rossum in branch 'default':
asyncio: Avoid ResourceWarning. Fix issue 19580 by Vajrasky Kok.
http://hg.python.org/cpython/rev/df50f73f03ca
msg202868 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-14 18:06
Thanks for the fix!
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63779
2013-11-15 00:04:29vstinnersetstatus: open -> closed
resolution: fixed
2013-11-14 18:06:58gvanrossumsetmessages: + msg202868
2013-11-14 18:06:31python-devsetnosy: + python-dev
messages: + msg202867
2013-11-14 12:07:14pitrousetnosy: + gvanrossum
2013-11-14 08:08:56vajraskycreate