This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Commit 52b91c8
Release Manager
Trac #31012: Modify RandomChordalGraph according a deprecation warning introduced in Python 3.9
Python 3.9 deprecates the use `sample(population, k)` when `population`
is a `set`.
{{{
sage: G = graphs.RandomChordalGraph(100)
/Users/dcoudert/sage/local/lib/python3.9/site-
packages/sage/misc/prandom.py:179: DeprecationWarning: Sampling from a
set deprecated
since Python 3.9 and will be removed in a subsequent version.
return _pyrand().sample(population, k)
}}}
It was used in `graphs.RandomChordalGraph(...)`, so we change that.
URL: https://trac.sagemath.org/31012
Reported by: dcoudert
Ticket author(s): David Coudert
Reviewer(s): Frédéric Chapoton1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
| 870 | + | |
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
883 | | - | |
| 883 | + | |
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| |||
0 commit comments