Skip to content

Commit 3dff116

Browse files
committed
follow up python 3.8 deprecation + poetry update
1 parent 0443d8b commit 3dff116

File tree

6 files changed

+509
-523
lines changed

6 files changed

+509
-523
lines changed

poetry.lock

Lines changed: 495 additions & 510 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pytest_httpserver/blocking_httpserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from queue import Queue
55
from typing import TYPE_CHECKING
66
from typing import Any
7-
from typing import Mapping
8-
from typing import Pattern
97

108
from pytest_httpserver.httpserver import METHOD_ALL
119
from pytest_httpserver.httpserver import UNDEFINED
@@ -16,6 +14,8 @@
1614
from pytest_httpserver.httpserver import URIPattern
1715

1816
if TYPE_CHECKING:
17+
from collections.abc import Mapping
18+
from re import Pattern
1919
from ssl import SSLContext
2020

2121
from werkzeug import Request

pytest_httpserver/httpserver.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,19 @@
99
import time
1010
import urllib.parse
1111
from collections import defaultdict
12+
from collections.abc import Iterable
13+
from collections.abc import Mapping
14+
from collections.abc import MutableMapping
1215
from contextlib import contextmanager
1316
from contextlib import suppress
1417
from copy import copy
1518
from enum import Enum
19+
from re import Pattern
1620
from typing import TYPE_CHECKING
1721
from typing import Any
1822
from typing import Callable
1923
from typing import ClassVar
20-
from typing import Iterable
21-
from typing import List
22-
from typing import Mapping
23-
from typing import MutableMapping
2424
from typing import Optional
25-
from typing import Pattern
26-
from typing import Tuple
2725
from typing import Union
2826

2927
import werkzeug.http
@@ -44,7 +42,7 @@
4442

4543
HEADERS_T = Union[
4644
Mapping[str, Union[str, Iterable[str]]],
47-
Iterable[Tuple[str, str]],
45+
Iterable[tuple[str, str]],
4846
]
4947

5048
HVMATCHER_T = Callable[[str, Optional[str], str], bool]
@@ -584,7 +582,7 @@ def __repr__(self) -> str:
584582
return retval
585583

586584

587-
class RequestHandlerList(List[RequestHandler]):
585+
class RequestHandlerList(list[RequestHandler]):
588586
"""
589587
Represents a list of :py:class:`RequestHandler` objects.
590588

scripts/release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import argparse
44
import subprocess
55
import sys
6+
from collections.abc import Iterable
67
from pathlib import Path
78
from shutil import which
8-
from typing import Iterable
99

1010

1111
class UsageError(Exception):

tests/test_release.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
import zipfile
99
from dataclasses import dataclass
1010
from pathlib import Path
11-
from typing import Iterable
11+
from typing import TYPE_CHECKING
1212

1313
import pytest
1414

15+
if TYPE_CHECKING:
16+
from collections.abc import Iterable
17+
1518
try:
1619
import tomllib
1720
except ImportError:

tests/test_threaded.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import http.client
22
import threading
33
import time
4-
from typing import Iterable
4+
from collections.abc import Iterable
55

66
import pytest
77
from werkzeug import Request

0 commit comments

Comments
 (0)