Skip to content

Commit 433cd43

Browse files
committed
Remove support for python below 3.11
1 parent eb27a5d commit 433cd43

File tree

8 files changed

+28
-44
lines changed

8 files changed

+28
-44
lines changed

.github/workflows/ci.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
14+
python-version: ["3.11", "3.12"]
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
@@ -27,14 +27,6 @@ jobs:
2727
env:
2828
VENVSTARTER_ONLY_MAKE_VENV: "1"
2929
run: |
30-
if [ "$RUNNER_OS" == "Windows" ]; then
31-
if ! python -c 'import sys; sys.exit(1) if sys.version_info < (3, 9) else None'; then
32-
# Need for python 3.7 and 3.8 on windows
33-
python -m venv tools/.python
34-
./tools/.python/Scripts/python -m pip install setuptools pip -U
35-
fi
36-
fi
37-
3830
python ./tools/venv
3931
4032
- name: Run tests

.github/workflows/lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
lint:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212

1313
- name: Set up Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: "3.11"
16+
python-version: "3.12"
1717

1818
- name: Install deps
1919
shell: bash
@@ -27,12 +27,12 @@ jobs:
2727
format:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131

3232
- name: Set up Python
3333
uses: actions/setup-python@v4
3434
with:
35-
python-version: "3.11"
35+
python-version: "3.12"
3636

3737
- name: Install deps
3838
shell: bash

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
environment: github_release
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313

1414
- uses: actions/setup-python@v4
1515
with:
16-
python-version: "3.11"
16+
python-version: "3.12"
1717

1818
- id: build
1919
run: pip install hatch==1.6.3 && hatch build

pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "Alternative pytest plugin to pytest-asyncio"
99
readme = "README.rst"
1010
license = { text = "MIT" }
11-
requires-python = ">= 3.7"
11+
requires-python = ">= 3.12"
1212
authors = [
1313
{ name = "Stephen Moore", email = "[email protected]" },
1414
]
@@ -17,14 +17,14 @@ classifiers = [
1717
"Topic :: Software Development :: Testing",
1818
]
1919
dependencies = [
20-
"pytest >= 7.0.0",
20+
"pytest >= 8.0.0",
2121
]
2222

2323
[project.optional-dependencies]
2424
tests = [
25-
"nest-asyncio==1.0.0",
26-
"noseOfYeti[black]==2.4.1",
27-
"pytest==7.3.0",
25+
"nest-asyncio==1.6.0",
26+
"noseOfYeti[black]==2.4.9",
27+
"pytest==8.2.1",
2828
"pytest-order==1.2.1"
2929
]
3030

tools/devtools.py

+7-15
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,11 @@
1313

1414
shlex = mslex # noqa
1515

16-
if sys.version_info < (3, 10):
17-
Dict = tp.Dict
18-
List = tp.List
19-
else:
20-
Dict = dict
21-
List = list
22-
2316

2417
class Command:
2518
__is_command__: bool
2619

27-
def __call__(self, bin_dir: Path, args: List[str]) -> None:
28-
...
20+
def __call__(self, bin_dir: Path, args: list[str]) -> None: ...
2921

3022

3123
def command(func: tp.Callable) -> tp.Callable:
@@ -42,7 +34,7 @@ def run(*args: tp.Union[str, Path]) -> None:
4234

4335

4436
class App:
45-
commands: Dict[str, Command]
37+
commands: dict[str, Command]
4638

4739
def __init__(self):
4840
self.commands = {}
@@ -57,7 +49,7 @@ def __init__(self):
5749
), f"Expected '{name}' to have correct signature, have {inspect.signature(val)} instead of {compare}"
5850
self.commands[name] = val
5951

60-
def __call__(self, args: List[str]) -> None:
52+
def __call__(self, args: list[str]) -> None:
6153
bin_dir = Path(sys.executable).parent
6254

6355
if args and args[0] in self.commands:
@@ -68,18 +60,18 @@ def __call__(self, args: List[str]) -> None:
6860
sys.exit(f"Unknown command:\nAvailable: {sorted(self.commands)}\nWanted: {args}")
6961

7062
@command
71-
def format(self, bin_dir: Path, args: List[str]) -> None:
63+
def format(self, bin_dir: Path, args: list[str]) -> None:
7264
if not args:
7365
args = [".", *args]
7466
run(bin_dir / "black", *args)
7567
run(bin_dir / "isort", *args)
7668

7769
@command
78-
def lint(self, bin_dir: Path, args: List[str]) -> None:
70+
def lint(self, bin_dir: Path, args: list[str]) -> None:
7971
run(bin_dir / "pylama", *args)
8072

8173
@command
82-
def tests(self, bin_dir: Path, args: List[str]) -> None:
74+
def tests(self, bin_dir: Path, args: list[str]) -> None:
8375
if "-q" not in args:
8476
args = ["-q", *args]
8577

@@ -115,7 +107,7 @@ def tests(self, bin_dir: Path, args: List[str]) -> None:
115107
run(bin_dir / "pytest", *files, *args)
116108

117109
@command
118-
def tox(self, bin_dir: Path, args: List[str]) -> None:
110+
def tox(self, bin_dir: Path, args: list[str]) -> None:
119111
run(bin_dir / "tox", *args)
120112

121113

tools/requirements.dev.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
pylama-dmypy==0.4
22
pylama==8.4.1
33
neovim==0.3.1
4-
tox==4.4.11
5-
isort==5.11.5
6-
python-lsp-server==1.7.2
7-
pylsp-mypy==0.6.6
4+
tox==4.15.0
5+
isort==5.13.2
6+
python-lsp-server==1.11.0
87
pyls-isort==0.2.2
9-
python-lsp-black==1.2.1
10-
mslex==0.3.0; sys.platform == 'win32'
11-
hatch==1.7.0
8+
python-lsp-black==2.0.0
9+
mslex==1.2.0; sys.platform == 'win32'
10+
hatch==1.11.1

tools/venv

+1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ else:
3737
manager.add_requirements_file("{here}", "requirements.dev.txt")
3838
manager.add_env(NOSE_OF_YETI_BLACK_COMPAT="true")
3939

40+
manager.min_python("3.11")
4041
manager.run()

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py37,py38,py39,py310,py311
2+
envlist = py311,py12
33

44
[testenv]
55
setenv =

0 commit comments

Comments
 (0)