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
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
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
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
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
--
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14815
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: rhettinger - loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14815
___
Changes by Larry Hastings la...@hastings.org:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14815
___
___
Python-bugs-list mailing
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14815
___
___
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.
--
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:
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14815
___
___
Python-bugs-list
12 matches
Mail list logo