Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows DSI to be installed in environments alongside either pydantic v1 or v2
ResolvesDoesn't resolve #134, but does make it less impactful to end usersDescription
Pydantic retained the v1 codebase in a
v1
namespace when upgrading to v2, per their Migration Guide. Therefore it's possible to make minimal code changes while allowing DSI to co-exist alongside either Pydantic v1 or v2.According to the discussion on #217, this is an issue that might take some time to puzzle through fully given the need to support both Pydantic v1 and v2. This PR would alleviate the constraint on Pydantic without requiring additional testing or impact on end-users, so hopefully also relieves some pressure on the maintainers with regards to timescales. It might (I haven't checked for certain) enable a more gradual upgrade path, module-by-module.
The downside being that I've excluded pydantic from mypy checking for missing imports - I can change the code so that it isn't globally ignored, but I figured this would be an issue everywhere.
I completely understand if this gets closed as "not the right approach" - just thought I'd add what I can to help 🙂
Checklist
changie new
to create a changelog entry