revlogutils: unconditionally pass version to random seed
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 01 Mar 2022 20:37:09 -0800
changeset 48909 0aae0e2e90fc
parent 48908 ed2af4560f6e
child 48910 3681b4c56618
revlogutils: unconditionally pass version to random seed Differential Revision: https://phab.mercurial-scm.org/D12312
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