[issue30051] Document that the random module doesn't support fork

2017-08-10 Thread STINNER Victor
STINNER Victor added the comment: Since Raymond and Antoine don't like the documentation idea, I just close my issue. Hopefully, Python 3.7 now reseeds automatically random at fork! -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue30051] Document that the random module doesn't support fork

2017-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is a feature, not a bug. But I think it is worth be explicitly documented. -- ___ Python tracker ___ __

[issue30051] Document that the random module doesn't support fork

2017-06-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is true, but it's by design. If you want a specific random sequence (which is the primary use case for specific instances), you don't want fork() to mess with the random sequence. -- ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-06-13 Thread STINNER Victor
STINNER Victor added the comment: At least, it would be nice to document it for Python 3.6 and older. -- ___ Python tracker ___ ___ Py

[issue30051] Document that the random module doesn't support fork

2017-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even if the global Random instance is reseeded after fork(), other instances are not reseeded. -- ___ Python tracker ___

[issue30051] Document that the random module doesn't support fork

2017-06-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, this issue should be obsolete now that the global Random instance is reseeded after fork(). -- ___ Python tracker ___ _

[issue30051] Document that the random module doesn't support fork

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > os.fork() documentation contains a warning that refers to ssl > documentation where the use of OpenSSL’s internal random number > generator in forked processes is documented more detailed. > I think the same should be added for the random module. +1 It is

[issue30051] Document that the random module doesn't support fork

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: os.fork() documentation contains a warning that refers to ssl documentation where the use of OpenSSL’s internal random number generator in forked processes is documented more detailed. I think the same should be added for the random module. --

[issue30051] Document that the random module doesn't support fork

2017-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Several thoughts: * AFAICT, in entire the history of this module, no user has ever reported this as being a source of confusion, so I don't think there is a real documentation issue here. * Regarding, "after fork, the parent and the child produce the same

[issue30051] Document that the random module doesn't support fork

2017-04-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is worth documenting. Even if multiprocessing reseeds the module-global random generator, it doesn't reseed other instances of Random. -- ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I mean mentioning fork(), which people usually don't call directly, is not necessary, so, indeed, a note isn't necessary. -- ___ Python tracker ___

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure that's necessary. Do you mean that adding a note is not necessary? Or proposing a solution in the note? -- ___ Python tracker __

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure that's necessary. fork() is a low-level primitive, people can/should use multiprocessing.Process instead, which does re-seed the PRNG. -- nosy: +pitrou ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> docs@python components: +Documentation nosy: +docs@python, rhettinger, serhiy.storchaka ___ Python tracker ___ __

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
New submission from STINNER Victor: When reviewing the issue #30030, it reminded me that the random module "doesn't support fork": after fork, the parent and the child produce the same "random" number sequence. I suggest to add a quick note about that: not a warning, just a note, as a reminde