-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fixes for non-stdlib dataclass-like types #480
Fixes for non-stdlib dataclass-like types #480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few annotations.
c2bd19c
to
87c8493
Compare
for more information, see https://pre-commit.ci
…ue consistent with its name
for more information, see https://pre-commit.ci
1507ada
to
8cc32d3
Compare
for more information, see https://pre-commit.ci
Hmm, seeing errors on pydantic < 2.6; how far back do you need to support? |
Sorted this out for 2.0+, but I am not sure how to set up the Pydantic v1 test environment |
…sed for attrs now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nkrishnaswami thank you for contributing! I haven't had time to look at this in detail, so I will comment more later. For the moment, I see that there is a test failing in test-py310-pydantic-v1
. The changes introduced in pydantic v2 are big, which means that many people will still be using v1 for a long time. Please make sure that the test passes because there is no plan yet to drop support for pydantic v1.
@mauvilsa Gotcha. I was having trouble running the tests in my virtual env, but I found the commands to use in the circleci config; I'll get this fixed shortly! |
@mauvilsa got the tests and CI passing! Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is looking good. But some work is needed. See the comments.
Thanks for the feedback! I believe I have address these in the latest commit(s). |
for more information, see https://pre-commit.ci
That last set of fixes broke nested dataclasses on 3.12, and |
for more information, see https://pre-commit.ci
Quality Gate passedIssues Measures |
What does this PR do?
This PR includes a few small, related fixes for non-stdlib (possibly annotated) dataclasses and 3.12-style type aliases:
attrs
class instantiation.Annotated
types where needed.TypeAliasType
where needed. (This and the prior are commonly used with FastAPI)Before submitting