You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/21 16:25:00 UTC

[jira] [Commented] (IMPALA-11997) impala-shell: base64.encodestring has been removed in python3.9

    [ https://issues.apache.org/jira/browse/IMPALA-11997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703280#comment-17703280 ] 

ASF subversion and git services commented on IMPALA-11997:
----------------------------------------------------------

Commit 86f9e881a45942abfde65b4da72c551c97f69449 in impala's branch refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=86f9e881a ]

IMPALA-11997: Switch encodestring to encodebytes in Python 3

encodestring has been a deprecated alias to encodebytes since Python
3.1. It was removed in Python 3.9. However encodebytes was only added in
Python 3.1, so we need to test and use the appropriate call for each
version.

Change-Id: If802eafa984a980d4442c4891876140ff9708096
Reviewed-on: http://gerrit.cloudera.org:8080/19635
Reviewed-by: Abhishek Rawat <ar...@cloudera.com>
Tested-by: Michael Smith <mi...@cloudera.com>


> impala-shell: base64.encodestring has been removed in python3.9
> ---------------------------------------------------------------
>
>                 Key: IMPALA-11997
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11997
>             Project: IMPALA
>          Issue Type: Task
>          Components: Clients
>    Affects Versions: Impala 4.2.0
>            Reporter: Abhishek Rawat
>            Assignee: Michael Smith
>            Priority: Critical
>             Fix For: Impala 4.3.0
>
>
> When using impala-shell v4.2 with python 3.10 I get following error:
> {code:java}
> Starting Impala Shell with LDAP-based authentication using Python 3.10.10
> SSL is enabled. Impala server certificates will NOT be verified (set --ca_cert to change)
> LDAP password for csso_arawat: 
> Warning: --connect_timeout_ms is currently ignored with HTTP transport.
> Error connecting: AttributeError, module 'base64' has no attribute 'encodestring'
> klist: Cache not found: API:2AC1D3D7-13D7-4DD7-BEA7-DF0F4A32A462
> ***********************************************************************************
> Welcome to the Impala shell.
> (Impala Shell v4.3.0a1 (cda4114) built on Thu Feb  2 18:18:16 PST 2023)
> The HISTORY command lists all shell commands in chronological order. {code}
> I only found one hit:
> {code:java}
> root@impala:~/Impala# git grep -i 'encodestring'
> shell/impala_client.py:      auth = base64.encodestring(user_passwd.encode()).decode().strip('\n') {code}
> We should probably use 'base64.encodebytes' instead.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org