Issue #5080: turn the DeprecationWarning from float arguments passed
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
diff --git a/Lib/os.py b/Lib/os.py
index e8a0113..12ebbcb 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -752,7 +752,7 @@
raise NotImplementedError("/dev/urandom (or equivalent) not found")
try:
bs = b""
- while n - len(bs) >= 1:
+ while n > len(bs):
bs += read(_urandomfd, n - len(bs))
finally:
close(_urandomfd)