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 2021年05月28日 14:27 by serhiy.storchaka, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 26455 | merged | serhiy.storchaka, 2021年05月30日 10:36 | |
| Messages (3) | |||
|---|---|---|---|
| msg394663 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2021年05月28日 14:27 | |
_Random.seed() is called twice: first it is called in _Random.__new__(), then it is called in Random.__init__(). By default it reads system enthropy, so it consumes global system resource without need. |
|||
| msg394754 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2021年05月30日 06:41 | |
Consider moving seeding from _random.Random.__new__ to _random.Random.__init__. Since random.Random.__init__ doesn't call the super(), the C version never gets called, avoiding the double seeding. But, it still lets _random.Random function as a standalone class. |
|||
| msg394823 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2021年05月31日 20:24 | |
New changeset a6a20658814e8668966fc86de0e80a4772864781 by Serhiy Storchaka in branch 'main': bpo-44260: Do not read system entropy without need in Random() (GH-26455) https://github.com/python/cpython/commit/a6a20658814e8668966fc86de0e80a4772864781 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:46 | admin | set | github: 88426 |
| 2021年05月31日 20:24:57 | serhiy.storchaka | set | status: open -> closed stage: patch review -> resolved resolution: fixed versions: + Python 3.11 |
| 2021年05月31日 20:24:28 | serhiy.storchaka | set | messages: + msg394823 |
| 2021年05月30日 10:36:22 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request25051 |
| 2021年05月30日 06:41:51 | rhettinger | set | messages: + msg394754 |
| 2021年05月28日 14:27:28 | serhiy.storchaka | create | |