Issue 21566: make use of the new default socket.listen() backlog argument (original) (raw)

Created on 2014-05-23 21:26 by neologix, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
use_socket_listen_backlog.diff neologix,2014-05-23 21:26 review
Messages (7)
msg219005 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-05-23 21:26
Follow-up to issue #21455: we can now update the stdlib to rely on the default socket listen backlog, instead of having a bazillion different values (which range from 1 to 100!).
msg219006 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-05-23 21:32
This looks fine to me.
msg219007 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-05-23 21:32
Maybe we should keep listen(1) in some cases. For socketpair() of asyncio.windows_utils, it makes sense to use sock.listen(1) since we expect exactly one request from one client. The listening socket is closed just after sock.accept().
msg219008 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-05-23 21:44
> Maybe we should keep listen(1) in some cases. > > For socketpair() of asyncio.windows_utils, it makes sense to use sock.listen(1) since we expect exactly one request from one client. The listening socket is closed just after sock.accept(). Yeah, I thought about that, but almost all operating systems don't strictly respect the backlog, they always increase it a bit, so this wouldn't change much.
msg223757 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-07-23 18:28
New changeset f7643c893587 by Charles-François Natali in branch 'default': Issue #21566: Make use of socket.listen() default backlog. http://hg.python.org/cpython/rev/f7643c893587
msg223764 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-07-23 19:07
Committed, thanks for the reviews (I only updated one call to socket.listen(), inside multiprocessing, the rest is in the test suite).
msg227502 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-09-25 03:33
Guys, when you update asyncio code, please make sure you sync your changes with its upstream here: https://code.google.com/p/tulip/ to avoid commits like this 5f001ad90373 The goal is to have single source base for 3.4 and 3.5 in cpython repo and for 3.3 in tulip repo, to simplify syncing updates between them.
History
Date User Action Args
2022-04-11 14:58:03 admin set github: 65765
2014-09-25 03:33:19 yselivanov set nosy: + yselivanovmessages: +
2014-07-23 19:07:56 neologix set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2014-07-23 18:28:59 python-dev set nosy: + python-devmessages: +
2014-05-23 21:44:56 neologix set messages: +
2014-05-23 21:32:52 vstinner set messages: +
2014-05-23 21:32:19 pitrou set messages: +
2014-05-23 21:26:51 neologix create