[issue32373] Add socket.getblocking() method

2018-01-28 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32373] Add socket.getblocking() method

2018-01-28 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset f11b460d8717fc3a5810684713b8b818f68789e8 by Yury Selivanov in branch 'master': bpo-32373: Add socket.getblocking() method. (#4926) https://github.com/python/cpython/commit/f11b460d8717fc3a5810684713b8b818f68789e8

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: It appears the the timeouts situation is a bit more complex. It's perfectly normal for a Python socket object to be in a "blocking" mode and for its FD to be in a non-blocking mode. Read more about this in the latest docs update to

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, it's a bug. +1 for getblocking() -- ___ Python tracker ___

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Now is having a timeout and blocking send/recv methods on a non-blocking > socket a feature? Or is this a bug? I agree it's a bug (but should only be fixed in 3.7). Also I agree with adding a socket.getblocking() method. --

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Yury Selivanov added the comment: It looks like we have a bug with 'sock.settimeout()' and non-blocking/blocking modes (or maybe this is a feature?) Currently: * to make a socket non-blocking, we call 'sock.settimeout(0)'. * to make a socket blocking, we call

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4820 stage: -> patch review ___ Python tracker ___

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +asvetlov, vstinner ___ Python tracker ___ ___

[issue32373] Add socket.getblocking() method

2017-12-19 Thread Yury Selivanov
New submission from Yury Selivanov : Currently we have the following methods: * socket.settimeout(t) -- can set the socket in blocking mode, when t==0. * socket.setblocking(flag) -- sets in blocking or non-blocking mode. * socket.gettimeout() -- returns 0 when socket is in