Title: Make create_server able to listen on several ports
Type: enhancement Stage: resolved
Components: asyncio Versions: Python 3.6
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, bayandin, gvanrossum, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2016-08-01 22:50 by bayandin, last changed 2017-12-20 21:34 by yselivanov. This issue is now closed.

File name Uploaded Description Edit
create_server-multiple-ports.patch bayandin, 2016-08-01 22:50 review
Messages (8)
msg271792 - (view) Author: Alexander Bayandin (bayandin) Date: 2016-08-01 22:50
Make create_server accept a list of ports to listen.
Now it contains only code changes without updates in docs and tests.
If these changes will be considered as helpful I'll be glad to add tests and update documentation for the method.
msg271793 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-08-01 23:01
IIRC we got a similar PR before. But what's the problem with creating multiple server objects?
msg271794 - (view) Author: Alexander Bayandin (bayandin) Date: 2016-08-01 23:24
I think it is just handier than creating several server objects like it is already done for a list of hosts.
For me in particular, need to have exactly the same logic for multiple ports which generates randomly and I want to have one predefined port for manually checking/debugging.
msg271795 - (view) Author: Alexander Bayandin (bayandin) Date: 2016-08-01 23:47
Furthermore, there is a problem with overlapped ports for multiple created server objects. Also, I can quote a comment from 'original' issue:
msg276625 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016-09-15 21:45
I think this has been already fixed.  Please reopen if I missed something.
msg277381 - (view) Author: Alexander Bayandin (bayandin) Date: 2016-09-25 14:52
Yury, in 3.6 is added support for multiple hosts for create_server but not for multiple ports which I suggest to add.
msg308814 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-20 21:05
Let's don't -- all combinations of hosts, ports, sock objects makes a mess already.
I suggest not complicate already complex signature and just close the issue as "won't fix".

Multiple server objects never was a problem.
msg308826 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-20 21:34
Agree.  It's also challenging to design the API that binds to multiple hosts *and* ports -- a crossproduct of some sorts.

> Multiple server objects never was a problem.


Let's close this.
Date User Action Args
2017-12-20 21:34:17yselivanovsetstatus: open -> closed
resolution: rejected
messages: + msg308826
2017-12-20 21:05:28asvetlovsetnosy: + asvetlov
messages: + msg308814
2016-09-25 14:52:28bayandinsetstatus: closed -> open
resolution: out of date -> (no value)
messages: + msg277381

versions: - Python 3.5
2016-09-15 21:45:01yselivanovsetstatus: open -> closed
resolution: out of date
messages: + msg276625

stage: resolved
2016-08-01 23:47:17bayandinsetmessages: + msg271795
2016-08-01 23:24:45bayandinsetmessages: + msg271794
2016-08-01 23:01:24gvanrossumsetmessages: + msg271793
2016-08-01 22:50:47bayandincreate