Commit 29fb13dc authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

python-compat: adapt to Python 3.11 BC breakage with `random.sample`

As per

"The population parameter of `random.sample()` must be a sequence, and
automatic conversion of sets to lists is no longer supported.
Also, if the sample size is larger than the population size,
a `ValueError` is raised"
parent 2cfae49c6c34
Pipeline #59009 passed with stage
in 22 minutes and 22 seconds
......@@ -200,7 +200,7 @@
if len(new) < 300:
sample = new
sample = random.sample(new, 300)
sample = random.sample(list(new), 300)
query = _make_querysuperranges(sample)
ranges = set(con.execute(query).fetchall())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment