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 ncoghlan
Recipients brett.cannon, christian.heimes, eric.snow, ncoghlan, serhiy.storchaka, steve.dower
Date 2016-12-31.12:32:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483187565.05.0.473945430762.issue29120@psf.upfronthosting.co.za>
In-reply-to
Content
You're right, I forgot about that part (I was mainly looking at the diffs today).

Spelling out the *problem*, rather than just jumping to a specific proposed solution, the confusing code layout we currently have is:

* Modules/_randommodule.c provides _random.Random
* Include/pylifecycle.c declares (amongst other things):
  * _PyRandom_Init
  * _PyRandom_Fini
  * _PyOS_URandom
  * _PyOS_URandomNonBlock
* Python/random.c implements all four of those APIs

I don't believe the latter two APIs existed back when I started the PEP 432 feature branch, which is why I had forgotten about them in this context.

Having the OS independent _PyOS_URandom APIs in a file called "Python/random.c" is reasonable, and there's even a legitimate connection to the random module there by way of random.SystemRandom.

So the only confusing aspect is also having the hash randomisation initialisation functions in there, rather than in their own file, with more appropriate API names.
History
Date User Action Args
2016-12-31 12:32:45ncoghlansetrecipients: + ncoghlan, brett.cannon, christian.heimes, eric.snow, serhiy.storchaka, steve.dower
2016-12-31 12:32:45ncoghlansetmessageid: <1483187565.05.0.473945430762.issue29120@psf.upfronthosting.co.za>
2016-12-31 12:32:45ncoghlanlinkissue29120 messages
2016-12-31 12:32:44ncoghlancreate