I am experiencing a dependency issue with "pendulu...
# ask-community
g
I am experiencing a dependency issue with "pendulum" in prefect that doesnt seem to make sense; I am attempting to add "msgraph-sdk" package to my internal package ("prefect-trellis") but getting this error from poetry:
Copy code
Because no versions of msgraph-sdk match >1.4.0,<2.0.0
 and msgraph-sdk (1.4.0) depends on microsoft-kiota-serialization-form (>=0.1.0), msgraph-sdk (>=1.4.0,<2.0.0) requires microsoft-kiota-serialization-form (>=0.1.0).
And because no versions of microsoft-kiota-serialization-form match >0.1.0
 and microsoft-kiota-serialization-form (0.1.0) depends on pendulum (>=3.0.0), msgraph-sdk (>=1.4.0,<2.0.0) requires pendulum (>=3.0.0).
And because prefect (2.19.6) depends on pendulum (<3.0)
 and no versions of prefect match >2.19.6,<3.0.0, msgraph-sdk (>=1.4.0,<2.0.0) is incompatible with prefect (>=2.19.6,<3.0.0).
So, because prefect-trellis depends on both prefect (^2.19.6) and msgraph-sdk (^1.4.0), version solving failed.
reading this, it seems like Prefect has a dependency on pendulum < 3.0 while graph-sdk has dependency on pendulum >= 3.0; however checking prefect's requirement, I only see pendulum referenced in the client which requires pendulum >= 3.0.0, <4 https://github.com/PrefectHQ/prefect/blob/2c25cd0df52959d9c499cc0487ec52d7afe04dc8/requirements-client.txt#L21. Is this dependency on pendulum < 3.0 intended for the main prefect package?
n
hi @Grayson Wagstaff - what version of
prefect
are you trying to use?
g
hey @Nate, prefect 2.19.6
n
well it seems like
Copy code
microsoft-kiota-serialization-form
requires pendulum 3, but we dont support pendulum 3 in 2.x but we do in 3.x
I only see pendulum referenced in the client which requires pendulum >= 3.0.0, <4
which is what you're seeing here so, you can • downgrade the msgraph-sdk to when it used pendulum
< 3
• or try prefect 3.x if thats an option for you (it is a release candidate though)
g
thanks for the info, ill check out workarounds till prefect 3 is released 🙂 also found that the pendulum version is dependent on the python version, which seems odd but maybe just poetry miscalculating
Copy code
[[package]]
name = "prefect"
version = "2.19.6"
description = "Workflow orchestration and management."
optional = false
python-versions = ">=3.8"
files = [
    {file = "prefect-2.19.6-py3-none-any.whl", hash = "sha256:e2ff30da7daab65ea0a683af7a94581d2dbb95275b3d6cd0af7efd07ae4ce484"},
    {file = "prefect-2.19.6.tar.gz", hash = "sha256:a9f8ebd65b53e53e9d066fbb0395b1e788879460052119435b4ffbdaa9b6b04c"},
]

[package.dependencies]
pendulum = [
    {version = "<3.0", markers = "python_version < \"3.12\""},
    {version = ">=3.0.0,<4", markers = "python_version >= \"3.12\""},
]
n
oh yeah I forgot about that, that seems right. pendulum 3 requires 3.12
185 Views