Skip to content

Commit 257adf7

Browse files
authored
Merge pull request #6 from nolar/ci-upgrades
Upgrade all the CI tooling (Ubuntu, GitHub Actions), drop Python 3.7-3.8, enable 3.11-3.13
2 parents 841d872 + dd73096 commit 257adf7

File tree

9 files changed

+44
-43
lines changed

9 files changed

+44
-43
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ on:
99
jobs:
1010
linters:
1111
name: Linting and static analysis
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-24.04
1313
timeout-minutes: 5
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.10"
18+
python-version: "3.13"
1919
- run: pip install -r requirements.txt
2020
- run: pre-commit run --all-files
2121
- run: mypy looptime --strict
@@ -24,13 +24,13 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
27+
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
2828
name: Python ${{ matrix.python-version }}
29-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-24.04
3030
timeout-minutes: 5
3131
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/setup-python@v2
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636

@@ -45,7 +45,7 @@ jobs:
4545
GITHUB_TOKEN: ${{ secrets.github_token }}
4646
continue-on-error: true
4747
- name: Publish coverage to CodeCov.io
48-
uses: codecov/codecov-action@v1
48+
uses: codecov/codecov-action@v3
4949
if: success()
5050
env:
5151
PYTHON: ${{ matrix.python-version }}
@@ -59,13 +59,13 @@ jobs:
5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
python-version: [ "pypy-3.7", "pypy-3.8" ]
62+
python-version: [ "pypy-3.9", "pypy-3.10", "pypy-3.11" ]
6363
name: Python ${{ matrix.python-version }}
64-
runs-on: ubuntu-20.04
64+
runs-on: ubuntu-24.04
6565
timeout-minutes: 5
6666
steps:
67-
- uses: actions/checkout@v2
68-
- uses: actions/setup-python@v2
67+
- uses: actions/checkout@v4
68+
- uses: actions/setup-python@v5
6969
with:
7070
python-version: ${{ matrix.python-version }}
7171

@@ -76,9 +76,9 @@ jobs:
7676
coveralls-finish:
7777
name: Finalize coveralls.io
7878
needs: [unit-tests]
79-
runs-on: ubuntu-20.04
79+
runs-on: ubuntu-24.04
8080
steps:
81-
- uses: actions/setup-python@v2
81+
- uses: actions/setup-python@v5
8282
- run: pip install coveralls
8383
- run: coveralls --service=github --finish
8484
env:

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ on:
1111
jobs:
1212
publish:
1313
name: Build and publish
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-python@v2
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.10"
2020
- run: pip install --upgrade setuptools wheel twine

.github/workflows/thorough.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ on:
1111
jobs:
1212
linters:
1313
name: Linting and static analysis
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-24.04
1515
timeout-minutes: 5
1616
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-python@v2
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.13"
2121
- run: pip install -r requirements.txt
2222
- run: pre-commit run --all-files
2323
- run: mypy looptime --strict
@@ -26,13 +26,13 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
29+
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
3030
name: Python ${{ matrix.python-version }}
31-
runs-on: ubuntu-20.04
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 5
3333
steps:
34-
- uses: actions/checkout@v2
35-
- uses: actions/setup-python@v2
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-python@v5
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838

@@ -47,7 +47,7 @@ jobs:
4747
GITHUB_TOKEN: ${{ secrets.github_token }}
4848
continue-on-error: true
4949
- name: Publish coverage to CodeCov.io
50-
uses: codecov/codecov-action@v1
50+
uses: codecov/codecov-action@v3
5151
if: success()
5252
env:
5353
PYTHON: ${{ matrix.python-version }}
@@ -61,13 +61,13 @@ jobs:
6161
strategy:
6262
fail-fast: false
6363
matrix:
64-
python-version: [ "pypy-3.7", "pypy-3.8" ]
64+
python-version: [ "pypy-3.9", "pypy-3.10", "pypy-3.11" ]
6565
name: Python ${{ matrix.python-version }}
66-
runs-on: ubuntu-20.04
66+
runs-on: ubuntu-24.04
6767
timeout-minutes: 5
6868
steps:
69-
- uses: actions/checkout@v2
70-
- uses: actions/setup-python@v2
69+
- uses: actions/checkout@v4
70+
- uses: actions/setup-python@v5
7171
with:
7272
python-version: ${{ matrix.python-version }}
7373

@@ -78,9 +78,9 @@ jobs:
7878
coveralls-finish:
7979
name: Finalize coveralls.io
8080
needs: [unit-tests]
81-
runs-on: ubuntu-20.04
81+
runs-on: ubuntu-24.04
8282
steps:
83-
- uses: actions/setup-python@v2
83+
- uses: actions/setup-python@v5
8484
- run: pip install coveralls
8585
- run: coveralls --service=github --finish
8686
env:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude: |
77
)
88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v3.4.0
10+
rev: v5.0.0
1111
hooks:
1212
- id: check-ast
1313
- id: trailing-whitespace
@@ -46,7 +46,7 @@ repos:
4646
# - id: double-quote-string-fixer
4747

4848
- repo: https://github.com/pre-commit/pygrep-hooks
49-
rev: v1.8.0
49+
rev: v1.10.0
5050
hooks:
5151
- id: python-check-blanket-noqa
5252
- id: python-check-mock-methods
@@ -59,7 +59,7 @@ repos:
5959
- id: text-unicode-replacement-char
6060

6161
- repo: https://github.com/PyCQA/isort
62-
rev: 5.8.0
62+
rev: 6.0.1
6363
hooks:
6464
- id: isort
6565
name: isort-source-code

looptime/loops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def setup_looptime(
9696
def time(self) -> float:
9797
return self.__int2time(self.__now)
9898

99-
def run_in_executor(self, executor: Any, func: Any, *args: Any) -> AnyFuture:
99+
def run_in_executor(self, executor: Any, func: Any, *args: Any) -> AnyFuture: # type: ignore
100100
future = super().run_in_executor(executor, func, *args)
101101
if isinstance(future, asyncio.Future):
102102
self.__sync_futures.add(future)

looptime/math.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import abc
4+
from typing import Any
45

56

67
class Numeric(metaclass=abc.ABCMeta):
@@ -108,5 +109,6 @@ def __mod__(self, other: object) -> float:
108109
else:
109110
return NotImplemented
110111

111-
def __pow__(self, power: float, modulo: None = None) -> float:
112+
# See the StdLib's comments on pow() on why it is Any, not float.
113+
def __pow__(self, power: float, modulo: None = None) -> Any:
112114
return pow(round(self._value * self.__rr), power, modulo) / pow(self.__rr, power, modulo)

looptime/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from looptime import loops, patchers
99

1010

11-
@pytest.hookimpl(hookwrapper=True) # type: ignore
11+
@pytest.hookimpl(hookwrapper=True)
1212
def pytest_fixture_setup(fixturedef: Any, request: Any) -> Any:
1313
if fixturedef.argname == "event_loop":
1414
result = yield

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ codecov
66
coverage
77
coveralls
88
isort
9-
# Mypy requires typed-ast, which is broken on PyPy 3.7 (could work in PyPy 3.8).
10-
mypy==0.920; implementation_name == "cpython"
9+
mypy==1.16.0
1110
pre-commit
1211
pytest
13-
pytest-asyncio
12+
pytest-asyncio<1.0.0
1413
pytest-cov
1514
pytest-mock

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
]
3939
},
4040

41-
python_requires='>=3.7',
41+
python_requires='>=3.9',
4242
setup_requires=[
4343
'setuptools_scm',
4444
],

0 commit comments

Comments
 (0)