Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Refresh Python module #176

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pb2 files can be regenerated by running:

```
python3 -m grpc_tools.protoc -I../proto/ --python_out=gubernator/ --pyi_out=gubernator/ --grpc_python_out=gubernator/ --mypy_grpc_out=gubernator/ ../proto/*.proto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this stuff to a bash script in proto directory? And include a pip install for the tools.

And preferably we shouldn't need post-processing with sed commands. Looks like it's a matter of getting CWD or input paths right to fix that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And preferably we shouldn't need post-processing with sed commands. Looks like it's a matter of getting CWD or input paths right to fix that.

Literally spent a couple of hours looking at this. In summary, it appears that Google have no interest in supporting modules which would require relative imports. It might be possible to get something to work by changing the proto directory, but I figured that might break things elsewhere. Feel free to have a go yourself though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can probably tell, we don't use this Python functionality anymore. At least, not for Python 3. I'm thinking the entire Python client needs to be reimplemented from protos and disregard any consideration for legacy requirements.

I committed some changes to my branch for a genproto.sh script that already exists but needed some cleaning up. It does generate the code for Go and Python ok. There's some old unit tests in python/tests, but no idea how compatible that is to now current code. It fails, as you might expect.

Copy link
Author