Skip to content

Commit 179deb9

Browse files
authored
Drop python 3.7 (#280)
1 parent 366dd0b commit 179deb9

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

.github/workflows/check-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
name: Check Docs
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v4
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
1616
with:
1717
python-version: "3.10"
1818
- run: pip install nox

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
name: Build & Publish
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.10"
2020
- run: pip install nox

.github/workflows/test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,35 @@ jobs:
2020
strategy:
2121
max-parallel: 4
2222
matrix:
23-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030
- run: pip install nox
3131
- name: Test
3232
run: nox -N -s test-${{ matrix.python-version }} -- -v
3333
- name: Upload coverage report
34-
uses: codecov/codecov-action@v3
34+
uses: codecov/codecov-action@v4.5.0
3535
with:
3636
name: Python ${{ matrix.python-version }}
3737
files: ./coverage.xml
3838
fail_ci_if_error: true
39+
slug: lundberg/respx
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
env:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3943

4044
check-types:
4145
name: Check Typing
4246
runs-on: ubuntu-latest
4347
steps:
44-
- uses: actions/checkout@v3
45-
- uses: actions/setup-python@v4
48+
- uses: actions/checkout@v4
49+
- uses: actions/setup-python@v5
4650
with:
47-
python-version: "3.7"
51+
python-version: "3.8"
4852
- run: pip install nox
4953
- name: Run mypy
5054
run: nox -N -s mypy

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ Install with pip:
7878
$ pip install respx
7979
```
8080

81-
Requires Python 3.7+ and HTTPX 0.21+. See
81+
Requires Python 3.8+ and HTTPX 0.25+. See
8282
[Changelog](https://github.com/lundberg/respx/blob/master/CHANGELOG.md) for older HTTPX
8383
compatibility.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ Install with pip:
6868
$ pip install respx
6969
```
7070

71-
Requires Python 3.7+ and HTTPX 0.21+.
71+
Requires Python 3.8+ and HTTPX 0.25+.
7272
See [Changelog](https://github.com/lundberg/respx/blob/master/CHANGELOG.md) for older HTTPX compatibility.

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
pkgsUnstable = nixpkgsUnstable.legacyPackages.${system};
1414
in {
1515
packages = flakeUtils.lib.flattenTree {
16+
python313 = pkgs.python313;
1617
python312 = pkgs.python312;
1718
python311 = pkgs.python311;
1819
python310 = pkgs.python310;
1920
python39 = pkgs.python39;
2021
python38 = pkgs22.python38;
21-
python37 = pkgs22.python37;
2222
go-task = pkgsUnstable.go-task;
2323
};
2424
devShell = pkgs.mkShell {
2525
buildInputs = with self.packages.${system}; [
26+
python313
2627
python312
2728
python311
2829
python310
2930
python39
3031
python38
31-
python37
3232
go-task
3333
];
3434
shellHook = ''

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
nox.options.keywords = "test + mypy"
66

77

8-
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
8+
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
99
def test(session):
1010
deps = ["pytest", "pytest-asyncio", "pytest-cov", "trio", "starlette", "flask"]
1111
session.install("--upgrade", *deps)
@@ -17,7 +17,7 @@ def test(session):
1717
session.run("pytest", *session.posargs)
1818

1919

20-
@nox.session(python="3.7")
20+
@nox.session(python="3.8")
2121
def mypy(session):
2222
session.install("--upgrade", "mypy")
2323
session.install("-e", ".")

respx/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ def _resolve_side_effect(
366366
raise SideEffectError(self, origin=effect)
367367

368368
# Handle Exception `type` side effect
369-
elif isinstance(effect, type) and issubclass(effect, Exception):
369+
elif isinstance(effect, type):
370+
assert issubclass(effect, Exception)
370371
raise SideEffectError(
371372
self,
372373
origin=(

respx/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Any,
66
Dict,
77
List,
8+
Literal,
89
NamedTuple,
910
Optional,
1011
Tuple,
@@ -15,11 +16,6 @@
1516
)
1617
from urllib.parse import parse_qsl
1718

18-
try:
19-
from typing import Literal # type: ignore[attr-defined]
20-
except ImportError: # pragma: no cover
21-
from typing_extensions import Literal
22-
2319
import httpx
2420

2521

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ skip_covered = True
3636
show_missing = True
3737

3838
[mypy]
39-
python_version = 3.7
39+
python_version = 3.8
4040
files = respx,tests
4141
pretty = True
4242

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"Operating System :: OS Independent",
2424
"Programming Language :: Python",
2525
"Programming Language :: Python :: 3",
26-
"Programming Language :: Python :: 3.7",
2726
"Programming Language :: Python :: 3.8",
2827
"Programming Language :: Python :: 3.9",
2928
"Programming Language :: Python :: 3.10",
@@ -40,6 +39,6 @@
4039
entry_points={"pytest11": ["respx = respx.plugin"]},
4140
include_package_data=True,
4241
zip_safe=False,
43-
python_requires=">=3.7",
44-
install_requires=["httpx>=0.21.0"],
42+
python_requires=">=3.8",
43+
install_requires=["httpx>=0.25.0,<0.28.0"],
4544
)

0 commit comments

Comments
 (0)