[issue27500] ProactorEventLoop cannot open connection to ::1
Sebastien Bourdeauducq added the comment: Thank you! -- ___ Python tracker <https://bugs.python.org/issue27500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type
Sebastien Bourdeauducq added the comment: Windows looks fine. -- ___ Python tracker <https://bugs.python.org/issue33678> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type
New submission from Sebastien Bourdeauducq : The current behavior causes an exception to be raised when trying to create a datagram socket and _ipaddr_info returns None (since asyncio then calls loop.getaddrinfo with SOCK_STREAM and IPPROTO_UDP). Preserving socket type is made difficult by https://bugs.python.org/issue21327; the proposed patch includes a dirty workaround. I do not know yet if it works on Windows. --- selector_events.py 2018-05-11 10:01:42.011164837 +0800 +++ selector_events.py.new 2018-05-29 17:41:03.103155480 +0800 @@ -439,8 +439,9 @@ raise ValueError("the socket must be non-blocking") if not hasattr(socket, 'AF_UNIX') or sock.family != socket.AF_UNIX: +socktype = sock.type & 0xf # WA https://bugs.python.org/issue21327 resolved = base_events._ensure_resolved( -address, family=sock.family, proto=sock.proto, loop=self) +address, family=sock.family, type=socktype, proto=sock.proto, loop=self) if not resolved.done(): yield from resolved _, _, _, _, address = resolved.result()[0] -- components: asyncio messages: 318001 nosy: asvetlov, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type type: behavior versions: Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue33678> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27500] ProactorEventLoop cannot open connection to ::1
Sebastien Bourdeauducq added the comment: Any chance someone could look into this bug? -- ___ Python tracker <https://bugs.python.org/issue27500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27500] ProactorEventLoop cannot open connection to ::1
Sebastien Bourdeauducq added the comment: This is still a problem with Python 3.5.3 and 3.6.0. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27500] ProactorEventLoop cannot open connection to ::1
Sebastien Bourdeauducq added the comment: The first offending commit is this one: https://github.com/python/cpython/commit/03df54d549173e17e1cf9a767199de32a363aa6b more specifically "return af, type, proto, '', (host, port)". For IPv6, it should be "(host, port, flow info, scope id)" instead of just "(host, port)". -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27500] ProactorEventLoop cannot open connection to ::1
New submission from Sebastien Bourdeauducq: The following code fails with "OSError: [WinError 10022] An invalid argument was supplied". import asyncio loop = asyncio.ProactorEventLoop() asyncio.set_event_loop(loop) loop.run_until_complete(asyncio.open_connection("::1", 4242)) This is a regression in 3.5.2. 3.5.1 does not have this bug. Connecting to 127.0.0.1 does not cause the problem. -- components: asyncio messages: 270258 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: ProactorEventLoop cannot open connection to ::1 versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26890] inspect.getsource gets source copy on disk even when module has not been reloaded
New submission from Sebastien Bourdeauducq: The fix of https://bugs.python.org/issue1218234 is a bit zealous. If the module has not been reloaded, e.g. calling a function will execute code older than what inspect.getsource returns. -- components: Library (Lib) messages: 264538 nosy: sebastien.bourdeauducq priority: normal severity: normal status: open title: inspect.getsource gets source copy on disk even when module has not been reloaded versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26890> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26509] spurious ConnectionAbortedError logged on Windows
Sebastien Bourdeauducq added the comment: Can someone please commit the patch? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26509> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26509] spurious ConnectionAbortedError logged on Windows
Sebastien Bourdeauducq added the comment: Tested it, that works, thanks! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26509> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26509] spurious ConnectionAbortedError logged on Windows
Sebastien Bourdeauducq added the comment: Your patch seems to miss the ``_fatal_error`` method in ``proactor_events.py`` (which is actually where the bug happens in my application - it's using ``ProactorEventLoop``). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26509> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26509] spurious ConnectionAbortedError logged on Windows
New submission from Sebastien Bourdeauducq: https://github.com/python/asyncio/issues/319 On Windows, asyncio servers sometimes print such log messages when clients disconnect: ``` ERROR:master:asyncio:Fatal write error on pipe transport protocol: transport: <_ProactorSocketTransport fd=756> Traceback (most recent call last): File "C:\Users\User\Miniconda3\lib\asyncio\proactor_events.py", line 283, in _loop_writing self._write_fut = self._loop._proactor.send(self._sock, data) File "C:\Users\User\Miniconda3\lib\asyncio\windows_events.py", line 450, in send ov.WSASend(conn.fileno(), buf, flags) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software on your host machine. ``` I guess that this line: https://github.com/python/asyncio/blob/39c135baf73762830148236da622787052efba19/asyncio/proactor_events.py#L291 should be changed to also catch ``ConnectionAbortedError``, as this exception also happens when connections are closed on Windows, in addition to ``ConnectionResetError``. -- components: asyncio messages: 261321 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: spurious ConnectionAbortedError logged on Windows versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26509> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26338] remove duplicate bind addresses in create_server
Sebastien Bourdeauducq added the comment: Can someone have a quick look at this please? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26338> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26338] remove duplicate bind addresses in create_server
New submission from Sebastien Bourdeauducq: https://github.com/python/asyncio/issues/315 New patch attached. -- components: asyncio files: asyncio_norebind.diff keywords: patch messages: 260108 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: remove duplicate bind addresses in create_server versions: Python 3.5 Added file: http://bugs.python.org/file41898/asyncio_norebind.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26338> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25441] StreamWriter.drain() unreliably reports closed sockets
New submission from Sebastien Bourdeauducq: 1. Open a listening socket: $ nc6 -l -p 1066 2. Run the following (tested here on Linux): import asyncio async def bug(): reader, writer = await asyncio.open_connection("::1", "1066") while True: writer.write("foo\n".encode()) await writer.drain() # Uncommenting this makes drain() raise BrokenPipeError # when the server closes the connection. #await asyncio.sleep(0.1) loop = asyncio.get_event_loop() loop.run_until_complete(bug()) 3. Terminate netcat with Ctrl-C. The program will go on a endless loop of "socket.send() raised exception." as writer.drain() fails to raise an exception to report the closed connection. Reducing the output rate of the program by using asyncio.sleep causes writer.drain() to raise BrokenPipeError (and shouldn't it be ConnectionResetError?) -- components: asyncio messages: 253181 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: StreamWriter.drain() unreliably reports closed sockets versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25441] StreamWriter.drain() unreliably reports closed sockets
Sebastien Bourdeauducq added the comment: Yes, this patch fixes the problem (in both this example and my real application). Thanks! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23630] support multiple hosts in create_server/start_server
New submission from Sebastien Bourdeauducq: I would like to be able to bind asyncio TCP servers to an arbitrary list of hosts, not just either one host or all interfaces. I propose that the host parameter of create_server and start_server can be a list of strings that describes each host. Sockets are created for the set of all addresses of all specified hosts. The list may also contain None, or the empty string, in which case all interfaces are assumed. If a string or None is passed directly, the behavior is unchanged - so this should not break compatibility. I can submit a patch if this feature is approved. -- components: asyncio messages: 237791 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: support multiple hosts in create_server/start_server type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23630 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23630] support multiple hosts in create_server/start_server
Sebastien Bourdeauducq added the comment: That could work, but I would have to manually resolve and filter the lists of hostnames so that the program does not attempt to bind the same address twice - something that is better implemented in create_server, which already does the hostname resolution. Additionally, the asyncio Server internally supports listening on multiple sockets, and that would be the right feature to use for implementing this instead of creating and managing multiple servers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23630 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23630] support multiple hosts in create_server/start_server
Sebastien Bourdeauducq added the comment: See attached. -- keywords: +patch Added file: http://bugs.python.org/file38428/asyncio_multibind.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23630 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com