Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random entropy globally reduced for all importers #315

Closed
Redoubts opened this issue Jul 30, 2024 · 1 comment
Closed

random entropy globally reduced for all importers #315

Redoubts opened this issue Jul 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Redoubts
Copy link
Contributor

Redoubts commented Jul 30, 2024

Describe the bug

random.seed(time.time())

This line has call which globally sets the seed for all users of random, and this happens at import time for users of fakeredis. Is this needed? If so, can this module create its own generator for internal use? https://docs.python.org/3/library/random.html#random.Random

Expected behavior
Side-effect free imports

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@Redoubts Redoubts added the bug Something isn't working label Jul 30, 2024
@cunla
Copy link
Owner

cunla commented Jul 30, 2024

Makes sense. I'll publish an update.

@cunla cunla closed this as completed in 6c5e68d Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants