Open paskozdilar opened 3 months ago
I have got the same issue. I'm running the generation on Linux with betterproto v2.0.0b6
. Adding any uppercase letter to any part of the package name in the .proto
causes the same import error, where there are imports that don't exist in the parent __init__.py
. Problem goes away if I use all lowercase letters.
Summary
Title
Reproduction Steps
This protofile works:
This doesn't:
With the latter, betterproto compiles to this:
The
from .. import PEmpty
is invalid import as nothing exists in the parent package.Command used:
Python environment (output of
pip freeze
):Expected Results
Correct code generated
Actual Results
Incorrect code generated
System Information
libprotoc 3.12.4 Python 3.11.0rc1 Name: betterproto Version: 2.0.0b6 Summary: A better Protobuf / gRPC generator & library Home-page: https://github.com/danielgtaylor/python-betterproto Author: Daniel G. Taylor Author-email: danielgtaylor@gmail.com License: MIT Location:
Requires: grpclib, python-dateutil, typing-extensions
Required-by:
Checklist
pip install -U --pre betterproto
, if possible.