[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 ___

[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. I

[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 ___ __

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

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou 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 incorporat

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

2012-04-07 Thread Serhiy Storchaka
Serhiy Storchaka 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 use `os.urandom`

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

2011-09-16 Thread Matt Chaput
Matt Chaput added the comment: Passed all tests OK. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2011-09-16 Thread Terry J. Reedy
Terry J. Reedy 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() uuids = {}

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

2011-09-15 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2011-09-15 Thread Matt Chaput
New submission from Matt Chaput : 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 of randomness in