This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients rhettinger, vstinner
Date 2017-01-07.01:45:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483753521.01.0.872320724397.issue29188@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2017-01-07 01:45:21vstinnersetrecipients: + vstinner, rhettinger
2017-01-07 01:45:21vstinnersetmessageid: <1483753521.01.0.872320724397.issue29188@psf.upfronthosting.co.za>
2017-01-07 01:45:20vstinnerlinkissue29188 messages
2017-01-07 01:45:20vstinnercreate