Skip to content

Commit bae1b5c

Browse files
committed
fix(httpcore#1119): use py3.8-compatible typing in tests (typing.List/Optional)
1 parent a62fd3c commit bae1b5c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/_sync/test_http11.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ def test_http11_write_error_closes_request_body():
393393
"""
394394

395395
class WriteErrorStream(httpcore.MockStream):
396-
def __init__(self, buffer: list[bytes], fail_after_writes: int) -> None:
396+
def __init__(self, buffer: typing.List[bytes], fail_after_writes: int) -> None:
397397
super().__init__(buffer)
398398
self._writes = 0
399399
self._fail_after_writes = fail_after_writes
400400

401-
def write(self, buffer: bytes, timeout: float | None = None) -> None:
401+
def write(self, buffer: bytes, timeout: typing.Optional[float] = None) -> None:
402402
self._writes += 1
403403
if self._writes > self._fail_after_writes:
404404
raise httpcore.WriteError("Simulated write failure")

0 commit comments

Comments
 (0)