socotecio / django-socio-grpc

gRPC for Django.
https://django-socio-grpc.readthedocs.io/
Apache License 2.0
104 stars 22 forks source link

Update lark to the maintained PyPI package #325

Closed KevinGreen closed 1 month ago

KevinGreen commented 1 month ago

After release 0.12.0, lark-parser/lark started being published to pypi under the package name lark. For projects also depending on lark, this cause runtime issues since both packages publish the same 'lark' namespace.

Old package: https://pypi.org/project/lark-parser/ New package: https://pypi.org/project/lark/

Github for the project referencing the new package name: https://github.com/lark-parser/lark?tab=readme-ov-file#install-lark and the change where the project creator/maintainer changed the readme to reference the new package name for the 1.0 release: https://github.com/lark-parser/lark/commit/2ed4d5adce5fba9fbf1ea3454ba4099513bd1353

AMontagu commented 1 month ago

It look like we have som breaking change. @legau do you have time to look into it ?

KevinGreen commented 1 month ago

Thanks for running the tests @AMontagu, I had issues building wheels for grpcio but downgrading to python 3.12 fixed it so I'm able to run the test suite now.

I added a fix for the test failures. It turns out there was a change to the default value for maybe_placeholders from False to True (https://github.com/lark-parser/lark/releases/tag/1.0.0) so the optional comments at the start of the service and rpc lines were being included as None in the list of Tokens instead of just being omitted. Switching it to False made everything else work as expected.

I'm seeing a failure for test_message_to_dict_include_optional_not_one_of locally but I don't think it's related to my changes so I'm hoping it's just something to do with my local setup.