Skip to content

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

Merged
dmontagu merged 2 commits intomainfrom
use-pydantic-core-2.6.0
Aug 16, 2023
Merged

Update dependencies, fix pydantic-core usage, fix CI issues#7150
dmontagu merged 2 commits intomainfrom
use-pydantic-core-2.6.0

Conversation

@dmontagu
Copy link
Copy Markdown
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-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-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
Copy Markdown
Contributor Author

please review

@dmontagu dmontagu merged commit 6e3e931 into main Aug 16, 2023
@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.

4 participants