]> granicus.if.org Git - python/commit
[3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 18 Oct 2017 09:09:57 +0000 (02:09 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 18 Oct 2017 09:09:57 +0000 (12:09 +0300)
commitbe4e9cc769aac3cb46670c049b9f21e412be53d1
treececaf808562d39817ecaa52ab0056f6229fb0624
parent95602b368b87da3702a0f340ded2a23e823bb104
[3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (GH-4026) (#4032)

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.
(cherry picked from commit 59af94fa61bf90adbe624508e909b5d6ef6e8464)
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