Closed pzelnip closed 1 year ago
Also, if I disregard pip tools and install all my dependencies except garminconnect, and then manually pip install garminconnect
I get this error from pip:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sqlmodel 0.0.8 requires pydantic<2.0.0,>=1.8.2, but you have pydantic 2.4.2 which is incompatible.
Looking at sqlmodel's pyproject.toml, it looks like it specifies 1.8.2
or greater of Pydantic (but less than 2.0), which isn't compatible with garminconnect.
Digging a bit further, I didn't see Pydantic in garminconnect's direct dependencies. However, it does depend on garth, which in turn does depend on pydantic. I can't find the source repo for garth anywhere (!!).
Doing some digging though it looks like the last version of garth to be compatible with pydantic before 2.0 is 0.4.18, which is less than the 0.4.23 requirement for garminconnect
As such, I can't seem to figure out any workaround for getting both sqlmodel & garminconnect installed together until sqlmodel upgrades to pydantic 2.0 (which is likely a ways off)
Garth maintainer here. I'll look into ways to resolve this issue.
Garth depends on certain features only available in Pydantic 2, but there may be a way to support both versions of Pydantic.
Thanks for reporting the issue.
fwiw, sqlmodel is working making the transition to Pydantic 2: https://github.com/tiangolo/sqlmodel/issues/532
That being said, I'll still work on ways to support both Pydantic versions in the meantime.
@pzelnip can you try upgrading to Garth 0.4.34?
Garth now supports >= 1.10.13 (as tested), which is within the range sqlmodel supports.
Confirmed that garth 0.4.34 works with sqlmodel 0.0.8. Thanks!
With this, I think this issue can now be resolved, I could successfully install latest garminconnect & sqlmodel together.
I use this library & sqlmodel on the same project. I also use pip-tools to generate my requirements.txt file. The latest version of these two libraries are incompatible. With this
requirements.in
file:When I do:
I get:
This is with the latest version of pip-tools (7.3.0).