Skip to content

Commit c585125

Browse files
committed
deps: remove support for python below 3.11
1 parent e1bfd1b commit c585125

File tree

13 files changed

+36
-48
lines changed

13 files changed

+36
-48
lines changed

.github/workflows/ci.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
22-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
22+
python-version: ["3.11", "3.12"]
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: Set up Python
2626
uses: actions/setup-python@v4
2727
with:
@@ -35,14 +35,6 @@ jobs:
3535
env:
3636
VENVSTARTER_ONLY_MAKE_VENV: "1"
3737
run: |
38-
if [ "$RUNNER_OS" == "Windows" ]; then
39-
if ! python -c 'import sys; sys.exit(1) if sys.version_info < (3, 9) else None'; then
40-
# Need for python 3.7 and 3.8 on windows
41-
python -m venv tools/.python
42-
./tools/.python/Scripts/python -m pip install setuptools pip -U
43-
fi
44-
fi
45-
4638
python ./tools/venv
4739
4840
- name: Run tests

.github/workflows/lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
lint:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: "3.11"
24+
python-version: "3.12"
2525

2626
- name: Install deps
2727
shell: bash
@@ -35,12 +35,12 @@ jobs:
3535
format:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939

4040
- name: Set up Python
4141
uses: actions/setup-python@v4
4242
with:
43-
python-version: "3.11"
43+
python-version: "3.12"
4444

4545
- name: Install deps
4646
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

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Changelog
2323

2424
0.8.0 - TBD
2525
* Provide simple support for tests being aware of asyncio.Context
26+
* Remove support for python less than 3.11
2627

2728
0.7.2 - 1 October 2023
2829
* Timeouts don't take affect if the debugger is active

alt_pytest_asyncio/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE."""
2+
23
import pytest
34

45
from alt_pytest_asyncio.version import VERSION

alt_pytest_asyncio/async_converters.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
hacks with capturing errors inside run_until_complete rather than outside so
99
that you don't get asyncio internals in the errors.
1010
"""
11+
1112
import asyncio
1213
import inspect
1314
import sys

pylama.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pylama]
22
skip = setup.py,tools/.python/**,.tox/**
3-
ignore = E225,E202,E211,E231,E226,W292,W291,E251,E122,E501,E701,E227,E305,E128,W391,C901
3+
ignore = E225,E202,E211,E231,E226,W292,W291,E251,E122,E501,E701,E227,E305,E128,W391,C901,E704
44

55
[pylama:pyflakes]
66
builtins = _

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.11"
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

tests/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def change_pytester(pytestconfig):
1414

1515

1616
@pytest.hookspec(firstresult=True)
17-
def pytest_ignore_collect(path):
18-
if path.basename.startswith("example_"):
17+
def pytest_ignore_collect(collection_path):
18+
if collection_path.name.startswith("example_"):
1919
return True
20-
if path.basename == "interrupt_test":
20+
if collection_path.name == "interrupt_test":
2121
return True

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
11+
setuptools>=69.0.3; python_version >= '3.12'

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)