This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: make use of the new default socket.listen() backlog argument
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: neologix, pitrou, python-dev, sbt, vstinner, yselivanov
Priority: normal Keywords: needs review, patch

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:03adminsetgithub: 65765
2014-09-25 03:33:19yselivanovsetnosy: + yselivanov
messages: + msg227502
2014-07-23 19:07:56neologixsetstatus: open -> closed
resolution: fixed
messages: + msg223764

stage: patch review -> resolved
2014-07-23 18:28:59python-devsetnosy: + python-dev
messages: + msg223757
2014-05-23 21:44:56neologixsetmessages: + msg219008
2014-05-23 21:32:52vstinnersetmessages: + msg219007
2014-05-23 21:32:19pitrousetmessages: + msg219006
2014-05-23 21:26:51neologixcreate