Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.3.0
-
None
-
ghx-label-2
Description
Python 3 removed several deprecated functions / types.
# sys.maxint is removed, replace with sys.maxsize sys.maxint -> sys.maxsize # file() is removed, use open() file() -> open() # Long is gone, int is now equivalent to long, can use int from future from builtins import int long() -> int() # e.message is gone, replace with str(e) e.message -> str(e)
There are a grab bag of others like strings.letters becoming string.ascii_letters and codecs moving to a different package.
This is also a good time to get the new behavior for round().
See these descriptions:
https://python-future.org/compatible_idioms.html#file
https://python-future.org/compatible_idioms.html#long-integers
This corresponds to these pylint checks:
file-builtin
long-builtin
invalid-str-codec
round-builtin
deprecated-string-function
sys-max-int
exception-message-attribute