This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 8c04113157f7cf828fc3b8a4f3fc8e4db7f93c40
Author: Joe McDonnell <[email protected]>
AuthorDate: Fri Apr 28 15:45:55 2023 -0700

    IMPALA-9627 (followup): Switch push_to_asf.py to python 3
    
    push_to_asf.py asks the user for input. This recently
    switched from raw_input() to input(), because Python 3
    doesn't have a raw_input() function.
    
    Python 2's input() function has weird semantics. At the
    "[Y/n]:" prompt, typing y (no quotes) produces this error:
    NameError: name 'y' is not defined
    
    Instead, it wants 'y' (with quotes). This is because Python 2's
    input() function wants a python expression. This switches the
    script to use python3, which has the old behavior from
    raw_input().
    
    Testing:
     - Ran script with Python 3, hand tested the confirm_prompt function
    
    Change-Id: Ida49993bfea71ade9d335ac1ceb53788d0a57f69
    Reviewed-on: http://gerrit.cloudera.org:8080/19817
    Reviewed-by: Michael Smith <[email protected]>
    Tested-by: Joe McDonnell <[email protected]>
---
 bin/push_to_asf.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bin/push_to_asf.py b/bin/push_to_asf.py
index 828ed6b14..4e2803f0b 100755
--- a/bin/push_to_asf.py
+++ b/bin/push_to_asf.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -35,7 +35,6 @@
 # TODO: Improve console output: replace 'print' with format strings
 #       and use sys.stderr/sys.stdout.
 
-from __future__ import absolute_import, division, print_function
 import logging
 import optparse
 import os

Reply via email to