-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi :) First of all, thank you for your work on pydantic-xml!
I am currently using version 2.0.0a1, and so far, everything works 👍
However, I have a different problem, related to Poetry and the pyproject.toml: I also use Poetry, but avoid upper bound versions, as this causes problems more often than it solves them. For example, here is a (pretty long) article explaining this topic: https://iscinumpy.dev/post/bound-version-constraints/
TL;DR: If you use upper bound versions (especially as a library), you will probably break code that depends on you. Worse, the other code cannot fix this, as it cannot relax your version constraints.
Yes, upper bound versions is the default for Poetry, but even they acknowledge that it might be problematic: https://python-poetry.org/docs/faq/#are-unbound-version-constraints-a-bad-idea
In my concrete case:
- Your
python = "^3.8"is equal topython = ">=3.8, <4.0", which conflicts with mypython = ">=3.10"
Suggestion: Change topython = ">=3.8" - Your
pydantic = "2.0"conflicts with mypydantic >= 2.0.2
Suggestion: Change topydantic >= 2
As a workaround for both, I changed my pydantic-xml dependency to: pydantic-xml = {version = "=2.0.0a1", python = ">=3.10, <4.0"}
Additionally, unless you have a concrete reason not to, it could be beneficial for others if you relax all the upper bounds on the dependencies. Thank you!