[
https://issues.apache.org/jira/browse/IMPALA-14730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18057456#comment-18057456
]
ASF subversion and git services commented on IMPALA-14730:
----------------------------------------------------------
Commit cefb0ed9a83efd7e731435b0bfe057db94d30f22 in impala's branch
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=cefb0ed9a ]
IMPALA-14730: Update prettytable for Python 3.12
Updates prettytable to 2.5.0 to fix "SyntaxWarning: invalid escape
sequence" from Python 3.12. It requires Python 3.6+. Preserves
prettytable 0.7.2 for Python 2.7.
Prettytable 3 changed packaging in a way that complicates the upgrade,
so this fix sticks with prettytable 2. It also now requires wcwidth, so
we choose the last 0.2.x release, which is from the same era as the
prettytable 2.5.0 release.
Testing: ran test_shell_interactive.py and some ad-hoc testing of
table-formatted output.
Change-Id: Ied2eb2055d68fde8d241c93f9d268d6be92f8879
Reviewed-on: http://gerrit.cloudera.org:8080/23948
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> First run of impala-shell with Python 3.12 produces warnings
> ------------------------------------------------------------
>
> Key: IMPALA-14730
> URL: https://issues.apache.org/jira/browse/IMPALA-14730
> Project: IMPALA
> Issue Type: Bug
> Components: Clients
> Affects Versions: Impala 5.0.0
> Reporter: Michael Smith
> Assignee: Michael Smith
> Priority: Major
>
> The first run of impala-shell with Python 3.12 produces warnings like
> {code}
> /home/msmith2.linux/impala/shell/build/python3_venv/lib/python3.12/site-packages/prettytable.py:74:
> SyntaxWarning: invalid escape sequence '\['
> _re = re.compile("\033\[[0-9;]*m")
> /home/msmith2.linux/impala/shell/build/python3_venv/lib/python3.12/site-packages/prettytable.py:800:
> SyntaxWarning: invalid escape sequence '\{'
> self.vertical_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
> /home/msmith2.linux/impala/shell/build/python3_venv/lib/python3.12/site-packages/prettytable.py:801:
> SyntaxWarning: invalid escape sequence '\{'
> self.horizontal_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
> /home/msmith2.linux/impala/shell/build/python3_venv/lib/python3.12/site-packages/prettytable.py:802:
> SyntaxWarning: invalid escape sequence '\{'
> self.junction_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
> using legacy validation callback
> Starting Impala Shell with no authentication using Python 3.12.3
> {code}
> After that run, the .pyc files are used and it doesn't appear again. This is
> mildly ugly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]