python-trio / purerpc

Native, async Python gRPC client and server implementation supporting asyncio, uvloop, and trio
Apache License 2.0
217 stars 15 forks source link

protoc_plugin: use protoc like import statements #21

Closed ledmonster closed 4 years ago

ledmonster commented 5 years ago

instead of generating import statements like:

import google.protobuf.empty_pb2

generate

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2

like default protobuf python compiler.

It's convenient for modifing protobuf import path using protobuf-gen like tools.

standy66 commented 4 years ago

Hi! Thanks for your contribution. I am going to merge this PR.