diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 436de42a6..12dce4e24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,14 +37,17 @@ jobs: - "ubuntu-py37" - "ubuntu-py38" - "ubuntu-py39" + - "ubuntu-py310" - "macos-py37" - "macos-py38" - "macos-py39" + - "macos-py310" - "windows-py37" - "windows-py38" - "windows-py39" + - "windows-py310" include: - name: "ubuntu-py37" @@ -59,6 +62,10 @@ jobs: python: "3.9" os: ubuntu-latest tox_env: "py39" + - name: "ubuntu-py310" + python: "3.10" + os: ubuntu-latest + tox_env: "py310" - name: "macos-py37" python: "3.7" @@ -72,6 +79,10 @@ jobs: python: "3.9" os: macos-latest tox_env: "py39" + - name: "macos-py310" + python: "3.10" + os: macos-latest + tox_env: "py310" - name: "windows-py37" python: "3.7" @@ -85,6 +96,10 @@ jobs: python: "3.9" os: windows-latest tox_env: "py39" + - name: "windows-py310" + python: "3.10" + os: windows-latest + tox_env: "py310" steps: - uses: actions/checkout@v2 diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py index 84241ac2a..6b3c583ad 100644 --- a/cookiecutter/cli.py +++ b/cookiecutter/cli.py @@ -25,7 +25,7 @@ def version_msg(): """Return the Cookiecutter version, location and Python powering it.""" - python_version = sys.version[:3] + python_version = sys.version location = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) message = 'Cookiecutter %(version)s from {} (Python {})' return message.format(location, python_version) diff --git a/tests/test_cli.py b/tests/test_cli.py index 623945e8b..19740ef26 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,6 +4,7 @@ import os import re + import pytest from click.testing import CliRunner @@ -48,7 +49,7 @@ def version_cli_flag(request): def test_cli_version(cli_runner, version_cli_flag): - """Verify correct version output by `cookiecutter` on cli invocation.""" + """Verify Cookiecutter version output by `cookiecutter` on cli invocation.""" result = cli_runner(version_cli_flag) assert result.exit_code == 0 assert result.output.startswith('Cookiecutter') diff --git a/tox.ini b/tox.ini index 591fc50ee..b8dd5c5e1 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = py37 py38 py39 + py310 minversion = 3.14.2 requires = virtualenv >= 20.4.5