This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Refresh Python module #176
Closed
Closed
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
602cf28
Refresh Python module
Dreamsorcerer 0b3ec5f
Update test_client.py
Dreamsorcerer 4d0249c
Update test_client.py
Dreamsorcerer 0803966
Update min versions
Dreamsorcerer 51597aa
Update script instead of README
Dreamsorcerer 325c8a2
Update tests
Dreamsorcerer 43f2556
Merge master
Dreamsorcerer fa89859
Bump dependency and improve compatibility of script
Dreamsorcerer ab2d154
Merge master
Dreamsorcerer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
There was a problem hiding this comment.
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 apip 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.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protocolbuffers/protobuf#1491
There was a problem hiding this comment.
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 inpython/tests
, but no idea how compatible that is to now current code. It fails, as you might expect.