Status: New
Owner:
liu...@google.com
Labels: Type-Defect Priority-Medium
New issue 509 by
Pyro...@gmail.com: import public generates wrong python
code
http://code.google.com/p/protobuf/issues/detail?id=509
What steps will reproduce the problem?
1. Put all 3 attached files in one folder
2. Run protoc with --python_out=.
3. In a Python console try importing test3_pb2
What is the expected output? What do you see instead?
I expect the import to be performed properly, but instead I get
NameError: name 'test_pb2' is not defined
for line 49
If line 49 would have been
_M3.fields_by_name['m1'].message_type = test2_pb2.test_pb2._M1
instead of
_M3.fields_by_name['m1'].message_type = test_pb2._M1
it would have worked.
What version of the product are you using? On what operating system?
protobuf 2.5.0 on windows 7
python 2.7.2
Attachments:
test.proto 14 bytes
test2.proto 27 bytes
test3.proto 63 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings