From 8e35dd992528c6c3535bc0cab7b1f03731881d68 Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Sat, 26 Feb 2022 16:24:26 +0000 Subject: [PATCH 1/5] Drop py36, add py39-10 --- .github/workflows/ci.yaml | 5 +++-- CHANGELOG.md | 2 ++ tox.ini | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 82c18889..b7045215 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,10 +18,11 @@ jobs: - ubuntu-latest - windows-latest python-version: - - "3.6" - "3.7" - "3.8" - - "pypy-3.7" + - "3.9" + - "3.10" + - "pypy-3.8" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 55c0bafb..b105f066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ **unreleased** **v1.0.2-dev** - Housekeeping: migrated from travis+appveyor to GitHub Actions for CI, thanks @clbarnes +- Drop Python3.6 support, thanks @clbarnes +- Add Python3.9, Python3.10 support, thanks @clbarnes **v1.0.1** - Added: enable special characters in search/replace, thanks @mckelvin diff --git a/tox.ini b/tox.ini index 6a8208a7..1baedd47 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35, py36, py37, py38, pypy3 +envlist = py37, py38, py39, py310, pypy3 [testenv] passenv = HOME @@ -16,8 +16,8 @@ python_files = test*.py [gh-actions] python = - 2.7: py27 - 3.6: py36 3.7: py37 3.8: py38, mypy - pypy-3.7: pypy3 + 3.9: py38 + 3.10: py310 + pypy-3.8: pypy3 From 680fc1b3146cb4733e370f7c51cffe04eba14fd7 Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Sat, 26 Feb 2022 16:37:38 +0000 Subject: [PATCH 2/5] Normalise whitespace in some output tests Python 3.10 seems to break lines in different places to earlier versions. --- tests/test_cli.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ec5e9e45..9de65ebe 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -171,6 +171,10 @@ def _mock_calls_to_string(called_mock): """ % DESCRIPTION).lstrip() +def normalize_whitespace(s): + return " ".join(s.split()) + + def test_usage_string(tmpdir, capsys): tmpdir.chdir() @@ -183,7 +187,7 @@ def test_usage_string(tmpdir, capsys): for option_line in EXPECTED_OPTIONS: assert option_line in out, "Usage string is missing {}".format(option_line) - assert EXPECTED_USAGE in out + assert normalize_whitespace(EXPECTED_USAGE) in normalize_whitespace(out) def test_usage_string_fork(tmpdir): @@ -227,7 +231,7 @@ def test_regression_help_in_work_dir(tmpdir, capsys, vcs): if vcs == "git": assert "Version that needs to be updated (default: 1.7.2013)" in out else: - assert EXPECTED_USAGE in out + assert normalize_whitespace(EXPECTED_USAGE) in normalize_whitespace(out) def test_defaults_in_usage_with_config(tmpdir, capsys): @@ -1401,8 +1405,8 @@ def test_subjunctive_dry_run_logging(tmpdir, vcs): commit = True tag = True serialize = - {major}.{minor}.{patch} - {major}.{minor} + {major}.{minor}.{patch} + {major}.{minor} parse = (?P\d+)\.(?P\d+)(\.(?P\d+))? [bumpversion:file:dont_touch_me.txt] """).strip()) @@ -1893,11 +1897,11 @@ def test_non_matching_search_does_not_modify_file(tmpdir): changelog_content = dedent(""" # Unreleased - + * bullet point A - + # Release v'older' (2019-09-17) - + * bullet point B """) From 5c6ffc67c00d331fa30708640b2f823d23b452db Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Sat, 26 Feb 2022 16:47:40 +0000 Subject: [PATCH 3/5] Remove py310 --- .github/workflows/ci.yaml | 1 - CHANGELOG.md | 2 +- tox.ini | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b7045215..ea11a2d6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,6 @@ jobs: - "3.7" - "3.8" - "3.9" - - "3.10" - "pypy-3.8" runs-on: ${{ matrix.os }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index b105f066..9edb37e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ **v1.0.2-dev** - Housekeeping: migrated from travis+appveyor to GitHub Actions for CI, thanks @clbarnes - Drop Python3.6 support, thanks @clbarnes -- Add Python3.9, Python3.10 support, thanks @clbarnes +- Add Python3.9, thanks @clbarnes **v1.0.1** - Added: enable special characters in search/replace, thanks @mckelvin diff --git a/tox.ini b/tox.ini index 1baedd47..b7ed368b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37, py38, py39, py310, pypy3 +envlist = py37, py38, py39, pypy3 [testenv] passenv = HOME @@ -19,5 +19,4 @@ python = 3.7: py37 3.8: py38, mypy 3.9: py38 - 3.10: py310 pypy-3.8: pypy3 From ad76a2415030429e37f8c7a7384628890d31b434 Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Sat, 26 Feb 2022 16:53:05 +0000 Subject: [PATCH 4/5] Repair tab --- tests/test_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 9de65ebe..292f8eef 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1405,8 +1405,8 @@ def test_subjunctive_dry_run_logging(tmpdir, vcs): commit = True tag = True serialize = - {major}.{minor}.{patch} - {major}.{minor} + {major}.{minor}.{patch} + {major}.{minor} parse = (?P\d+)\.(?P\d+)(\.(?P\d+))? [bumpversion:file:dont_touch_me.txt] """).strip()) From bd16de5e949286a5317877481baf32fea42ae1cd Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Sat, 26 Feb 2022 16:58:08 +0000 Subject: [PATCH 5/5] Revert "Normalise whitespace in some output tests" This reverts commit 680fc1b3146cb4733e370f7c51cffe04eba14fd7. --- tests/test_cli.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 292f8eef..ec5e9e45 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -171,10 +171,6 @@ def _mock_calls_to_string(called_mock): """ % DESCRIPTION).lstrip() -def normalize_whitespace(s): - return " ".join(s.split()) - - def test_usage_string(tmpdir, capsys): tmpdir.chdir() @@ -187,7 +183,7 @@ def test_usage_string(tmpdir, capsys): for option_line in EXPECTED_OPTIONS: assert option_line in out, "Usage string is missing {}".format(option_line) - assert normalize_whitespace(EXPECTED_USAGE) in normalize_whitespace(out) + assert EXPECTED_USAGE in out def test_usage_string_fork(tmpdir): @@ -231,7 +227,7 @@ def test_regression_help_in_work_dir(tmpdir, capsys, vcs): if vcs == "git": assert "Version that needs to be updated (default: 1.7.2013)" in out else: - assert normalize_whitespace(EXPECTED_USAGE) in normalize_whitespace(out) + assert EXPECTED_USAGE in out def test_defaults_in_usage_with_config(tmpdir, capsys): @@ -1897,11 +1893,11 @@ def test_non_matching_search_does_not_modify_file(tmpdir): changelog_content = dedent(""" # Unreleased - + * bullet point A - + # Release v'older' (2019-09-17) - + * bullet point B """)