This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月15日 12:23 by loewis, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| larry.random_seed.ssize_t.1.diff | larry, 2012年06月24日 06:01 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg160720 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年05月15日 12:23 | |
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. |
|||
| msg160880 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2012年05月16日 16:33 | |
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. |
|||
| msg163719 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年06月24日 06:01 | |
I got bored so I made you a patch. |
|||
| msg163737 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年06月24日 06:56 | |
LGTM |
|||
| msg163752 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月24日 08:54 | |
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 |
|||
| msg163758 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月24日 09:52 | |
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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59020 |
| 2012年06月24日 09:52:32 | python-dev | set | messages: + msg163758 |
| 2012年06月24日 08:56:13 | larry | set | status: open -> closed resolution: fixed type: enhancement stage: commit review |
| 2012年06月24日 08:54:43 | python-dev | set | nosy:
+ python-dev messages: + msg163752 |
| 2012年06月24日 06:56:02 | loewis | set | messages: + msg163737 |
| 2012年06月24日 06:01:41 | larry | set | files:
+ larry.random_seed.ssize_t.1.diff keywords: + patch messages: + msg163719 |
| 2012年06月17日 00:56:34 | larry | set | nosy:
+ larry |
| 2012年06月16日 22:53:45 | rhettinger | set | assignee: rhettinger -> loewis |
| 2012年06月16日 21:24:57 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka |
| 2012年05月17日 16:28:49 | rhettinger | set | assignee: rhettinger |
| 2012年05月16日 16:33:14 | rhettinger | set | messages: + msg160880 |
| 2012年05月15日 12:27:41 | pitrou | set | nosy:
+ rhettinger |
| 2012年05月15日 12:23:02 | loewis | create | |