jeetsukumaran/DendroPy

`shuffle_taxa` raises `DeprecationWarning`

mmore500 opened this issue · 0 comments

The shuffle_taxa function passes as set as an operand to random.sample. This was deprecated in Python 3.9.

/usr/local/lib/python3.9/dist-packages/dendropy/datamodel/treemodel.py:5459: DeprecationWarning: Sampling from a set deprecated since Python 3.9 and will be removed in a subsequent version.
    new_taxon = rng.sample(node_taxa, 1)[0]

The relevant line is

new_taxon = rng.sample(node_taxa, 1)[0]
.