You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2023/04/18 10:30:33 UTC

[GitHub] [thrift] Fokko commented on a diff in pull request #2588: THRIFT-5537: Remove python2

Fokko commented on code in PR #2588:
URL: https://github.com/apache/thrift/pull/2588#discussion_r1169796652


##########
lib/py/setup.py:
##########
@@ -80,29 +82,30 @@ def run_setup(with_binary):
     if with_binary:
         extensions = dict(
             ext_modules=[
-                Extension('thrift.protocol.fastbinary',
-                          extra_compile_args=['-std=c++11'],
-                          sources=[
-                              'src/ext/module.cpp',
-                              'src/ext/types.cpp',
-                              'src/ext/binary.cpp',
-                              'src/ext/compact.cpp',
-                          ],
-                          include_dirs=include_dirs,
-                          )
+                Extension(
+                    "thrift.protocol.fastbinary",
+                    extra_compile_args=["-std=c++11"],
+                    sources=[
+                        "src/ext/module.cpp",
+                        "src/ext/types.cpp",
+                        "src/ext/binary.cpp",
+                        "src/ext/compact.cpp",
+                    ],
+                    include_dirs=include_dirs,
+                )
             ],
-            cmdclass=dict(build_ext=ve_build_ext)
+            cmdclass=dict(build_ext=ve_build_ext),
         )
     else:
         extensions = dict()
 
     ssl_deps = []
     if sys.version_info[0] == 2:

Review Comment:
   This, and also the if below can be removed.



##########
lib/py/src/TMultiplexedProcessor.py:
##########
@@ -17,9 +17,9 @@
 # under the License.
 #
 
-from thrift.Thrift import TProcessor, TMessageType
-from thrift.protocol import TProtocolDecorator, TMultiplexedProtocol
-from thrift.protocol.TProtocol import TProtocolException
+from .thrift.Thrift import TProcessor, TMessageType

Review Comment:
   Was this change needed? I'm not a fan of relative imports because.



-- 
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: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org