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: add minimum version constraint to attrs #359

Merged
merged 3 commits into from
Sep 15, 2023
Merged

Conversation

guacs
Copy link
Member

@guacs guacs commented Sep 14, 2023

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR
  • Pre-Commit Checks were ran and passed
  • Tests were ran and passed

Description

  • This PR adds a minimum constraint to the attrs version since the current AttrsFactory implementation only works with attrs version 22.2.0 onwards.

Close Issue(s)

@guacs guacs requested review from a team as code owners September 14, 2023 14:11
@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@JacobCoffee JacobCoffee enabled auto-merge (squash) September 15, 2023 02:01
@JacobCoffee JacobCoffee merged commit ebf30ff into main Sep 15, 2023
9 of 12 checks passed
@JacobCoffee JacobCoffee deleted the attrs-constraint branch September 15, 2023 02:01
@takeda
Copy link

takeda commented Sep 16, 2023

Unfortunately this is not a complete fix. I have project and use polyfactory with pydantic. Attrs package is included, because of other dependencies (I personally don't use it and have no direct dependency). When running unit tests I still get error AttributeError: module 'attrs' has no attribute 'AttrsInstance'. The version is kept low because one of my dependency wants lower version. This is frustrating, because I don't even use attrs factory

@guacs guacs mentioned this pull request Sep 16, 2023
4 tasks
@guacs
Copy link
Member Author

guacs commented Sep 16, 2023

@takeda, I've reopened the issue linked with this PR. I'll try to get a proper fix for this in place before the next release.

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.

Bug: ImportError of ModelFactory
3 participants