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 neologix
Recipients neologix, pitrou, pturing, python-dev, sbt, vstinner
Date 2014-07-23.22:21:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM1L_8Zba0kUyu_J8Jz=tQNnqFrKAH2-espndVzbUAknjw@mail.gmail.com>
In-reply-to <1406148110.47.0.74760666115.issue18643@psf.upfronthosting.co.za>
Content
> You should copy the code from asyncio.windows_utils.socketpair(). It checks also type and proto parameter: raise a ValueError for unsupported values (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It handles BlockingIOError and InterruptedError on connect (I never understood why these exceptions are simply ignored).

I could use it then, although all those checks are unnecessary since
the underlying socket() call will check it for us.

> You patch checks the address received by accept() and retry. It's a little bit surprising. If you get an unexpected connection, maybe an exception should be raised, instead of just ignoring it. Maybe we should modify the code in asyncio to check also the address?

Why?
If you have an unexpected connection, it should be dropped, and we
should wait until the client we're expecting connects, there's no
reason to raise an error.
But I'll just reuse asyncio's version.

> Finally, please add socketpair() directly to the socket module. It is useful for applications, not only for tests.

Well, that's what I suggested initially, but never got any reply, so I
went for the least intrusive. I personally think too it should belong
to socket module.

So here it is.
Files
File name Uploaded
socketpair-4.diff neologix, 2014-07-23.22:21:34
History
Date User Action Args
2014-07-23 22:21:35neologixsetrecipients: + neologix, pitrou, vstinner, python-dev, sbt, pturing
2014-07-23 22:21:34neologixlinkissue18643 messages
2014-07-23 22:21:34neologixcreate