File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1515 UUID ,
1616 __version__ ,
1717 getnode ,
18- reseed as reseed_rng ,
1918 uuid1 ,
2019 uuid3 ,
2120 uuid4 ,
2423 uuid7 ,
2524 uuid8 ,
2625)
26+ from ._uuid_utils import (
27+ reseed as reseed_rng ,
28+ )
2729
2830# Reseed the RNG in the child process after a fork.
2931# Otherwise both parent and child processes may generate the same UUIDs for some time.
30- os .register_at_fork (after_in_child = reseed_rng )
32+ if hasattr (os , "fork" ):
33+ os .register_at_fork (after_in_child = reseed_rng )
3134
3235__all__ = [
3336 "MAX" ,
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ def test_getnode() -> None:
208208
209209
210210@pytest .mark .skipif (sys .platform == "win32" , reason = "Does not run on Windows" )
211- def test_reseed_rng_is_called_with_fork () -> None :
211+ def test_reseed_is_called_when_forking () -> None :
212212 read_end , write_end = os .pipe ()
213213 uuid_utils .uuid4 ()
214214
You can’t perform that action at this time.
0 commit comments