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 :+1:
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 to python = ">=3.8, <4.0", which conflicts with my python = ">=3.10"
Suggestion: Change to python = ">=3.8"
Your pydantic = "2.0" conflicts with my pydantic >= 2.0.2
Suggestion: Change to pydantic >= 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!
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 :+1: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-ideaIn my concrete case:
python = "^3.8"
is equal topython = ">=3.8, <4.0"
, which conflicts with mypython = ">=3.10"
Suggestion: Change topython = ">=3.8"
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!