We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2dabaf6 + 7ff1822 commit 8c195afCopy full SHA for 8c195af
2 files changed
Misc/NEWS
@@ -88,6 +88,9 @@ Core and Builtins
88
Library
89
-------
90
91
+- Issue #15340: Fix importing the random module when /dev/urandom cannot
92
+ be opened. This was a regression caused by the hash randomization patch.
93
+
94
- Issue #15828: Restore support for C extensions in imp.load_module()
95
96
- Issue #10650: Deprecate the watchexp parameter of the Decimal.quantize()
Python/random.c
@@ -165,7 +165,8 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
165
Py_END_ALLOW_THREADS
166
if (fd < 0)
167
{
168
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, "/dev/urandom");
+ PyErr_SetString(PyExc_NotImplementedError,
169
+ "/dev/urandom (or equivalent) not found");
170
return -1;
171
}
172
0 commit comments