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

fix(pyproject.toml): dont allow faker version less then 5.0.0 #646

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

T0nd0Tara
Copy link

Description

  • I've noticed the library is incompatible with low versions of faker.
    for example, this script won't work
from polyfactory.factories import pydantic_factory
import pydantic

class MyModel(pydantic.BaseModel):
    m_id: int
    name: str

class Factory(pydantic_factory.ModelFactory[MyModel]):
    __model__ = MyModel


print(Factory.build())

won't work with version faker==4.0.0 or lower, due to missing Generator attribute json

@T0nd0Tara T0nd0Tara requested a review from guacs as a code owner February 13, 2025 18:07
@T0nd0Tara T0nd0Tara changed the title dont allow faker version less then 5.0.0 fix(pyproject.toml): dont allow faker version less then 5.0.0 Feb 13, 2025
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/646

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

Successfully merging this pull request may close these issues.

1 participant