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.

Author j1m
Recipients gvanrossum, j1m, vstinner, yselivanov
Date 2016-06-29.15:31:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>> Yury, I'm curious what you think the socket argument to create_connection is about.
> :)  The current intended purpose of create_connection is to create a client connection.  You're proposing to add a new argument -- server_side -- which I think will confuse the users of create_connection.

Perhaps. I'll note that the word "client" appears nowhere in the documentation of create_connection. I needed a way to wrap a socket and create_connection took one. Wrapping a server socket seemed to be to be the most likely use case for it. <shrug>

> What I'm saying is that we may consider creating a low-level loop.wrap_socket, which would be generic and suitable to be used for both client and server connections.  We could even refactor create_connection to use wrap_socket when 'sock' argument is passed to it.
> We already have something similar, although it's a private API -- _make_socket_transport.

Right. That's what I'm monkey-patching now to work around this, mostly as an experiment.

>> BTW, a problem with this proposal that I realized after submitting it is that it changes an API that has multiple implementations, including implementations outside of the Python codebase.  Arguably, this would require a PEP, at which point the change is no-longer trivial. :)
> No need for a PEP; Guido's approval is enough usually.

/me holds breath
Date User Action Args
2016-06-29 15:31:18j1msetrecipients: + j1m, gvanrossum, vstinner, yselivanov
2016-06-29 15:31:18j1msetmessageid: <>
2016-06-29 15:31:18j1mlinkissue27392 messages
2016-06-29 15:31:18j1mcreate