diff --git a/CHANGES.rst b/CHANGES.rst index b99af17..b00ddf0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,10 +1,10 @@ Changelog ========= -0.11.1 (unreleased) +0.12.0 (unreleased) ------------------- -- Nothing changed yet. +- Ignore unreleased Python versions (3.8 at the moment). 0.11.0 (2019-02-13) diff --git a/check_python_versions.py b/check_python_versions.py index 5e02353..5c76cd2 100755 --- a/check_python_versions.py +++ b/check_python_versions.py @@ -34,7 +34,7 @@ __author__ = 'Marius Gedminas ' -__version__ = '0.11.1.dev0' +__version__ = '0.12.0.dev0' log = logging.getLogger('check-python-versions') @@ -409,10 +409,11 @@ def get_manylinux_python_versions(filename=MANYLINUX_INSTALL_SH): def important(versions): + upcoming_release = f'3.{CURRENT_PYTHON_3_VERSION + 1}' return { v for v in versions if not v.startswith(('PyPy', 'Jython')) and v != 'nightly' - and not v.endswith('-dev') + and not v.endswith('-dev') and v != upcoming_release } diff --git a/tests.py b/tests.py index 33fbe86..a43baed 100644 --- a/tests.py +++ b/tests.py @@ -468,9 +468,10 @@ def test_get_manylinux_python_versions(tmp_path): ] -def test_important(): +def test_important(monkeypatch): + monkeypatch.setattr(cpv, 'CURRENT_PYTHON_3_VERSION', 7) assert cpv.important({ - '2.7', '3.4', '3.7-dev', 'nightly', 'PyPy3', 'Jython' + '2.7', '3.4', '3.7-dev', '3.8', 'nightly', 'PyPy3', 'Jython' }) == {'2.7', '3.4'}