From b08e38cf3dfcb2bcfdfad46665202548179a5423 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 May 2019 16:12:20 +0200 Subject: [PATCH] deploy-ng: add nag screen warning users who are still on Python 2 See #602 --- direct/src/dist/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 948891d19d..9ba567f067 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -13,6 +13,7 @@ import stat import struct import imp import string +import time import setuptools import distutils.log @@ -30,6 +31,15 @@ if sys.version_info < (3, 0): # Python 3 defines these subtypes of IOError, but Python 2 doesn't. FileNotFoundError = IOError + # Warn the user. They might be using Python 2 by accident. + print("=================================================================") + print("WARNING: You are using Python 2, which will soon be discontinued.") + print("WARNING: Please use Python 3 for best results and continued") + print("WARNING: support after the EOL date of December 31st, 2019.") + print("=================================================================") + sys.stdout.flush() + time.sleep(4.0) + def _parse_list(input): if isinstance(input, basestring):