You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the Temporal Python SDK to work within GraalPy. I was able to get graalpy -m pip install temporalio to succeed including building the wheel (requires Rust and protoc).
However, when trying to run a Python script that uses Temporal, it fails with the following error:
In my understanding, the issue seems to be that the Temporal Python SDK uses Rust via pyo3.
After posting in the Temporal forum here, they suggested that the Temporal situation is similar to Pydantic. For Pydantic, there is this patch to make it work.
Is this assumption correct? If so, would it be possible to add support for temporalio in a similar fashion?
Any support here would be greatly appreciated. If there's any way I can contribute, I'd be happy to, although I'm rather new to the whole Python ecosystem.
Many thanks!
Peter
The text was updated successfully, but these errors were encountered:
PyO3 has upstream support for GraalPy since version 0.22. Pydantic doesn't need any patch in the lastest version and the patch you linked for 2.27.1 was just fixing a specific bug. Old versions of pydantic that used pre-0.22 pyo3 needed a much larger patch that had to add GraalPy compatibility to add pyo3 (well, we used to have a fork of pyo3 and reference that in the patch). Temporalio still uses 0.20 and it also uses pyo3-asyncio and pythonize that also use pyo3. Patching the package should be possible, but it's not trivial because of the rust dependencies referencing each other outside of python. Since you're already in contact with temporalio upstream, maybe you could first ask if they plan to update to a more recent pyo3? Note that if the reason they didn't update is that pyo3-asyncio hasn't been updated (it's unmaintained), then there is https://github.com/PyO3/pyo3-async-runtimes (a fork of pyo3-asyncio maintained by pyo3's maintainers)
Hi everyone,
I am trying to get the Temporal Python SDK to work within GraalPy. I was able to get
graalpy -m pip install temporalio
to succeed including building the wheel (requires Rust and protoc).However, when trying to run a Python script that uses Temporal, it fails with the following error:
ImportError: cannot load ~/linux-temporal-env/lib/python3.11/site-packages/temporalio/bridge/temporal_sdk_bridge.pyd: NFIUnsatisfiedLinkError: ~/linux-temporal-env/lib/python3.11/site-packages/temporalio/bridge/temporal_sdk_bridge.pyd: undefined symbol: _Py_FalseStruct
In my understanding, the issue seems to be that the Temporal Python SDK uses Rust via pyo3.
After posting in the Temporal forum here, they suggested that the Temporal situation is similar to Pydantic. For Pydantic, there is this patch to make it work.
Is this assumption correct? If so, would it be possible to add support for temporalio in a similar fashion?
Any support here would be greatly appreciated. If there's any way I can contribute, I'd be happy to, although I'm rather new to the whole Python ecosystem.
Many thanks!
Peter
The text was updated successfully, but these errors were encountered: