From cd6572e425250308671a88943435d9a56852c875 Mon Sep 17 00:00:00 2001
From: Jayant Jain <jayantj@google.com>
Date: Mon, 14 Mar 2022 12:52:32 +0000
Subject: [PATCH] Migrate CA off python2 to python3

---
 cluster-autoscaler/update_toc.py    | 2 +-
 hack/boilerplate/boilerplate.py     | 2 +-
 hack/boilerplate/boilerplate.py.txt | 2 +-
 hack/scripts/break_mig.py           | 7 +------
 hack/scripts/ca_metrics_parser.py   | 7 +------
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/cluster-autoscaler/update_toc.py b/cluster-autoscaler/update_toc.py
index 4af4664f23..34a7d2639b 100755
--- a/cluster-autoscaler/update_toc.py
+++ b/cluster-autoscaler/update_toc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright 2017 The Kubernetes Authors.
 #
diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py
index f12dfeeffd..9c374c4c04 100755
--- a/hack/boilerplate/boilerplate.py
+++ b/hack/boilerplate/boilerplate.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright 2015 The Kubernetes Authors.
 #
diff --git a/hack/boilerplate/boilerplate.py.txt b/hack/boilerplate/boilerplate.py.txt
index a2e72e5988..9fdb989ce7 100644
--- a/hack/boilerplate/boilerplate.py.txt
+++ b/hack/boilerplate/boilerplate.py.txt
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright YEAR The Kubernetes Authors.
 #
diff --git a/hack/scripts/break_mig.py b/hack/scripts/break_mig.py
index 53858892d5..f487ce2c59 100755
--- a/hack/scripts/break_mig.py
+++ b/hack/scripts/break_mig.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright 2017 The Kubernetes Authors.
 #
@@ -41,11 +41,6 @@ import subprocess
 import sys
 import time
 
-try:
-  range = xrange   # Python 2
-except NameError:  # Python 3
-  pass
-
 
 InstanceInfo = collections.namedtuple("InstanceInfo", 'name ip')
 
diff --git a/hack/scripts/ca_metrics_parser.py b/hack/scripts/ca_metrics_parser.py
index 155bdbef6f..51083c0d74 100755
--- a/hack/scripts/ca_metrics_parser.py
+++ b/hack/scripts/ca_metrics_parser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright 2017 The Kubernetes Authors.
 #
@@ -22,11 +22,6 @@ from __future__ import print_function
 import argparse
 import json
 
-try:
-  range = xrange   # Python 2
-except NameError:  # Python 3
-  pass
-
 
 class CAMetric(object):
 
-- 
GitLab