roshanjrajan-zip opened a new pull request, #2822:
URL: https://github.com/apache/thrift/pull/2822
<!-- Explain the changes in the pull request below: -->
In Python, when using map, the generated code would not output the full path
for the value that was defined in a separate file. This change outputs the full
path for the typeso that the generated code is correct.
There is a test case the shows the code is properly generated.
Previously the code would output this -
```python
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException,
TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec
from enum import IntEnum
import sys
from .ttypes import *
typeConversion = {
TestEnum.TestEnum0: SharedEnum.SharedEnum0,
TestEnum.TestEnum1: SharedEnum.SharedEnum1,
}
```
And know it outputs this -
```python
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException,
TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec
from enum import IntEnum
import sys
from .ttypes import *
typeConversion = {
TestEnum.TestEnum0: shared_types.ttypes.SharedEnum.SharedEnum0,
# Change
TestEnum.TestEnum1: shared_types.ttypes.SharedEnum.SharedEnum1,
# Change
}
```
<!-- We recommend you review the checklist/tips before submitting a pull
request. -->
- [ ] Did you create an [Apache
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?
([Request account here](https://selfserve.apache.org/jira-account.html), not
required for trivial changes)
- [ ] If a ticket exists: Does your pull request title follow the pattern
"THRIFT-NNNN: describe my issue"?
- [x] Did you squash your changes to a single commit? (not required, but
preferred)
- [x] Did you do your best to avoid breaking changes? If one was needed,
did you label the Jira ticket with "Breaking-Change"?
- [ ] If your change does not involve any code, include `[skip ci]` anywhere
in the commit message to free up build resources.
<!--
The Contributing Guide at:
https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
has more details and tips for committing properly.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]