Skip to content

Commit fcbf077

Browse files
authored
Merge pull request #45 from mgedmin/py312
Support Python 3.12
2 parents 7b3ae2d + 7133020 commit fcbf077

File tree

7 files changed

+29
-20
lines changed

7 files changed

+29
-20
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ jobs:
2424
- "3.9"
2525
- "3.10"
2626
- "3.11"
27+
- "3.12"
2728
- "pypy-3.10"
2829

2930
steps:
3031
- name: Git clone
31-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3233

3334
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v2
35+
uses: actions/setup-python@v4
3536
with:
3637
python-version: "${{ matrix.python-version }}"
3738

3839
- name: Pip cache
39-
uses: actions/cache@v2
40+
uses: actions/cache@v3
4041
with:
4142
path: ~/.cache/pip
4243
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
@@ -48,23 +49,24 @@ jobs:
4849
run: |
4950
python -m pip install -U pip
5051
python -m pip install -U setuptools wheel
51-
python -m pip install -U pytest coverage coveralls
52+
python -m pip install -U pytest coverage
5253
python -m pip install -e .
5354
5455
- name: Run tests
55-
run: coverage run -m pytest tests
56+
run: |
57+
coverage run -m pytest tests
5658
5759
- name: Check test coverage
58-
run: coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }}
60+
run: |
61+
coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }}
62+
coverage xml
5963
# pypy3.10 thinks utils.py has one uncovered branch (140 -> 133), which
6064
# I think is just pypy's optimizer being too smart for coverage.py.
6165

6266
- name: Report to coveralls
63-
run: coveralls
64-
continue-on-error: true
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
COVERALLS_SERVICE_NAME: github
67+
uses: coverallsapp/github-action@v2
68+
with:
69+
file: coverage.xml
6870

6971
lint:
7072
name: ${{ matrix.toxenv }}
@@ -81,15 +83,15 @@ jobs:
8183

8284
steps:
8385
- name: Git clone
84-
uses: actions/checkout@v2
86+
uses: actions/checkout@v4
8587

8688
- name: Set up Python ${{ env.default_python || '3.9' }}
87-
uses: actions/setup-python@v2
89+
uses: actions/setup-python@v4
8890
with:
8991
python-version: "${{ env.default_python || '3.9' }}"
9092

9193
- name: Pip cache
92-
uses: actions/cache@v2
94+
uses: actions/cache@v3
9395
with:
9496
path: ~/.cache/pip
9597
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }}
@@ -104,4 +106,5 @@ jobs:
104106
python -m pip install -U tox
105107
106108
- name: Run ${{ matrix.toxenv }}
107-
run: python -m tox -e ${{ matrix.toxenv }}
109+
run: |
110+
python -m tox -e ${{ matrix.toxenv }}

CHANGES.rst

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

4-
0.21.4 (unreleased)
4+
0.22.0 (unreleased)
55
-------------------
66

7+
- Add support for Python 3.12: treat it as a released version, run CI tests on
8+
3.12.
9+
710
- Drop support for Python 3.7.
811

912

@@ -43,7 +46,7 @@ Changelog
4346
0.20.0 (2022-10-27)
4447
-------------------
4548

46-
- Add support for Python 3.11: threat it as a released version, run CI tests on
49+
- Add support for Python 3.11: treat it as a released version, run CI tests on
4750
3.11.
4851

4952

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ environment:
88
- PYTHON: "C:\\Python39"
99
- PYTHON: "C:\\Python310"
1010
- PYTHON: "C:\\Python311"
11+
- PYTHON: "C:\\Python312"
1112

1213
init:
1314
- "echo %PYTHON%"
@@ -22,6 +23,7 @@ install:
2223
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
2324
- python --version
2425
- pip install -U virtualenv # upgrade pip in tox's virtualenvs
26+
- pip install setuptools # the test suite needs the system python to have setuptools
2527
- pip install tox
2628

2729
build: off

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
'Programming Language :: Python :: 3.9',
5656
'Programming Language :: Python :: 3.10',
5757
'Programming Language :: Python :: 3.11',
58+
'Programming Language :: Python :: 3.12',
5859
'Programming Language :: Python :: Implementation :: CPython',
5960
'Programming Language :: Python :: Implementation :: PyPy',
6061
],

src/check_python_versions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"""
1414

1515
__author__ = 'Marius Gedminas <[email protected]>'
16-
__version__ = '0.21.4.dev0'
16+
__version__ = '0.22.0.dev0'

src/check_python_versions/versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
MAX_PYTHON_1_VERSION = 6 # i.e. 1.6
1313
MAX_PYTHON_2_VERSION = 7 # i.e. 2.7
14-
CURRENT_PYTHON_3_VERSION = 11 # i.e. 3.10
14+
CURRENT_PYTHON_3_VERSION = 12 # i.e. 3.12
1515

1616
MAX_MINOR_FOR_MAJOR = {
1717
1: MAX_PYTHON_1_VERSION,

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py38,py39,py310,py311,pypy3,flake8,mypy,isort,coverage
2+
envlist = py38,py39,py310,py311,py312,pypy3,flake8,mypy,isort,coverage
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)