diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87d929f..4522f1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,19 +24,20 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" - "pypy-3.10" steps: - name: Git clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "${{ matrix.python-version }}" - name: Pip cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} @@ -48,23 +49,24 @@ jobs: run: | python -m pip install -U pip python -m pip install -U setuptools wheel - python -m pip install -U pytest coverage coveralls + python -m pip install -U pytest coverage python -m pip install -e . - name: Run tests - run: coverage run -m pytest tests + run: | + coverage run -m pytest tests - name: Check test coverage - run: coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }} + run: | + coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }} + coverage xml # pypy3.10 thinks utils.py has one uncovered branch (140 -> 133), which # I think is just pypy's optimizer being too smart for coverage.py. - name: Report to coveralls - run: coveralls - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_SERVICE_NAME: github + uses: coverallsapp/github-action@v2 + with: + file: coverage.xml lint: name: ${{ matrix.toxenv }} @@ -81,15 +83,15 @@ jobs: steps: - name: Git clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ env.default_python || '3.9' }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "${{ env.default_python || '3.9' }}" - name: Pip cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }} @@ -104,4 +106,5 @@ jobs: python -m pip install -U tox - name: Run ${{ matrix.toxenv }} - run: python -m tox -e ${{ matrix.toxenv }} + run: | + python -m tox -e ${{ matrix.toxenv }} diff --git a/CHANGES.rst b/CHANGES.rst index 10fb6c2..fe69c85 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,9 +1,12 @@ Changelog ========= -0.21.4 (unreleased) +0.22.0 (unreleased) ------------------- +- Add support for Python 3.12: treat it as a released version, run CI tests on + 3.12. + - Drop support for Python 3.7. @@ -43,7 +46,7 @@ Changelog 0.20.0 (2022-10-27) ------------------- -- Add support for Python 3.11: threat it as a released version, run CI tests on +- Add support for Python 3.11: treat it as a released version, run CI tests on 3.11. diff --git a/appveyor.yml b/appveyor.yml index 6d1d6ea..f9e35b1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,7 @@ environment: - PYTHON: "C:\\Python39" - PYTHON: "C:\\Python310" - PYTHON: "C:\\Python311" + - PYTHON: "C:\\Python312" init: - "echo %PYTHON%" @@ -22,6 +23,7 @@ install: - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - python --version - pip install -U virtualenv # upgrade pip in tox's virtualenvs + - pip install setuptools # the test suite needs the system python to have setuptools - pip install tox build: off diff --git a/setup.py b/setup.py index 117eb34..7da28a8 100755 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], diff --git a/src/check_python_versions/__init__.py b/src/check_python_versions/__init__.py index b7fb17d..d29af37 100644 --- a/src/check_python_versions/__init__.py +++ b/src/check_python_versions/__init__.py @@ -13,4 +13,4 @@ """ __author__ = 'Marius Gedminas ' -__version__ = '0.21.4.dev0' +__version__ = '0.22.0.dev0' diff --git a/src/check_python_versions/versions.py b/src/check_python_versions/versions.py index 0aff51c..5b7b3c7 100644 --- a/src/check_python_versions/versions.py +++ b/src/check_python_versions/versions.py @@ -11,7 +11,7 @@ MAX_PYTHON_1_VERSION = 6 # i.e. 1.6 MAX_PYTHON_2_VERSION = 7 # i.e. 2.7 -CURRENT_PYTHON_3_VERSION = 11 # i.e. 3.10 +CURRENT_PYTHON_3_VERSION = 12 # i.e. 3.12 MAX_MINOR_FOR_MAJOR = { 1: MAX_PYTHON_1_VERSION, diff --git a/tox.ini b/tox.ini index 5ae44b9..ed94beb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311,pypy3,flake8,mypy,isort,coverage +envlist = py38,py39,py310,py311,py312,pypy3,flake8,mypy,isort,coverage [testenv] deps =