Support Python 3.14 (#1834)

This commit is contained in:
Marcelo Trylesinski 2026-01-07 17:28:23 +01:00 • committed by GitHub
commit 3ffe142e9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 427 additions and 323 deletions

View file

@ -25,7 +25,8 @@ def find_context_parameter(fn: Callable[..., Any]) -> str | None:
# Get type hints to properly resolve string annotations
try:
hints = typing.get_type_hints(fn)
except Exception:
# TODO(Marcelo): Drop the pragma once https://github.com/coveragepy/coveragepy/issues/1987 is fixed.
except Exception: # pragma: no cover
# If we can't resolve type hints, we can't find the context parameter
return None

View file

@ -704,7 +704,5 @@ class ServerSession(
await self._incoming_message_stream_writer.send(req)
@property
def incoming_messages(
self,
) -> MemoryObjectReceiveStream[ServerRequestResponder]:
def incoming_messages(self) -> MemoryObjectReceiveStream[ServerRequestResponder]:
return self._incoming_message_stream_reader