Browse Source

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.
tags/release_0.23.4^2
JackDandy 4 years ago
parent
commit
185f177f85
  1. 7
      CHANGES.md
  2. 2
      lib/hachoir_py2/core/config.py
  3. 4
      sickgear.py

7
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 * Change remove use of native Py 7zip as compressor found to crash Python binary under Linux with low memory conditions

2
lib/hachoir_py2/core/config.py

@ -8,7 +8,7 @@ import os
max_string_length = 40 # Max. length in characters of GenericString.display max_string_length = 40 # Max. length in characters of GenericString.display
max_byte_length = 14 # Max. length in bytes of RawBytes.display max_byte_length = 14 # Max. length in bytes of RawBytes.display
max_bit_length = 256 # Max. length in bits of RawBits.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 # Global options
debug = False # Display many informations usefull to debug debug = False # Display many informations usefull to debug

4
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', module=r'.*zoneinfo.*', message='.*file or directory.*')
warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*') 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)): 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('Python %s.%s.%s detected.' % sys.version_info[:3])
print('Sorry, SickGear requires a Python version %s' % ', '.join(map( print('Sorry, SickGear requires a Python version %s' % ', '.join(map(
@ -728,6 +728,8 @@ if '__main__' == __name__:
except IOError as e: except IOError as e:
if e.errno != errno.EINTR: if e.errno != errno.EINTR:
raise raise
except SystemExit as e:
print('%s' % ex(e))
except (BaseException, Exception) as e: except (BaseException, Exception) as e:
import traceback import traceback
print(traceback.format_exc()) print(traceback.format_exc())

Loading…
Cancel
Save