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

Upgrade to Pydantic V2 #998

Open
ryneeverett opened this issue Jul 14, 2023 · 5 comments
Open

Upgrade to Pydantic V2 #998

ryneeverett opened this issue Jul 14, 2023 · 5 comments

Comments

@ryneeverett
Copy link
Collaborator

See #997.

https://docs.pydantic.dev/latest/migration/

@ChasNelson1990
Copy link
Contributor

Any news on this? Is it part of the bugwarrior v2.0 release (#1030)?

I ask because the current Arch Linux packages (https://aur.archlinux.org/packages?K=bugwarrior) are both broken. The main package is broken because it's missing #1019 and the -git package because Arch's system python pydantic is now version 2.7.

@ryneeverett
Copy link
Collaborator Author

At this point I'm not planning to prioritize it for the 2.0 release because it seems likely that pydantic-1.x will continue to be available for quite some time on all other major distributions. It is unfortunate that Arch doesn't have the capacity to support versioned dependencies.

@NexAdn
Copy link
Contributor

NexAdn commented Aug 15, 2024

How about just using the compatiblilty namespace for now? This should allow running bugwarrior with pydantic v2 while avoiding the need to upgrade to v2 features immediately.

@ryneeverett ryneeverett added this to the release-next milestone Aug 15, 2024
@ryneeverett
Copy link
Collaborator Author

I didn't know about that. Nice!

If it turns out to be as easy as it looks there's no reason this shouldn't happen for the next bugwarrior release. I've added this to the milestone because we should at least try the compatibility namespace approach even though it is unlikely this issue will be fully resolved.

NexAdn added a commit to NexAdn/bugwarrior that referenced this issue Sep 17, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done.

Issue: GothenburgBitFactory#998
NexAdn added a commit to NexAdn/bugwarrior that referenced this issue Sep 17, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done.

Issue: GothenburgBitFactory#998
NexAdn added a commit to NexAdn/bugwarrior that referenced this issue Sep 19, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done. This also raises the minimum requirement to
pydantic >= 2, as the v1 compat modules are not available in pydantic
v1. As discussed in the PR [0], this new version requirement was
accepted due to widespread adoption of pydantic v2 in major
distributions.

Issue: GothenburgBitFactory#998

[0] GothenburgBitFactory#1068 (review)
NexAdn added a commit to NexAdn/bugwarrior that referenced this issue Sep 19, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done. This also raises the minimum requirement to
pydantic >= 2, as the v1 compat modules are not available in pydantic
v1. As discussed in the PR [0], this new version requirement was
accepted due to widespread adoption of pydantic v2 in major
distributions.

Issue: GothenburgBitFactory#998

[0] GothenburgBitFactory#1068 (review)
NexAdn added a commit to NexAdn/bugwarrior that referenced this issue Sep 19, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done. This also raises the minimum requirement to
pydantic >= 2, as the v1 compat modules are not available in pydantic
v1. As discussed in the PR [0], this new version requirement was
accepted due to widespread adoption of pydantic v2 in major
distributions.

Issue: GothenburgBitFactory#998

[0] GothenburgBitFactory#1068 (review)
ryneeverett pushed a commit that referenced this issue Sep 20, 2024
This should allow using the existing pydantic v1 features while
migration to v2 is not done. This also raises the minimum requirement to
pydantic >= 2, as the v1 compat modules are not available in pydantic
v1. As discussed in the PR [0], this new version requirement was
accepted due to widespread adoption of pydantic v2 in major
distributions.

Issue: #998

[0] #1068 (review)
@ryneeverett ryneeverett removed this from the release-next milestone Sep 20, 2024
@ryneeverett
Copy link
Collaborator Author

Thanks to @NexAdn we no longer have pydantic-1 as a dependency which relieves the distribution concerns. Remaining work is to actually switch over to the pydantic-2 API, but that is not urgent.

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

No branches or pull requests

3 participants