STINNER Victor added the comment:

> I think it is far too late to be making these kind of changes to 2.7.

I would prefer to use the "same code" (or almost) on all maintained versions of 
Python: 2.7, 3.5, 3.6 and 3.7. It should ease the maintenance for bugfixes and 
enhancements.

It seems like we want to backport security enhancements from Python 3 to Python 
2.7: see the PEP 466. Copying random.c from Python 3 would add support for 
getrandom() which is nice to have since it avoids a private file descriptor 
(which causes many issues, even if the most important issues are already worked 
around in Python 2.7 using fstat()).

The minimum required change on Python 2.7 is to not use getentropy() on Linux 
to support the glibc 2.24: see attached getentropy_linux.patch if you don't 
want the backport.

----------
keywords: +patch
Added file: http://bugs.python.org/file46182/getentropy_linux.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29188>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to