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 christian.heimes, larry, ncoghlan, python-dev, serhiy.storchaka, vstinner, xiang.zhang
Date 2017-01-06.23:39:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483745942.92.0.397447331564.issue29157@psf.upfronthosting.co.za>
In-reply-to
Content
random-py35.patch: Patch for the 3.5 branch. My prepared commit message:
---
Issue #29157: Prefer getrandom() over getentropy()

Copy and then adapt Python/random.c from default branch. Difference between 3.5
and default branches:

* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
  remembers that getrandom() doesn't work.
* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
  works in non-blocking mode on Python 3.5
---

It seems like Python 3.5 is close to a release, I prefer to wait after the release to fix this issue. I don't think that many Linux distributions are affected, since the issue only occurs with glibc 2.24 which is very recent.

@Larry: Do you want this change in Python 3.5.3? The change is quite large.
History
Date User Action Args
2017-01-06 23:39:03vstinnersetrecipients: + vstinner, ncoghlan, larry, christian.heimes, python-dev, serhiy.storchaka, xiang.zhang
2017-01-06 23:39:02vstinnersetmessageid: <1483745942.92.0.397447331564.issue29157@psf.upfronthosting.co.za>
2017-01-06 23:39:02vstinnerlinkissue29157 messages
2017-01-06 23:39:02vstinnercreate