[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: I got bored so I made you a patch. -- keywords: +patch Added file: http://bugs.python.org/file26125/larry.random_seed.ssize_t.1.diff ___ Python tracker rep...@bugs.python.org

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___ ___ Python-bugs-list mailing

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 166599219bd4 by Larry Hastings in branch 'default': Issue #14815: Use Py_ssize_t instead of long for the object hash, to http://hg.python.org/cpython/rev/166599219bd4 -- nosy: +python-dev

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: - commit review status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4445608cf434 by Larry Hastings in branch 'default': Issue #14815: Bugfix: the PyLong fed into the seed generator must be unsigned. http://hg.python.org/cpython/rev/4445608cf434 --

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___ ___ Python-bugs-list

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: rhettinger - loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___ ___ Python-bugs-list mailing

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-05-17 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___ ___

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-05-16 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: This is a reasonable change. The benefits of using all 64-bits outweigh the small downside of losing the reproducibility of previously generated sequences that relied on the object hash. --

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-05-15 Thread Martin v . Löwis
New submission from Martin v. Löwis mar...@v.loewis.de: random_seed has this code: long hash = PyObject_Hash(arg); On Win64, Py_hash_t is a 64-bit type, yet long is a 32-bit type, so this truncates. I think the computation should be done in Py_ssize_t. -- messages: 160720 nosy:

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-05-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14815 ___ ___ Python-bugs-list