[issue21119] asyncio create_connection resource warning

2014-06-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0dd3eb5b5ef by Victor Stinner in branch '3.4':
Issue #21119: asyncio now closes sockets on errors
http://hg.python.org/cpython/rev/d0dd3eb5b5ef

New changeset bbd773ed9584 by Victor Stinner in branch '3.4':
Issue #21119: asyncio: Make sure that socketpair() close sockets on error
http://hg.python.org/cpython/rev/bbd773ed9584

New changeset 8b40483d9a08 by Victor Stinner in branch 'default':
Merge 3.4: Issue #21119, fix ResourceWarning in asyncio
http://hg.python.org/cpython/rev/8b40483d9a08

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-06-03 Thread STINNER Victor

STINNER Victor added the comment:

I fixed the issues in Tulip, Python 3.4 and 3.5. Thanks for the report.

--
resolution: works for me - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-05-28 Thread STINNER Victor

STINNER Victor added the comment:

Can someone review close-3.patch please?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-04-08 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch (close-3.patch) combining create_connection_close.patch  and 
close2.patch and adding unit tests. I also improved the create_connection() 
test to raise the TimeoutError on connect() (loop.sock_connect), not on 
sock.set_blocking().

--
Added file: http://bugs.python.org/file34769/close-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-04-06 Thread Lars Andersson

Lars Andersson added the comment:

Thanks Victor, that fixes my problem.

I've started using tulip/master as part of my project as that also solves other 
issues I have with the default asyncio of python 3.4.0, but hopefully this fix 
will into tulip/master as well as python 3.4.1 / 3.5.

--
resolution:  - works for me

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-04-04 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch for Python 3.5. It should be applied to Python 3.4 too.

--
keywords: +patch
nosy: +gvanrossum, haypo, yselivanov
versions: +Python 3.5
Added file: http://bugs.python.org/file34724/create_connection_close.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-04-04 Thread STINNER Victor

STINNER Victor added the comment:

BaseEventLoop.create_datagram_endpoint() and 
_UnixSelectorEventLoop.create_unix_server() have the same bug.

close2.patch fixes these methods but also modify socketpair() to ensure that 
the 2 sockets are closed on error.

I didn't audit the whole asyncio module.

Note: BaseEventLoop.create_server() uses a different approach: a completed 
flag with a try/finally block.

--
Added file: http://bugs.python.org/file34725/close2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21119] asyncio create_connection resource warning

2014-03-31 Thread Lars Andersson

New submission from Lars Andersson:

The attached code generates an unclosed socket ResourceWarning when timing out 
trying to connect to an unreachable address.

Probably not terribly serious, but in my case, it generates distracting 
warnings during unit testing.

I have looked briefly at the asyncio code but it's not immediately obvious to 
me how to fix it.

--
components: Library (Lib)
files: timeout.py
messages: 215291
nosy: landersson
priority: normal
severity: normal
status: open
title: asyncio create_connection resource warning
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file34689/timeout.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21119
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com