# HG changeset patch # User Gregory Szorc # Date 1646195829 28800 # Node ID 0aae0e2e90fc6911c4cfb7984cfc8b37c2881841 # Parent ed2af4560f6e4a613c59b402b4476e95c270398c revlogutils: unconditionally pass version to random seed Differential Revision: https://phab.mercurial-scm.org/D12312 diff -r ed2af4560f6e -r 0aae0e2e90fc mercurial/revlogutils/docket.py --- a/mercurial/revlogutils/docket.py Mon Feb 21 10:48:45 2022 -0700 +++ b/mercurial/revlogutils/docket.py Tue Mar 01 20:37:09 2022 -0800 @@ -25,7 +25,6 @@ encoding, error, node, - pycompat, util, ) @@ -65,10 +64,7 @@ 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