From 7c66577671115614753c37c62ea12b8a267c88fa Mon Sep 17 00:00:00 2001 From: Ilja Honkonen Date: Sun, 21 Mar 2021 16:05:27 +0200 Subject: [PATCH] Allow Python 3. --- src/depends.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/depends.py b/src/depends.py index 75be30e0..c4b8ddb9 100755 --- a/src/depends.py +++ b/src/depends.py @@ -7,10 +7,10 @@ import sys # Only really old versions of Python don't have sys.hexversion. We don't # support them. The logging module was introduced in Python 2.3 -if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0: +if not hasattr(sys, 'hexversion'): sys.exit( 'Python version: %s\n' - 'PyBitmessage requires Python 2.7.4 or greater (but not Python 3)' + 'PyBitmessage requires Python 2.7.4 or greater' % sys.version ) @@ -410,19 +410,12 @@ def check_dependencies(verbose=False, optional=False): # Python 2.7.4 is the required minimum. # (https://bitmessage.org/forum/index.php?topic=4081.0) - # Python 3+ is not supported, but it is still useful to provide - # information about our other requirements. logger.info('Python version: %s', sys.version) if sys.hexversion < 0x20704F0: logger.error( 'PyBitmessage requires Python 2.7.4 or greater' ' (but not Python 3+)') has_all_dependencies = False - if sys.hexversion >= 0x3000000: - logger.error( - 'PyBitmessage does not support Python 3+. Python 2.7.4' - ' or greater is required. Python 2.7.18 is recommended.') - sys.exit() check_functions = [check_ripemd160, check_sqlite, check_openssl] if optional: