# HG changeset patch # User Gregory Szorc # Date 2022-03-02 04:37:09 # Node ID 0aae0e2e90fc6911c4cfb7984cfc8b37c2881841 # Parent ed2af4560f6e4a613c59b402b4476e95c270398c revlogutils: unconditionally pass version to random seed Differential Revision: https://phab.mercurial-scm.org/D12312 diff --git a/mercurial/revlogutils/docket.py b/mercurial/revlogutils/docket.py --- a/mercurial/revlogutils/docket.py +++ b/mercurial/revlogutils/docket.py @@ -25,7 +25,6 @@ from .. import ( encoding, error, node, - pycompat, util, ) @@ -65,10 +64,7 @@ if stable_docket_file: low_part = (int_seed & low_mask) << 28 int_seed = high_part + low_part + i r = random.Random() - if pycompat.ispy3: - r.seed(int_seed, version=1) - else: - r.seed(int_seed) + r.seed(int_seed, version=1) # once we drop python 3.8 support we can simply use r.randbytes raw = r.getrandbits(id_size * 4) assert id_size == 8