aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-07-15 00:45:14 -0400
committerMike Frysinger <vapier@google.com>2020-08-31 11:07:52 -0400
commit7698778fb0f02c517ca0ffe6f85f80991e49e4a3 (patch)
tree7353b4f2e2170f3a9543ae5063bd6385d3b551ce
parent1baec120bf1814fca307928fd6e62982875a3951 (diff)
downloadrepohooks-7698778fb0f02c517ca0ffe6f85f80991e49e4a3.tar.gz
pre-upload: drop support for Python 2
Repo itself has been warning about Python 2 support for over a year, while pre-uplooad has been warning for about a month. We don't actually rip out any code (yet) to make sure this sticks in case we have to revert things temporarily. Bug: None Test: `repo upload` still works w/Python 3.6 Change-Id: Ia00bc3c9a59b0e6828df2691f47c6da94adb8038
-rwxr-xr-xpre-upload.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/pre-upload.py b/pre-upload.py
index ffefd09..94bb961 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright 2016 The Android Open Source Project
#
@@ -29,18 +29,9 @@ import sys
# Assert some minimum Python versions as we don't test or support any others.
-# We only support Python 2.7, and require 2.7.5+/3.4+ to include signal fix:
-# https://bugs.python.org/issue14173
-if sys.version_info < (2, 7, 5):
- print('repohooks: error: Python-2.7.5+ is required', file=sys.stderr)
- sys.exit(1)
-elif sys.version_info.major == 3 and sys.version_info < (3, 5):
+if sys.version_info < (3, 5):
print('repohooks: error: Python-3.5+ is required', file=sys.stderr)
sys.exit(1)
-elif sys.version_info < (3, 6):
- # We want to get people off of old versions of Python.
- print('repohooks: warning: Python-3.6+ is going to be required; '
- 'please upgrade soon to maintain support.', file=sys.stderr)
_path = os.path.dirname(os.path.realpath(__file__))