Skip to content

Support for temporalio 1.10.0 #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
petersommerhoff opened this issue Apr 3, 2025 · 1 comment
Open

Support for temporalio 1.10.0 #494

petersommerhoff opened this issue Apr 3, 2025 · 1 comment

Comments

@petersommerhoff
Copy link

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

@petersommerhoff petersommerhoff changed the title Support for temporalio Support for temporalio 1.10.0 Apr 3, 2025
@msimacek
Copy link
Contributor

msimacek commented Apr 3, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants