Deprecate Python 3.4 and 3.5.

This commit is contained in:
Valentin Lorentz 2021-07-15 22:29:56 +02:00
parent bdb80b196a
commit aa6bd7257d
2 changed files with 11 additions and 2 deletions

View File

@ -47,7 +47,7 @@ jobs:
- name: Install
run: |
python3 setup.py install
LIMNORIA_WARN_OLD_PYTHON=0 python3 setup.py install
- name: Test with unittest
run: |

View File

@ -82,10 +82,19 @@ if version:
fd.close()
if sys.version_info < (3, 4, 0):
sys.stderr.write("Limnoria requires Python 3.4 or newer.")
sys.stderr.write("Limnoria requires Python 3.6 or newer.")
sys.stderr.write(os.linesep)
sys.exit(-1)
if sys.version_info < (3, 6, 0) \
and os.environ.get('LIMNORIA_WARN_OLD_PYTHON') != '0':
sys.stderr.write('====================================================\n')
sys.stderr.write('Limnoria support for Python versions older than 3.6\n')
sys.stderr.write('is deprecated and may be removed in the near future.\n')
sys.stderr.write('You should upgrade ASAP.\n')
sys.stderr.write('Install will continue in 60s.\n')
sys.stderr.write('====================================================\n')
time.sleep(60)
import textwrap