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.

Title: Python 3.5+ socket.socketpair fallback incorrectly implemented
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: SethMichaelLarson, benjamin.peterson
Priority: normal Keywords:

Created on 2016-12-28 07:23 by SethMichaelLarson, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg284158 - (view) Author: Seth Michael Larson (SethMichaelLarson) * Date: 2016-12-28 07:23
The socket.socketpair() fallback for Python 3.5+ is incorrectly implemented from the original source. The fallback doesn't provide a backlog argument to the lsock.listen() function call.

When running the function it gives the following error:
`TypeError: listen() takes exactly one argument (0 given)`

Issue can be seen here on line 514:

Should add 1 as the argument to listen() to bring the implementation in line with the source implementation at:
msg284226 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-12-29 04:21
Are you using that implementation on Python 2? Python 3's socket.listen has one optional backlog argument.
msg284227 - (view) Author: Seth Michael Larson (SethMichaelLarson) * Date: 2016-12-29 04:23
Sorry for making noise, yes I was using the implementation in Python 2.x. I will do better investigation in the future.
Date User Action Args
2022-04-11 14:58:41adminsetgithub: 73277
2016-12-29 04:23:32SethMichaelLarsonsetmessages: + msg284227
2016-12-29 04:21:15benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg284226

resolution: not a bug
2016-12-28 07:23:21SethMichaelLarsoncreate