langchain-ai / langsmith-sdk

LangSmith Client SDK Implementations
https://docs.smith.langchain.com/
MIT License
421 stars 80 forks source link

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

Open CNSeniorious000 opened 5 months ago

CNSeniorious000 commented 5 months 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 5 months ago

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