diff --git a/.travis.yml b/.travis.yml index de2bdf71..38fbbcdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ matrix: env: TOXENV=py38,codecov COVERAGE_ID=travis-ci TEST_RAW=yes - python: 3.9-dev env: TOXENV=py39,codecov TEST_QUICK=1 COVERAGE_ID=travis-ci TOXPYTHON=3.9 + - python: 3.10-dev + env: TOXENV=py310,codecov TEST_QUICK=1 COVERAGE_ID=travis-ci TOXPYTHON=3.10 - python: 2.7 os: windows language: shell @@ -41,6 +43,7 @@ matrix: allow_failures: - python: 2.6 - python: 3.9-dev + - python: 3.10-dev install: - pip install tox diff --git a/blessed/__init__.py b/blessed/__init__.py index aad51e80..13aafad2 100644 --- a/blessed/__init__.py +++ b/blessed/__init__.py @@ -4,6 +4,7 @@ http://pypi.python.org/pypi/blessed """ # std imports +import sys as _sys import platform as _platform if _platform.system() == 'Windows': @@ -11,11 +12,11 @@ else: from blessed.terminal import Terminal -if ('3', '0', '0') <= _platform.python_version_tuple() < ('3', '2', '2+'): +if (3, 0, 0) <= _sys.version_info[:3] < (3, 2, 3): # Good till 3.2.10 # Python 3.x < 3.2.3 has a bug in which tparm() erroneously takes a string. raise ImportError('Blessed needs Python 3.2.3 or greater for Python 3 ' 'support due to http://bugs.python.org/issue10570.') __all__ = ('Terminal',) -__version__ = '1.17.8' +__version__ = '1.17.9' diff --git a/docs/history.rst b/docs/history.rst index fb5ff479..19bfc2f0 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -46,6 +46,7 @@ Version History not attached. :ghissue:`69`. * deprecated: using argument ``_intr_continue`` to method :meth:`~Terminal.kbhit`, behavior is as though such value is always True since 1.9. + * bugfix: Now imports on 3.10+ 1.16 * introduced: Windows support?! :ghpull:`110` by :ghuser:`avylove`. diff --git a/tests/test_core.py b/tests/test_core.py index dd69a965..21b309a0 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -282,8 +282,7 @@ def test_python3_2_raises_exception(monkeypatch): """Test python version 3.0 through 3.2 raises an exception.""" import blessed - monkeypatch.setattr('platform.python_version_tuple', - lambda: ('3', '2', '2')) + monkeypatch.setattr('sys.version_info', (3, 2, 2, 'final', 0)) try: reload_module(blessed) diff --git a/tox.ini b/tox.ini index f53c54ce..76b19f7b 100644 --- a/tox.ini +++ b/tox.ini @@ -139,6 +139,10 @@ commands = {envbindir}/py.test --cov-config={toxinidir}/tox.ini \ setenv = TEST_QUICK=1 basepython = python3.9 +[testenv:py310] +setenv = TEST_QUICK=1 +basepython = python3.10 + [testenv:develop] commands = {posargs} diff --git a/version.json b/version.json index 4ff72aad..ab129042 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"version": "1.17.8"} +{"version": "1.17.9"}