Skip to content

Commit 6443d14

Browse files
committed
Ignore unreleased Python versions
Because Python 3.8 prereleases are already out and some people have already added them to their tox.ini etc., but you cannot enable 3.8 on Travis or Appveyor yet. So let's treat 3.8 like we treat -dev releases. Fixes #1 (the other half).
1 parent 872adc1 commit 6443d14

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

CHANGES.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Changelog
22
=========
33

4-
0.11.1 (unreleased)
4+
0.12.0 (unreleased)
55
-------------------
66

7-
- Nothing changed yet.
7+
- Ignore unreleased Python versions (3.8 at the moment).
88

99

1010
0.11.0 (2019-02-13)

check_python_versions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
__author__ = 'Marius Gedminas <[email protected]>'
37-
__version__ = '0.11.1.dev0'
37+
__version__ = '0.12.0.dev0'
3838

3939

4040
log = logging.getLogger('check-python-versions')
@@ -409,10 +409,11 @@ def get_manylinux_python_versions(filename=MANYLINUX_INSTALL_SH):
409409

410410

411411
def important(versions):
412+
upcoming_release = f'3.{CURRENT_PYTHON_3_VERSION + 1}'
412413
return {
413414
v for v in versions
414415
if not v.startswith(('PyPy', 'Jython')) and v != 'nightly'
415-
and not v.endswith('-dev')
416+
and not v.endswith('-dev') and v != upcoming_release
416417
}
417418

418419

tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,10 @@ def test_get_manylinux_python_versions(tmp_path):
468468
]
469469

470470

471-
def test_important():
471+
def test_important(monkeypatch):
472+
monkeypatch.setattr(cpv, 'CURRENT_PYTHON_3_VERSION', 7)
472473
assert cpv.important({
473-
'2.7', '3.4', '3.7-dev', 'nightly', 'PyPy3', 'Jython'
474+
'2.7', '3.4', '3.7-dev', '3.8', 'nightly', 'PyPy3', 'Jython'
474475
}) == {'2.7', '3.4'}
475476

476477

0 commit comments

Comments
 (0)