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

Reproducible randomness can't be achieved on Python < 3.6 #1359

Closed
x-yuri opened this issue Jan 8, 2021 · 1 comment
Closed

Reproducible randomness can't be achieved on Python < 3.6 #1359

x-yuri opened this issue Jan 8, 2021 · 1 comment

Comments

@x-yuri
Copy link

x-yuri commented Jan 8, 2021

  • Faker version: 5.0.0
  • OS: Alpine Linux

One would expect faker to produce identical results given that the seed doesn't change. With some providers that is not the case.

This was already reported before. But since then more dicts were introduced.

I'm reporting it since I ran into it recently. But considering that Python 3.5 is no longer supported, I'm not sure if it makes sense to fix it.

Steps to reproduce

a.py:

from faker import Faker
fake = Faker()
Faker.seed(4321)

print(fake.name(), fake.locale())

Expected behavior

$ docker run --rm -itv a.py:/a.py python:3.6-alpine sh -c 'pip install faker && for i in `seq 1 10`; do python /a.py; done'
...
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK
Jason Brown da_DK

Actual behavior

$ docker run --rm -itv a.py:/a.py python:3.5-alpine sh -c 'pip install faker && for i in `seq 1 10`; do python /a.py; done'
...
Jason Brown ro_RO
Jason Brown fy_NL
Jason Brown kn_IN
Jason Brown ckb_IQ
Jason Brown ak_GH
Jason Brown ky_KG
Jason Brown vi_VN
Jason Brown tr_CY
Jason Brown pa_IN
Jason Brown th_TH
@fcurella
Copy link
Collaborator

fcurella commented Jan 8, 2021

Hi @x-yuri !

As you noted, Python 3.5 is not supported. We stated it in the README and fixed our setup.py in 5.0.1 to prevent installation.

We simply don't have resources to spend addressing issues with an EOL'd Python version.

I appreciate you opening this issue. It will be a good reference for other users that are still on Python 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants