Skip to content

Commit

Permalink
use string for seed if none provided
Browse files Browse the repository at this point in the history
When calling randomtable without providing a seed, the warning `DeprecationWarning: Seeding based on hashing is deprecated since Python 3.9 and will be removed in a subsequent version. The only supported seed types are: None, int, float, str, bytes, and bytearray.` is emitted.
  • Loading branch information
bmos authored Mar 11, 2024
1 parent e829532 commit 3e04e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion petl/util/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __init__(self, numrows=100, fields=None, wait=0, seed=None):
else:
self.fields = OrderedDict(fields)
if seed is None:
self.seed = datetime.datetime.now()
self.seed = datetime.datetime.now().isoformat()
else:
self.seed = seed

Expand Down

0 comments on commit 3e04e05

Please sign in to comment.