klen / mixer

Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.
Other
944 stars 95 forks source link

Don't restrict Faker to version < 12.1 #179

Open finsterwalder opened 2 years ago

finsterwalder commented 2 years ago

What is the reason to restrict Faker to a version below 12.1? Looking at the release notes of Faker, I would not expect any breaking changes. Maybe lift the restriction completely or at least raise it to the current (major-)version?

Nebucatnetzer commented 1 year ago

With the latest Faker version I get this error:

/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/mixer/_faker.py:33: in load
    pcls, lang_found = Factory._get_provider_class(pname, locale)
E   AttributeError: type object 'Factory' has no attribute '_get_provider_class'
Nebucatnetzer commented 1 year ago

Looks like the change was introduced in 12.1 which explains the restriction to <12.1

finsterwalder commented 1 year ago

Thanks, Andreas, for trying that. So a (bigger?) change in Mixer is needed, I guess. But then still it would be good to do that and not stay with an old dependency. Using a private method in an external library is usually a bad idea to start with.... ;-)

Nebucatnetzer commented 1 year ago

Makes sense to me. I'm happy to help with testing but I'm not the right person to implement such a change.

paulschreiber commented 1 year ago

Dependabot tried to update Faker to 16, which won't work because of this mixer restriction. Can mixer be updated to support current faker?

paulschreiber commented 11 months ago

Faker is now up to 21.0.0. Can you update mixer to support new versions of faker?