langchain-ai / langsmith-sdk

LangSmith Client SDK Implementations
https://smith.langchain.com/
MIT License
345 stars 59 forks source link

Issue: can we mark `orjson` as optional? Because it's incompatible with `pypy` #803

Open CNSeniorious000 opened 1 week ago

CNSeniorious000 commented 1 week ago

Issue you'd like to raise.

Looks like we only use orjson to speed up (de)serialization, so maybe it could be an optional-dependency, which is required in non-pypy environment?

Suggestion:

Setting a markers = "platform_python_implementation != 'PyPy'" in pyproject.toml and use another JSON parser to de(serialize) JSON (for example, pydantic-core's JSON parser or the std's one) if orjson is not installed.

hinthornw commented 1 week ago

Hmmm it should be possible. will chat with the team.