Kevin Geiszler created HBASE-29454:
--------------------------------------

             Summary: Update hbase-examples scripts to be compatible with 
Python 3
                 Key: HBASE-29454
                 URL: https://issues.apache.org/jira/browse/HBASE-29454
             Project: HBase
          Issue Type: Task
            Reporter: Kevin Geiszler


There are some Python scripts in the hbase-examples directory that were never 
updated to be compatible with Python 3.  Running {{python3 -m compileall}} on 
these scripts reveals the following:

 
{code:java}
*** Error compiling 'hbase-examples/src/main/python/thrift1/DemoClient.py'...
  File "hbase-examples/src/main/python/thrift1/DemoClient.py", line 37
    print "row: " + row + ", values: ",
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

Python 3 compilation failed for 
hbase-examples/src/main/python/thrift1/demo_hbase_thrift_over_http_tls.py:
*** Error compiling 
'hbase-examples/src/main/python/thrift1/demo_hbase_thrift_over_http_tls.py'...
  File 
"hbase-examples/src/main/python/thrift1/demo_hbase_thrift_over_http_tls.py", 
line 40
    print "[INFO] setup connection"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

Python 3 compilation failed for 
hbase-examples/src/main/python/thrift2/DemoClient.py:
*** Error compiling 'hbase-examples/src/main/python/thrift2/DemoClient.py'...
  File "hbase-examples/src/main/python/thrift2/DemoClient.py", line 47
    print "Thrift2 Demo"
    ^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? 
{code}
 

 



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

Reply via email to