faust
faust copied to clipboard
orjson never used ?
I found this code in utils/json.py
if typing.TYPE_CHECKING:
import orjson
else: # pragma: no cover
orjson = None # noqa
If I understand correctly, orjson
is imported only when type checking ? Shouldn't it be the opposite ?
if not typing.TYPE_CHECKING:
import orjson
...
This patch has removed the support of orjson
:
https://github.com/faust-streaming/faust/commit/0addeb9f5e0f447abc98a68e2f80ef1b31ef6370#diff-5ed855992d723de7bd9e127e572d89dd5fa3ad03816c3ba52de5fd7be53ba7eeL30
I don't see why orjson
support was removed, this patch is about converting collections.Counter
into a dict
.
As orjson
is way faster from the default lib, it could be great to try to reintroduce it.
Or we must remove the install faust[orjson]
setup.
This was reintroduced in https://github.com/faust-streaming/faust/pull/294.