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

feat: code gen produces same imports as grpcio #41

Closed stereobutter closed 1 year ago

stereobutter commented 1 year ago

without this change purerpc produces import statements of the form

import foo.bar.some_pb2 as foo_dot_bar_dot_some__pb2

whereas grpcio would produce

from foo.bar import some_pb2 as foo_dot_bar_dot_some__pb2

While equivalent where the import system is concerned, some tools and scripts exist for automatically fixing generated import statements (see for example https://github.com/cpcloud/protoletariat). These only work for import statements written in the latter form.

trio-bot[bot] commented 1 year ago

Hey @stereobutter, it looks like that was the first time we merged one of your PRs! Thanks so much! :tada: :birthday:

If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:

If you want to read more, here's the relevant section in our contributing guide.

Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you.

If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out!