[ 
https://issues.apache.org/jira/browse/THRIFT-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylwester Lachiewicz resolved THRIFT-1697.
------------------------------------------
    Resolution: Won't Fix

Implicit relative imports were a Python 2 mechanism; the project is 
Python-3-only and generated code uses Python 3 import semantics. The 2012 patch 
never applied. Closing as Won't Fix.

> Generate *explicit* relative imports in Python, rather than implicit ones
> -------------------------------------------------------------------------
>
>                 Key: THRIFT-1697
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1697
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Python - Compiler
>            Reporter: Alex Gaynor
>            Priority: Major
>         Attachments: thrift-1697-python-relative-imports.2.patch, 
> thrift-1697-python-relative-imports.patch
>
>
> Currently the compiler generates code that looks like:
> import ttypes
> Which relies on the implicit import machinery to load the module in the same 
> directory.
> It would be much better to use
> from . import ttypes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to