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: test_asyncio: unclosed sockets
Type: resource usage Stage: resolved
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, pitrou, python-dev, skrah, vajrasky
Priority: normal Keywords: patch

Created on 2013-10-19 13:49 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
close_httpd_server_in_asyncio_test_utils.patch vajrasky, 2013-10-19 14:26 review
Messages (9)
msg200417 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-19 13:49
unittest produces the following resource warnings:

$ ./python -m test -uall test_asyncio
[1/1] test_asyncio
/home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 49177)>
  testMethod()
/home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 56385)>
  testMethod()
/home/stefan/hg/master/Lib/unittest/case.py:571: ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 56244)>
  testMethod()
[...]


It seems to happen whenever run_test_server() from asyncio/test_utils.py is
used.
msg200422 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-10-19 14:26
Attached the patch to fix the resource warning problem.
msg200431 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-10-19 16:08
I noticed this previously and was told it wasn't very important. Can I delay the fix until after the alpha 4 release?
msg200434 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-19 16:18
Yes, the fix can certainly be delayed -- it's just a minor thing that's
as little distracting.
msg200628 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-20 20:11
Since the alpha appears to have been delayed, I think it would be good to commit.
msg200634 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-10-20 21:01
Is there a patch yet?

--Guido van Rossum (sent from Android phone)
On Oct 20, 2013 1:11 PM, "Antoine Pitrou" <report@bugs.python.org> wrote:

>
> Antoine Pitrou added the comment:
>
> Since the alpha appears to have been delayed, I think it would be good to
> commit.
>
> ----------
> nosy: +pitrou
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue19297>
> _______________________________________
>
msg200637 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-20 21:06
Yes, there is one :)
msg200639 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-10-20 21:22
OK, commit it.

--Guido van Rossum (sent from Android phone)
On Oct 20, 2013 2:06 PM, "Antoine Pitrou" <report@bugs.python.org> wrote:

>
> Antoine Pitrou added the comment:
>
> Yes, there is one :)
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue19297>
> _______________________________________
>
msg200641 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-20 21:26
New changeset 8ad3e9cf9590 by Antoine Pitrou in branch 'default':
Close #19297: fix resource warnings in test_asyncio.  Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/8ad3e9cf9590
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63496
2013-10-20 21:26:29python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg200641

resolution: fixed
stage: patch review -> resolved
2013-10-20 21:22:56gvanrossumsetmessages: + msg200639
2013-10-20 21:06:11pitrousetmessages: + msg200637
2013-10-20 21:01:24gvanrossumsetmessages: + msg200634
2013-10-20 20:11:07pitrousetnosy: + pitrou
messages: + msg200628
2013-10-19 16:18:20skrahsetmessages: + msg200434
2013-10-19 16:08:19gvanrossumsetmessages: + msg200431
2013-10-19 14:56:38pitrousetnosy: + gvanrossum

type: resource usage
stage: patch review
2013-10-19 14:26:28vajraskysetfiles: + close_httpd_server_in_asyncio_test_utils.patch

nosy: + vajrasky
messages: + msg200422

keywords: + patch
2013-10-19 13:49:32skrahcreate