Skip to content

chore(deps): update dependency pydantic to v2 #776

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

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 4, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pydantic (changelog) ^1.6.1 -> ^1.6.1 || ^2.0.0 age adoption passing confidence

Release Notes

pydantic/pydantic (pydantic)

v2.0.1

Compare Source

First patch release of Pydantic V2

See the full changelog here

v2.0

Compare Source

First patch release of Pydantic V2

See the full changelog here

v1.10.11

Compare Source

  • Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch, #​6361 by @​SharathHuddar

v1.10.10

Compare Source

v1.10.9

Compare Source

v1.10.8

Compare Source

v1.10.7

Compare Source

  • Fix creating schema from model using ConstrainedStr with regex as dict key, #​5223 by @​matejetz
  • Address bug in mypy plugin caused by explicit_package_bases=True, #​5191 by @​dmontagu
  • Add implicit defaults in the mypy plugin for Field with no default argument, #​5190 by @​dmontagu
  • Fix schema generated for Enum values used as Literals in discriminated unions, #​5188 by @​javibookline
  • Fix mypy failures caused by the pydantic mypy plugin when users define from_orm in their own classes, #​5187 by @​dmontagu
  • Fix InitVar usage with pydantic dataclasses, mypy version 1.1.1 and the custom mypy plugin, #​5162 by @​cdce8p

v1.10.6

Compare Source

  • Implement logic to support creating validators from non standard callables by using defaults to identify them and unwrapping functools.partial and functools.partialmethod when checking the signature, #​5126 by @​JensHeinrich
  • Fix mypy plugin for v1.1.1, and fix dataclass_transform decorator for pydantic dataclasses, #​5111 by @​cdce8p
  • Raise ValidationError, not ConfigError, when a discriminator value is unhashable, #​4773 by @​kurtmckee

v1.10.5

Compare Source

v1.10.4

Compare Source

v1.10.3

Compare Source

NOTE: v1.10.3 was "yanked" from PyPI due to #​4885 which is fixed in v1.10.4


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@dbanty dbanty added 🥚breaking This change breaks compatibility dependencies and removed 🥚breaking This change breaks compatibility labels Jul 4, 2023
@renovate renovate bot force-pushed the renovate/pydantic-2.x branch from 9b064fc to 3cf28bb Compare July 7, 2023 20:57
@dbanty dbanty added this to the 0.15.0 milestone Jul 8, 2023
@dbanty
Copy link
Collaborator

dbanty commented Jul 8, 2023

This is going to be a very complicated upgrade—just following the errors hasn't gotten me very far. I don't think we get enough benefit from Pydantic v2 to be worth the effort, so I'm closing this. If someone else wants to figure out the manual upgrade path because they need v2 for some reason, be my guest!

@dbanty dbanty closed this Jul 8, 2023
@dbanty dbanty deleted the renovate/pydantic-2.x branch July 8, 2023 18:35
@renovate
Copy link
Contributor Author

renovate bot commented Jul 8, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 2.x releases. But if you manually upgrade to 2.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@johnthagen
Copy link
Collaborator

johnthagen commented Jul 18, 2023

@dbanty Just a note. Long term not supporting Pydantic v2 will have an effect on some users of openapi-python-client.

In our use case, we lock the version of openapi-python-client as a dev dependency in our Poetry projects. This is because we need to be able to regenerate our clients reproducible across CI and multiple developers (we lock all of our tooling for similar reasons, including nox, pytest, ruff, black etc.)

Because Poetry resolves all dependencies (both main and various development groups) as one so they can share the same virtual environment, this means that if openapi-python-client restricts Pydantic to <2, then our main apps also have this constraint.

In case it's useful, we've used these resources to help migrate to Pydantic v2 in our projects that aren't blocked by another dependency.

Thanks again for the great library!

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.

2 participants