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

Update dependencies, fix pydantic-core usage, fix CI issues #7150

Merged
merged 2 commits into from Aug 16, 2023

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented Aug 16, 2023

  • Update pydantic-core to 2.6.0
    • The main changes in pydantic required were changes to handling of union schemas to handle the case where the choices field might have labels. I have not added tests for this, just gotten the code to type-check. I think we can add tests when we expose this functionality into pydantic somehow.
  • Update all other dependencies (I just ran make refresh-lockfiles). This included pyright and ruff, which resulted in needing to change some stuff for type-checking/linting.
    • While addressing updates to pyright's type checking, I noticed that we no longer need to check for indirect schema references in the tagged union schema, so I removed that code.
  • Fix the pydantic test that has been causing the pydantic-core CI to fail due to updated type serialization. (It was failing because it was checking that two instances of type str that were equal were actually the same object in memory, which clearly isn't guaranteed. It wasn't unreasonable to want them to be the same, because they were previously both the exact str instance FooEnum.FOO.value, but anyway I don't think it should be required and I changed the test to just check the types were exactly the same and the values were equal).

Selected Reviewer: @lig

@cloudflare-pages
Copy link

cloudflare-pages bot commented Aug 16, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1aa2d46
Status: ✅  Deploy successful!
Preview URL: https://1575e8df.pydantic-docs2.pages.dev
Branch Preview URL: https://use-pydantic-core-2-6-0.pydantic-docs2.pages.dev

View logs

@dmontagu
Copy link
Contributor Author

please review

@dmontagu dmontagu merged commit 6e3e931 into main Aug 16, 2023
49 checks passed
@dmontagu dmontagu deleted the use-pydantic-core-2.6.0 branch August 16, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants