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

build(deps-dev): update pydantic requirement from ~=1.0 to ~=2.4 #56

Merged
merged 13 commits into from
Dec 19, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 28, 2023

Updates the requirements on pydantic to permit the latest version.

Release notes

Sourced from pydantic's releases.

v2.4.2 2023-09-27

What's Changed

Fixes

New Contributors

Full Changelog: pydantic/pydantic@v2.4.1...v2.4.2/

Changelog

Sourced from pydantic's changelog.

v2.4.2 (2023-09-27)

GitHub release

What's Changed

Fixes

New Contributors

v2.4.1 (2023-09-26)

GitHub release

What's Changed

Packaging

Fixes

v2.4.0 (2023-09-22)

GitHub release

What's Changed

Packaging

New Features

... (truncated)

Commits
  • d1634da Prepare relese 2.4.2 (#7671)
  • 0e33bd0 Update Pydantic V1 to 1.10.13 (#7675)
  • 154e679 docs: Mixing of V1/V2 models is not supported in generics (#7663)
  • 7193693 Added small note to use ValidationInfo over FieldValidationInfo. (#7670)
  • 1377c04 Fix xfailed test for generic model signatures (#7658)
  • ea9aa13 Fix models_json_schema for generic models (#7654)
  • 97c0199 Fix json schema generation for recursive models (#7653)
  • 861cfe3 Revert "Fix typo in docs for new private dunder pydantic method names (#7657)...
  • 24e9222 Fix typo in docs for new private dunder pydantic method names (#7657)
  • c04e8e2 Correct allowed formats for datetime.timedelta parsing in docs (#7652)
  • Additional commits viewable in compare view

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Updates the requirements on [pydantic](https://github.com/pydantic/pydantic) to permit the latest version.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v1.0...v2.4.2)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 28, 2023
Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw marked this pull request as draft October 28, 2023 23:09
This is almost certainly broken.

Signed-off-by: William Woodruff <[email protected]>
@tetsuo-cpp
Copy link
Contributor

I'll go ahead and fix this up.

@tetsuo-cpp tetsuo-cpp marked this pull request as ready for review November 8, 2023 06:43
@tetsuo-cpp tetsuo-cpp requested a review from woodruffw November 8, 2023 06:57
@tetsuo-cpp
Copy link
Contributor

Hmm, weird. It seems that the schemafy! macro is returning an empty token stream (which is causing the imports in main.rs to fail). But it isn't panicking or anything by the look of it so it's hard to tell what's going on.

I've been trying to use log_syntax! to give a bit of visibility in the Schemafy crate but haven't figured out what's going on yet.

@woodruffw do you have a hunch for what this is? And is there a better way to debug proc macros? At the moment, I've been more or less reduced to print debugging. 🥲

@woodruffw
Copy link
Collaborator

@woodruffw do you have a hunch for what this is? And is there a better way to debug proc macros? At the moment, I've been more or less reduced to print debugging. 🥲

My best guess is that it's because of a breaking change in pydantic's schema generation: it looks like they're generating $defs rather than definitions, which (I believe) is in a newer draft of the spec. So it's possibly that Schemafy just doesn't support that yet.

And is there a better way to debug proc macros?

Not a great one, but I generally use a combination of cargo-expand and cargo doc in this case (to see the models after they're generated).

Overall IMO, this is pretty low priority -- we should probably patch this upstream if possible, but Pydantic v1 is still being maintained so there's no urgent need for us to upgrade. So we can hold off on this for a bit and revisit when there's less to do on the PyCA side 🙂

Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 20, 2023

A newer version of pydantic exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@woodruffw woodruffw merged commit 66da203 into main Dec 19, 2023
5 checks passed
@woodruffw woodruffw deleted the dependabot/pip/pydantic-approx-eq-2.4 branch December 19, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants