From 7942d78751e0bedb9d38a0bf0bb7728892b5040c Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 29 Jun 2022 13:10:51 -0700 Subject: [PATCH] manage: Remove ineffective Python 2 check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 2 can’t parse this file, so it never gets as far as running the check. This isn’t really a problem anymore. The python → python2 symlink is optional and deprecated in Ubuntu 20.04 and Debian 11; it’s removed in Ubuntu 22.04 and Debian 12. (Also the <= was weird.) Signed-off-by: Anders Kaseorg --- manage.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/manage.py b/manage.py index d40943c960..a17630ac8b 100755 --- a/manage.py +++ b/manage.py @@ -2,21 +2,15 @@ import configparser import os import sys +from collections import defaultdict from typing import Dict, List, Optional -if sys.version_info <= (3, 0): - print("Error: Zulip is a Python 3 project, and cannot be run with Python 2.") - print("Use e.g. `/path/to/manage.py` not `python /path/to/manage.py`.") - sys.exit(1) - BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) from scripts.lib.setup_path import setup_path setup_path() -from collections import defaultdict - from django.core.management import ManagementUtility, get_commands from django.core.management.color import color_style