From 185f177f85eeb879ad0f1c8a98e655f9c575072b Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 30 Nov 2020 12:59:05 +0000 Subject: [PATCH] Change allow Python 3.9.1 Fix under py2, a hachoir config value, without 'readline' sys.module, using the `--daemon` SG startup option, fails. Change properly output help, without the false exception prepended. --- CHANGES.md | 7 ++++++- lib/hachoir_py2/core/config.py | 2 +- sickgear.py | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b480d5c..3698e56 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.23.3 (2020-11-30 17:20:00 UTC) +### 0.23.4 (2020-12-02 11:30:00 UTC) + +* Change allow Python 3.9.1 + + +### 0.23.3 (2020-11-30 17:20:00 UTC) * Change remove use of native Py 7zip as compressor found to crash Python binary under Linux with low memory conditions diff --git a/lib/hachoir_py2/core/config.py b/lib/hachoir_py2/core/config.py index e8a2a2f..583d031 100644 --- a/lib/hachoir_py2/core/config.py +++ b/lib/hachoir_py2/core/config.py @@ -8,7 +8,7 @@ import os max_string_length = 40 # Max. length in characters of GenericString.display max_byte_length = 14 # Max. length in bytes of RawBytes.display max_bit_length = 256 # Max. length in bits of RawBits.display -unicode_stdout = True # Replace stdout and stderr with Unicode compatible objects, disable for readline or ipython +unicode_stdout = False # Replace stdout and stderr with Unicode compatible objects, disable for readline or ipython # Global options debug = False # Display many informations usefull to debug diff --git a/sickgear.py b/sickgear.py index d466257..07327c4 100755 --- a/sickgear.py +++ b/sickgear.py @@ -40,7 +40,7 @@ warnings.filterwarnings('ignore', module=r'.*ssl_.*', message='.*SSLContext obje warnings.filterwarnings('ignore', module=r'.*zoneinfo.*', message='.*file or directory.*') warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*') -versions = [((2, 7, 9), (2, 7, 18)), ((3, 7, 1), (3, 8, 7)), ((3, 9, 0), (3, 9, 0))] # inclusive version ranges +versions = [((2, 7, 9), (2, 7, 18)), ((3, 7, 1), (3, 8, 7)), ((3, 9, 0), (3, 9, 1))] # inclusive version ranges if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)): print('Python %s.%s.%s detected.' % sys.version_info[:3]) print('Sorry, SickGear requires a Python version %s' % ', '.join(map( @@ -728,6 +728,8 @@ if '__main__' == __name__: except IOError as e: if e.errno != errno.EINTR: raise + except SystemExit as e: + print('%s' % ex(e)) except (BaseException, Exception) as e: import traceback print(traceback.format_exc())