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: socketpair not in socket.__all__ on Windows
Type: behavior Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, eryksun, paul.moore, pitrou, python-dev, r.david.murray, steve.dower, tim.golden, veky, vstinner, zach.ware
Priority: normal Keywords: easy

Created on 2016-08-06 10:02 by veky, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (8)
msg272084 - (view) Author: Vedran Čačić (veky) * Date: 2016-08-06 10:02
It seems socketpair is added for Windows in Py3.5, but it isn't imported with `from socket import *`. Can it be added to __all__?
msg272185 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-08-08 17:54
I don't see any special casing for windows in the socketpair code in the current socket module, nor do I see any mention of socketpair in the 3.5 whatsnew.  Based on a quick scan of the socket code I don't see how socketpair could be defined on a platform without also automatically being included in __all__.
msg272187 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-08-08 18:11
> nor do I see any mention of socketpair in the 3.5 whatsnew
socket.socketpair has a versionchanged 3.5: Windows support added.
msg272189 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2016-08-08 18:15
See issue 18643, which added a Windows implementation of socketpair(). Since it's not defined in the _socket extension module, it isn't added to socket.__all__. Someone simply forgot to add `__all__.append("socketpair")` after the definition on line 485.
msg272243 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-08-09 13:16
Ah, I see.  Yes, the normal "automatic adding" probably made that easy to forget.  The lack of "windows" comment there fooled me...it looks like what was really added was "support for any platform that supports sockets but not socketpair" :)
msg272945 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-08-17 14:14
New changeset ac2bc921169c by Victor Stinner in branch '3.5':
Issue #27698: Add socketpair to socket.__all__ on Windows
https://hg.python.org/cpython/rev/ac2bc921169c
msg272946 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-08-17 14:14
The issue should now be fixed by my change. Thanks for the bug report!
msg273194 - (view) Author: Vedran Čačić (veky) * Date: 2016-08-20 08:06
No problem. Thank you for fixing it. :-)
History
Date User Action Args
2022-04-11 14:58:34adminsetgithub: 71885
2016-08-20 08:49:13berker.peksagsetstage: needs patch -> resolved
2016-08-20 08:06:45vekysetmessages: + msg273194
2016-08-17 14:14:54vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg272946

resolution: fixed
2016-08-17 14:14:27python-devsetnosy: + python-dev
messages: + msg272945
2016-08-13 03:38:51eryksunsetkeywords: + easy
2016-08-09 13:16:53r.david.murraysetmessages: + msg272243
2016-08-08 18:15:15eryksunsetmessages: + msg272189
2016-08-08 18:14:51eryksunsetmessages: - msg272188
2016-08-08 18:14:14eryksunsetnosy: + eryksun
messages: + msg272188
2016-08-08 18:11:03SilentGhostsetnosy: + SilentGhost
messages: + msg272187
2016-08-08 17:54:42r.david.murraysetnosy: + r.david.murray
messages: + msg272185
2016-08-06 11:00:59SilentGhostsetnosy: + pitrou, paul.moore, tim.golden, zach.ware, steve.dower

type: behavior
components: + Windows
stage: needs patch
2016-08-06 10:02:26vekycreate