You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Tak-Lon (Stephen) Wu (Jira)" <ji...@apache.org> on 2025/09/11 18:42:00 UTC

[jira] [Updated] (HBASE-29454) Update hbase-examples scripts to be compatible with Python 3

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

Tak-Lon (Stephen) Wu updated HBASE-29454:
-----------------------------------------
    Affects Version/s: 4.0.0-alpha-1

> 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
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Kevin Geiszler
>            Assignee: Kevin Geiszler
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.0.0-alpha-1
>
>
> 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)