litestar-org / polyfactory

Simple and powerful factories for mock data generation
https://polyfactory.litestar.dev/
MIT License
1k stars 78 forks source link

Bug: Incomplete Dependency Specification #470

Closed hsorsky closed 8 months ago

hsorsky commented 8 months ago

Description

The dependency specification in pyproject.toml specifies

dependencies = [
    "faker",
    "typing-extensions",
]

i.e. no version requirements on typing-extensions, however I believe polyfactory has a requirement of at least 4.6.0 due to this line given get_original_bases was added to typing-extensions in 4.6.0

URL to code causing the issue

No response

MCVE

# Your MCVE code here

Steps to reproduce

1. Specify `polyfactor` as a dependency in another project with version `2.13.0`
2. Also specify `typing-extensions` as a dependency with version `<4.6.0`
3. Create a virtual environment using the above requirement specifications
4. Try to import from `polyfactory.factories.base`

Screenshots

"In the format of: ![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"

Logs

No response

Release Version

2.13.0

Platform


[!NOTE]
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar

hsorsky commented 8 months ago

I think updating the deps to

dependencies = [
    "faker",
    "typing-extensions >= 4.6.0",
]

would fix things