]> granicus.if.org Git - python/commit
bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functio...
authorPablo Galindo <Pablogsal@gmail.com>
Wed, 18 Oct 2017 07:13:09 +0000 (08:13 +0100)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 18 Oct 2017 07:13:09 +0000 (10:13 +0300)
commit59af94fa61bf90adbe624508e909b5d6ef6e8464
tree74ee9a80276bed8eb99229acf2fb071a1d341400
parentec12df1e6e4d03a0d22956355308df695a8dff36
bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (#4026)

Fix timeout rounding in time.sleep(), threading.Lock.acquire() and
socket.socket.settimeout() to round correctly negative timeouts between -1.0 and
0.0. The functions now block waiting for events as expected. Previously, the
call was incorrectly non-blocking.
Misc/NEWS.d/next/Library/2017-10-17-23-27-03.bpo-31806.TzphdL.rst [new file with mode: 0644]
Modules/_threadmodule.c
Modules/socketmodule.c
Modules/timemodule.c