[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

You are welcome, Victor!

Thank you very much, Adam!

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-28 Thread STINNER Victor


STINNER Victor  added the comment:

I planned to ask you (Adam and Andrew) to merge the PR even if it's not 
finished, just to make sure that UDP support will land into Python 3.8. But 
Andrew finished the PR, yahoo!

Thanks you very much Adam Meily and Andrew Svetlov! Sorry, I planned to do what 
Andrew did: "finish" the PR, but I was just too busy on other things :-(

Well done, I see that you fixed max_size, pause/resume protocol, etc.

asyncio on Windows will be much better experience with IOCP by default, CTRL+c 
support, UDP support, etc.

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-28 Thread miss-islington


miss-islington  added the comment:


New changeset bafd4b5ac83b6cc0b7455290a04c4bfad34bdc90 by Miss Islington (bot) 
(Andrew Svetlov) in branch 'master':
bpo-29883: Asyncio proactor udp (GH-13440)
https://github.com/python/cpython/commit/bafd4b5ac83b6cc0b7455290a04c4bfad34bdc90


--
nosy: +miss-islington

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-05-20 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +13349

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-04-04 Thread Alex Chandel


Alex Chandel  added the comment:

Could this be merged? UDP and pipes are critical for non-trivial asyncio 
programs on Windows, and this should be merged before the 3.8 feature window 
closes.

--
nosy: +Alex Chandel

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-16 Thread Carol Willing


Change by Carol Willing :


--
nosy: +willingc
stage: test needed -> patch review

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-15 Thread Adam Meily


Adam Meily  added the comment:

I've rebased onto upstream master and I fixed the CI build.

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Adam Meily: Thanks for the proposed pull request. Would you mind to try to 
rebase it on the current master branch, please?

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Copy of my messages in July 2014:
https://github.com/python/asyncio/issues/187

"""
ProcatorEventLoop doesn't support UDP right now.

I'm working on a patch. I need to implement WSARecvFrom in the _overlapped 
module for example.

ConnectEx() fails with an error 10022 when create_datagram_endpoint() is called 
with remote_address. A workaround is to replace "yield from sock_connect(sock, 
remote_address)" with "sock.connect(remote_address)".
"""

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

I just marked my old issue bpo-23295 as duplicate of this one. Copy of my 
messages:

"""
ProactorEventLoop lacks UDP support: create_datagram_endpoint() is not 
supported.

New functions should be added to the _overlapped modul. Example: add maybe 
WSARecvFrom()?

See also https://code.google.com/p/tulip/issues/detail?id=187
"""

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-12-08 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-04-09 Thread Adam Meily

Changes by Adam Meily :


--
pull_requests: +1213

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-03-24 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-03-23 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +giampaolo.rodola, haypo

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-03-22 Thread Adam Meily

New submission from Adam Meily:

I am working on a Python 3.5 project that uses asyncio on a Windows system to 
poll both UDP and TCP connections. Multiple sources online say that the Windows 
Proactor event loop, which uses I/O Completion Ports, is considerably faster 
and more efficient than the default Selector event loop. I'm using both UDP and 
TCP connections so I am stuck with the Selector event loop for the time being. 
I've seen the overhead of 128 open UDP/TCP connections on the Selector event 
loop to be near 85%, which I understand is entirely spent in Windows 
proprietary code and not the Python implementation.

I'd like to take a shot at implementing UDP support in the IOCP event loop. It 
looks like there will be a considerable amount of code shared between TCP and 
UDP IOCP so I plan on implementing UDP support directly in 
_ProactorReadPipeTransport and _ProactorBaseWritePipeTransport. I should be 
able to do this by wrapping any TCP/UDP specific function calls in a check of:


if sock.type == socket.SOCK_DGRAM:
# Do UDP stuff
elif sock.type == socket.SOCK_STREAM:
# Do TCP stuff


My initial implementation plan is to:

 - Call datagram_received() instead of data_received() when UDP data is 
available in _ProactorReadPipeTransport._loop_reading().
 - Implement BaseProactorEventLoop._make_datagram_transport().
 - Implement wrappers for WSAConnect, WSARecvFrom, and WSASendTo in _overlapped.
 - Implement sendto() and recvfrom() in IocpProactor, which will use the new 
functions in _overlapped.
 - Implement handling for UDP "connections" in IocpProactor.connect() to call 
WSAConnect(). WSAConnect() appears to always return immediately so the function 
not supporting IOCP shouldn't be an issue. We can't use ConnectEx() for UDP 
because ConnectEx() is for connection-oriented sockets only.

My project is unfortunately tied to Python 3.5. So, if possible, I'd like to 
have UDP support merged into a v3.5 release. I can fork off of master instead 
of v3.5.3 if Python 3.5 support isn't an option.

--
components: asyncio
messages: 290010
nosy: Adam Meily, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: Windows Proactor Event Loop UDP Support
type: enhancement
versions: Python 3.5

___
Python tracker 

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