[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to reject this proposal because of a deterioration in security. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986 ___

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-10-06 Thread Christian Heimes
Christian Heimes added the comment: If somebody is going to implement uuid based on the random module that somebody must take care of fork. Currently the PRGN in random isn't reseeded during fork(). This would lead to 100% collisions. The tempfile module contains a workaround for the issue.

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-10-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, let's reject the issue then. -- resolution: - rejected stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-04-07 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: uuids = set() for u in [uuid.uuid4() for i in range(1000)]: uuids.add(u) uuids = {uuid.uuid4() for i in range(1000)} However, I'm not sure of the legitimacy of replacement suitable for cryptographic

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: However, I'm not sure of the legitimacy of replacement suitable for cryptographic use `os.urandom` on fast pseudo-random `random.getrandbits`. Especially for applications that need to generate a lot of uuids. Agreed. urandom() is supposed to

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2011-09-16 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: You could help this along by both running Lib.test.test_uuid with your patch applied and reporting that it passes. Raymond, I added you because this is about changing random functions. Side note: This code in test_uuid.test_uuid4()

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2011-09-16 Thread Matt Chaput
Matt Chaput m...@whoosh.ca added the comment: Passed all tests OK. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986 ___ ___ Python-bugs-list

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2011-09-15 Thread Matt Chaput
New submission from Matt Chaput m...@whoosh.ca: Currently the 'uuid' module uses os.urandom (in the absence of a system UUID generation function) to generate random UUIDs in the uuid.uudi4() function. This patch changes the implementation of uuid4() to use random.getrandbits() as the source

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2011-09-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986 ___ ___