Skip to content

Commit 120cf1e

Browse files
committed
chore(compat): bump pythons
3.8 and 3.9 are EOL, 3.13 and 3.14 are released. Wow, I'm so behind.
1 parent a0d0cf6 commit 120cf1e

File tree

7 files changed

+24
-39
lines changed

7 files changed

+24
-39
lines changed

.circleci/config.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ executors:
99
docker:
1010
- image: docker:25.0.5-git
1111
resource_class: medium
12-
py38:
13-
docker:
14-
- image: python:3.8-alpine
15-
resource_class: small
16-
py39:
17-
docker:
18-
- image: python:3.9-alpine
19-
resource_class: small
2012
py310:
2113
docker:
2214
- image: python:3.10-alpine
@@ -29,15 +21,15 @@ executors:
2921
docker:
3022
- image: python:3.12-alpine
3123
resource_class: small
32-
pypy737: # py38
24+
py313:
3325
docker:
34-
- image: pypy:3-7.3.7-slim
26+
- image: python:3.13-alpine
3527
resource_class: small
36-
pypy7311: # py38+py39
28+
py314:
3729
docker:
38-
- image: pypy:3-7.3.11-slim
30+
- image: python:3.14-alpine
3931
resource_class: small
40-
pypy73: # py39+py310
32+
pypy73: # py310
4133
docker:
4234
- image: pypy:3-7.3-slim
4335
resource_class: small
@@ -162,16 +154,14 @@ workflows:
162154
test:
163155
jobs:
164156
- linter/pre-commit:
165-
executor: py38
157+
executor: py310
166158
pre-steps:
167159
- run: apk add --no-cache git
168160
- toxpy:
169161
name: test-<<matrix.executor>>
170162
matrix:
171163
parameters:
172-
executor: [py38, py39, py310, py311, py312]
164+
executor: [py310, py311, py312, py313, py314]
173165
- toxpypy:
174-
name: test-<<matrix.executor>>
175-
matrix:
176-
parameters:
177-
executor: [pypy737, pypy7311, pypy73]
166+
name: test-pypy73
167+
executor: pypy73

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
10+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1111

1212
steps:
1313
- uses: actions/[email protected]

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_install_hook_types:
77
- pre-commit
88

99
default_language_version:
10-
python: python3.8
10+
python: python3.10
1111

1212
repos:
1313
- repo: https://github.com/compilerla/conventional-pre-commit
@@ -73,7 +73,7 @@ repos:
7373
- -d disallowed-name # TODO: fix
7474
- -d unspecified-encoding # TODO: reevaluate
7575
- repo: https://github.com/Lucas-C/pre-commit-hooks
76-
rev: v1.5.5 # TODO: v1.5.2+ requires newer pre-commit, need to drop py3.8?
76+
rev: v1.5.5
7777
hooks:
7878
- id: remove-crlf
7979
- id: remove-tabs
@@ -82,13 +82,13 @@ repos:
8282
rev: v3.14.0
8383
hooks:
8484
- id: reorder-python-imports
85-
args: [--py38-plus]
85+
args: [--py310-plus]
8686
exclude: nonunicode/.*
8787
- repo: https://github.com/asottile/pyupgrade
8888
rev: v3.16.0
8989
hooks:
9090
- id: pyupgrade
91-
args: [--py38-plus]
91+
args: [--py310-plus]
9292
exclude: nonunicode/.*
9393
- repo: https://github.com/asottile/add-trailing-comma
9494
rev: v3.1.0

coveralls/git.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import os
33
import subprocess
44
from typing import Any
5-
from typing import Dict
6-
from typing import Optional
75

86
from .exception import CoverallsException
97

@@ -32,7 +30,7 @@ def gitlog(fmt: str) -> str:
3230
)
3331

3432

35-
def git_branch() -> Optional[str]:
33+
def git_branch() -> str | None:
3634
branch = None
3735
if os.environ.get('GITHUB_ACTIONS'):
3836
github_ref = os.environ.get('GITHUB_REF')
@@ -60,7 +58,7 @@ def git_branch() -> Optional[str]:
6058
return branch
6159

6260

63-
def git_info() -> Dict[str, Dict[str, Any]]:
61+
def git_info() -> dict[str, dict[str, Any]]:
6462
"""
6563
A hash of Git data that can be used to display more information to users.
6664

coveralls/reporter.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import collections
22
import logging
33
import os
4-
from typing import Dict
5-
from typing import List
6-
from typing import Optional
74

85
import coverage
96
from coverage.plugin import FileReporter
@@ -51,7 +48,7 @@ def report(self, cov: coverage.Coverage) -> None:
5148
raise CoverallsException(f'Got coverage library error: {e}') from e
5249

5350
@staticmethod
54-
def get_hits(line_num: int, analysis: Analysis) -> Optional[int]:
51+
def get_hits(line_num: int, analysis: Analysis) -> int | None:
5552
"""
5653
Source file stats for each line.
5754
@@ -70,7 +67,7 @@ def get_hits(line_num: int, analysis: Analysis) -> Optional[int]:
7067
return 1
7168

7269
@staticmethod
73-
def get_arcs(analysis: Analysis) -> List[int]:
70+
def get_arcs(analysis: Analysis) -> list[int]:
7471
"""
7572
Hit stats for each branch.
7673
@@ -91,7 +88,7 @@ def get_arcs(analysis: Analysis) -> List[int]:
9188
if not has_arcs:
9289
return []
9390

94-
missing_arcs: Dict[int, List[int]] = analysis.missing_branch_arcs()
91+
missing_arcs: dict[int, list[int]] = analysis.missing_branch_arcs()
9592
try:
9693
# coverage v6.3+
9794
executed_arcs = analysis.executed_branch_arcs()
@@ -107,7 +104,7 @@ def get_arcs(analysis: Analysis) -> List[int]:
107104
# END COPY
108105
executed_arcs = eba
109106

110-
branches: List[int] = []
107+
branches: list[int] = []
111108
for l1, l2s in executed_arcs.items():
112109
for l2 in l2s:
113110
branches.extend((l1, 0, abs(l2), 1))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ coveralls = "coveralls.cli:main"
3131
python-coveralls = "coveralls.cli:main"
3232

3333
[tool.poetry.dependencies]
34-
python = ">=3.8,<3.13"
34+
python = ">=3.10,<4.0"
3535
coverage = { version = ">=5.0,<8.0,!=6.0.*,!=6.1,!=6.1.1", extras = ["toml"] }
3636
docopt = ">=0.6.1,<0.7.0"
3737
requests = ">=1.0.0,<3.0.0"

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[tox]
2-
envlist = py{38,39,310,311,312,py3}-cov{5,6,7}-{default,pyyaml}
2+
envlist = py{310,311,312,313,314,py3}-cov{5,6,7}-{default,pyyaml}
33

44
[gh-actions]
55
python =
6-
3.8: py38,upload
7-
3.9: py39,upload
86
3.10: py310,upload
97
3.11: py311,upload
108
3.12: py312,upload
9+
3.13: py313,upload
10+
3.14: py314,upload
1111

1212
[testenv]
1313
passenv = *

0 commit comments

Comments
 (0)