From 7698778fb0f02c517ca0ffe6f85f80991e49e4a3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 15 Jul 2020 00:45:14 -0400 Subject: 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 --- pre-upload.py | 13 ++----------- 1 file 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__)) -- cgit v1.2.3