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 yselivanov
Recipients asvetlov, christian.heimes, methane, pitrou, vstinner, yselivanov
Date 2017-12-15.16:32:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513355578.27.0.213398074469.issue32331@psf.upfronthosting.co.za>
In-reply-to
Content
> You can easily work around your problem by replacing "sock.type == SOCK_STREAM" with "sock.type & SOCK_STREAM == SOCK_STREAM".

Heh :) No, that would be a buggy code.  Try this on your Linux box:

    (socket.SOCK_SEQPACKET & socket.SOCK_STREAM) == socket.SOCK_STREAM

The _only_ way of checking socket type reliably is to explicitly reset SOCK_NONBLOCK and SOCK_CLOEXEC or to apply 0xF mask on Linux, and don't do that on other platforms.

That's why I think it's important to fix this one way or another.
History
Date User Action Args
2017-12-15 16:32:58yselivanovsetrecipients: + yselivanov, pitrou, vstinner, christian.heimes, asvetlov, methane
2017-12-15 16:32:58yselivanovsetmessageid: <1513355578.27.0.213398074469.issue32331@psf.upfronthosting.co.za>
2017-12-15 16:32:58yselivanovlinkissue32331 messages
2017-12-15 16:32:58yselivanovcreate