dropbox / pb-jelly

A protobuf code generation framework for the Rust language developed at Dropbox.
Apache License 2.0
610 stars 25 forks source link

Migrate codegen.py to Python3 #37

Closed ParkMyCar closed 3 years ago

ParkMyCar commented 3 years ago

Python2 is dead, long live python2!

codegen.py in the pb-jelly-gen crate is a protoc plugin that powers the Rust code generation. We should migrate this to python3

mitsuhiko commented 3 years ago

In which way does it not support Python 3? Looks like it supports Python 3 just fine.

craftytrickster commented 3 years ago

In which way does it not support Python 3? Looks like it supports Python 3 just fine.

It says specifically in the README that it requires python 2.

https://github.com/dropbox/pb-jelly/blob/master/README.md#generating-rust-code

If this is not the case, the README should be updated

mitsuhiko commented 3 years ago

Seems like an oversight. It appears to run on Python 3, it uses six internally and the main README calls out installing Python 3.

nipunn1313 commented 3 years ago

Yeah - I believe the script is actually python2/python3 compatible (internally at DBX - it's used in multiple environments, some of which are python3 and some of which are still python2)

nipunn1313 commented 3 years ago

The type annotations are py2 compatible which may be the source of the confusion

nipunn1313 commented 3 years ago

I updated the comment in README to correctly reference this and filed #40