Skip to content

Commit 3e04e05

Browse files
authored
use string for seed if none provided
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.
1 parent e829532 commit 3e04e05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

petl/util/random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __init__(self, numrows=100, fields=None, wait=0, seed=None):
154154
else:
155155
self.fields = OrderedDict(fields)
156156
if seed is None:
157-
self.seed = datetime.datetime.now()
157+
self.seed = datetime.datetime.now().isoformat()
158158
else:
159159
self.seed = seed
160160

0 commit comments

Comments
 (0)