appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
554 stars 76 forks source link

Import path resolution behavior #120

Open mjmdavis opened 5 years ago

mjmdavis commented 5 years ago

When importing, the path is always relative to the file being processed. https://github.com/appnexus/pyrobuf/blob/master/pyrobuf/parse_proto.py#L265

Afiak this is inconsistent with the default protoc behaviour. Changing the line to something like the below might break some current workflows. Is the policy to stick to protoc behavior? This could also be controlled by a command line flag.

actual_fname = fname if os.path.isabs(fname) else os.path.join(os.getcwd(), fname)