From 8370724b52522f71159ca09cc489772ad17f6b53 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sat, 29 Jul 2023 17:41:34 -0500 Subject: [PATCH 01/21] Add typing for `_highlevel_open_tcp_listeners.py` --- trio/_highlevel_open_tcp_listeners.py | 31 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 6211917254..d4ed20a50d 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -1,6 +1,9 @@ +from __future__ import annotations + import errno import sys -from math import inf +from collections.abc import Awaitable, Callable, Iterable +from typing import Any import trio @@ -37,16 +40,18 @@ # so this is unnecessary -- we can just pass in "infinity" and get the maximum # that way. (Verified on Windows, Linux, macOS using # notes-to-self/measure-listen-backlog.py) -def _compute_backlog(backlog): - if backlog is None: - backlog = inf +def _compute_backlog(backlog: int | None) -> int: # Many systems (Linux, BSDs, ...) store the backlog in a uint16 and are # missing overflow protection, so we apply our own overflow protection. # https://github.com/golang/go/issues/5030 + if backlog is None: + return 0xFFFF return min(backlog, 0xFFFF) -async def open_tcp_listeners(port, *, host=None, backlog=None): +async def open_tcp_listeners( + port: int, *, host: str | bytes | None = None, backlog: int | None = None +) -> list[trio.SocketListener]: """Create :class:`SocketListener` objects to listen for TCP connections. Args: @@ -62,7 +67,7 @@ async def open_tcp_listeners(port, *, host=None, backlog=None): :func:`open_tcp_listeners` will bind to both the IPv4 wildcard address (``0.0.0.0``) and also the IPv6 wildcard address (``::``). - host (str, bytes-like, or None): The local interface to bind to. This is + host (str, bytes, or None): The local interface to bind to. This is passed to :func:`~socket.getaddrinfo` with the ``AI_PASSIVE`` flag set. @@ -150,14 +155,14 @@ async def open_tcp_listeners(port, *, host=None, backlog=None): async def serve_tcp( - handler, - port, + handler: Callable[[trio.SocketStream], Awaitable[Any]], + port: int, *, - host=None, - backlog=None, - handler_nursery=None, - task_status=trio.TASK_STATUS_IGNORED, -): + host: str | bytes | None = None, + backlog: int | None = None, + handler_nursery: trio.Nursery | None = None, + task_status: trio.lowlevel.Task = trio.TASK_STATUS_IGNORED, # type: ignore[has-type] # Cannot determine type of "TASK_STATUS_IGNORED" +) -> None: """Listen for incoming TCP connections, and for each one start a task running ``handler(stream)``. From 0ea61fb543069cc8b56dd60f404fe687d0166fc5 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sat, 29 Jul 2023 17:55:52 -0500 Subject: [PATCH 02/21] Changes from `./check.sh` --- trio/_tests/verify_types.json | 871 ++++++++++++++++++++++++++++++---- 1 file changed, 787 insertions(+), 84 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 60132e07fd..f73d72b406 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -2,21 +2,21 @@ "generalDiagnostics": [], "summary": { "errorCount": 0, - "filesAnalyzed": 8, + "filesAnalyzed": 41, "informationCount": 0, "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.9072, + "completenessScore": 0.17563739376770537, "exportedSymbolCounts": { - "withAmbiguousType": 1, - "withKnownType": 567, - "withUnknownType": 57 + "withAmbiguousType": 45, + "withKnownType": 124, + "withUnknownType": 537 }, "ignoreUnknownTypesFromImports": true, - "missingClassDocStringCount": 1, + "missingClassDocStringCount": 20, "missingDefaultParamCount": 0, - "missingFunctionDocStringCount": 4, + "missingFunctionDocStringCount": 424, "moduleName": "trio", "modules": [ { @@ -40,51 +40,178 @@ { "name": "trio.tests" }, + { + "name": "trio.tests.conftest" + }, + { + "name": "trio.tests.module_with_deprecations" + }, + { + "name": "trio.tests.test_abc" + }, + { + "name": "trio.tests.test_channel" + }, + { + "name": "trio.tests.test_contextvars" + }, + { + "name": "trio.tests.test_deprecate" + }, + { + "name": "trio.tests.test_dtls" + }, + { + "name": "trio.tests.test_exports" + }, + { + "name": "trio.tests.test_fakenet" + }, + { + "name": "trio.tests.test_file_io" + }, + { + "name": "trio.tests.test_highlevel_generic" + }, + { + "name": "trio.tests.test_highlevel_open_tcp_listeners" + }, + { + "name": "trio.tests.test_highlevel_open_tcp_stream" + }, + { + "name": "trio.tests.test_highlevel_open_unix_stream" + }, + { + "name": "trio.tests.test_highlevel_serve_listeners" + }, + { + "name": "trio.tests.test_highlevel_socket" + }, + { + "name": "trio.tests.test_highlevel_ssl_helpers" + }, + { + "name": "trio.tests.test_path" + }, + { + "name": "trio.tests.test_scheduler_determinism" + }, + { + "name": "trio.tests.test_signals" + }, + { + "name": "trio.tests.test_socket" + }, + { + "name": "trio.tests.test_ssl" + }, + { + "name": "trio.tests.test_subprocess" + }, + { + "name": "trio.tests.test_sync" + }, + { + "name": "trio.tests.test_testing" + }, + { + "name": "trio.tests.test_threads" + }, + { + "name": "trio.tests.test_timeouts" + }, + { + "name": "trio.tests.test_unix_pipes" + }, + { + "name": "trio.tests.test_util" + }, + { + "name": "trio.tests.test_wait_for_object" + }, + { + "name": "trio.tests.test_windows_pipes" + }, + { + "name": "trio.tests.tools" + }, + { + "name": "trio.tests.tools.test_gen_exports" + }, { "name": "trio.to_thread" } ], "otherSymbolCounts": { - "withAmbiguousType": 3, - "withKnownType": 574, - "withUnknownType": 76 + "withAmbiguousType": 6, + "withKnownType": 54, + "withUnknownType": 158 }, "packageName": "trio", "symbols": [ "trio.__deprecated_attributes__", - "trio._core._entry_queue.TrioToken.run_sync_soon", + "trio._abc.AsyncResource.__aenter__", + "trio._abc.AsyncResource.__aexit__", + "trio._abc.AsyncResource.aclose", + "trio._abc.Clock.current_time", + "trio._abc.Clock.deadline_to_sleep_time", + "trio._abc.Clock.start_clock", + "trio._abc.HalfCloseableStream", + "trio._abc.HalfCloseableStream.send_eof", + "trio._abc.HostnameResolver.getaddrinfo", + "trio._abc.HostnameResolver.getnameinfo", + "trio._abc.Listener", + "trio._abc.Listener.accept", + "trio._abc.ReceiveStream", + "trio._abc.ReceiveStream.__aiter__", + "trio._abc.ReceiveStream.__anext__", + "trio._abc.ReceiveStream.receive_some", + "trio._abc.SendStream", + "trio._abc.SendStream.send_all", + "trio._abc.SendStream.wait_send_all_might_not_block", + "trio._abc.SocketFactory.socket", + "trio._abc.Stream", + "trio._core._mock_clock.MockClock", + "trio._core._mock_clock.MockClock.__init__", + "trio._core._mock_clock.MockClock.__repr__", + "trio._core._mock_clock.MockClock.autojump_threshold", + "trio._core._mock_clock.MockClock.current_time", + "trio._core._mock_clock.MockClock.deadline_to_sleep_time", "trio._core._mock_clock.MockClock.jump", - "trio._core._run.Nursery.start", - "trio._core._run.Nursery.start_soon", - "trio._core._run.TaskStatus.__repr__", - "trio._core._run.TaskStatus.started", - "trio._core._unbounded_queue.UnboundedQueue.__aiter__", - "trio._core._unbounded_queue.UnboundedQueue.__anext__", - "trio._core._unbounded_queue.UnboundedQueue.__repr__", - "trio._core._unbounded_queue.UnboundedQueue.empty", - "trio._core._unbounded_queue.UnboundedQueue.get_batch", - "trio._core._unbounded_queue.UnboundedQueue.get_batch_nowait", - "trio._core._unbounded_queue.UnboundedQueue.qsize", - "trio._core._unbounded_queue.UnboundedQueue.statistics", - "trio._dtls.DTLSChannel.__init__", - "trio._dtls.DTLSEndpoint.serve", + "trio._core._mock_clock.MockClock.rate", + "trio._core._mock_clock.MockClock.start_clock", + "trio._core._parking_lot.ParkingLot", + "trio._core._parking_lot.ParkingLot.__bool__", + "trio._core._parking_lot.ParkingLot.__len__", + "trio._core._parking_lot.ParkingLot.park", + "trio._core._parking_lot.ParkingLot.repark", + "trio._core._parking_lot.ParkingLot.repark_all", + "trio._core._parking_lot.ParkingLot.statistics", + "trio._core._parking_lot.ParkingLot.unpark", + "trio._core._parking_lot.ParkingLot.unpark_all", + "trio._highlevel_generic.StapledStream", + "trio._highlevel_generic.StapledStream.aclose", + "trio._highlevel_generic.StapledStream.receive_some", + "trio._highlevel_generic.StapledStream.receive_stream", + "trio._highlevel_generic.StapledStream.send_all", + "trio._highlevel_generic.StapledStream.send_eof", + "trio._highlevel_generic.StapledStream.send_stream", + "trio._highlevel_generic.StapledStream.wait_send_all_might_not_block", + "trio._highlevel_socket.SocketListener", + "trio._highlevel_socket.SocketListener.__init__", + "trio._highlevel_socket.SocketListener.accept", + "trio._highlevel_socket.SocketListener.aclose", + "trio._highlevel_socket.SocketStream", + "trio._highlevel_socket.SocketStream.__init__", + "trio._highlevel_socket.SocketStream.aclose", "trio._highlevel_socket.SocketStream.getsockopt", + "trio._highlevel_socket.SocketStream.receive_some", "trio._highlevel_socket.SocketStream.send_all", + "trio._highlevel_socket.SocketStream.send_eof", "trio._highlevel_socket.SocketStream.setsockopt", - "trio._ssl.SSLListener.__init__", - "trio._ssl.SSLListener.accept", - "trio._ssl.SSLListener.aclose", - "trio._ssl.SSLStream.__dir__", - "trio._ssl.SSLStream.__getattr__", - "trio._ssl.SSLStream.__init__", - "trio._ssl.SSLStream.__setattr__", - "trio._ssl.SSLStream.aclose", - "trio._ssl.SSLStream.do_handshake", - "trio._ssl.SSLStream.receive_some", - "trio._ssl.SSLStream.send_all", - "trio._ssl.SSLStream.transport_stream", - "trio._ssl.SSLStream.unwrap", - "trio._ssl.SSLStream.wait_send_all_might_not_block", + "trio._highlevel_socket.SocketStream.wait_send_all_might_not_block", + "trio._subprocess.Process", "trio._subprocess.Process.__aenter__", "trio._subprocess.Process.__init__", "trio._subprocess.Process.__repr__", @@ -99,36 +226,61 @@ "trio._subprocess.Process.send_signal", "trio._subprocess.Process.terminate", "trio._subprocess.Process.wait", - "trio.current_time", - "trio.from_thread.run", - "trio.from_thread.run_sync", - "trio.lowlevel.cancel_shielded_checkpoint", - "trio.lowlevel.current_clock", - "trio.lowlevel.current_root_task", - "trio.lowlevel.current_statistics", - "trio.lowlevel.current_trio_token", - "trio.lowlevel.currently_ki_protected", - "trio.lowlevel.notify_closing", - "trio.lowlevel.open_process", - "trio.lowlevel.permanently_detach_coroutine_object", - "trio.lowlevel.reattach_detached_coroutine_object", - "trio.lowlevel.reschedule", - "trio.lowlevel.spawn_system_task", - "trio.lowlevel.start_guest_run", - "trio.lowlevel.start_thread_soon", - "trio.lowlevel.temporarily_detach_coroutine_object", - "trio.lowlevel.wait_readable", - "trio.lowlevel.wait_writable", - "trio.open_ssl_over_tcp_listeners", - "trio.open_ssl_over_tcp_stream", - "trio.open_tcp_listeners", - "trio.open_tcp_stream", - "trio.open_unix_socket", - "trio.run", - "trio.run_process", - "trio.serve_listeners", - "trio.serve_ssl_over_tcp", - "trio.serve_tcp", + "trio._sync.AsyncContextManagerMixin.__aenter__", + "trio._sync.AsyncContextManagerMixin.__aexit__", + "trio._sync.CapacityLimiter", + "trio._sync.CapacityLimiter.__init__", + "trio._sync.CapacityLimiter.__repr__", + "trio._sync.CapacityLimiter.acquire", + "trio._sync.CapacityLimiter.acquire_nowait", + "trio._sync.CapacityLimiter.acquire_on_behalf_of", + "trio._sync.CapacityLimiter.acquire_on_behalf_of_nowait", + "trio._sync.CapacityLimiter.available_tokens", + "trio._sync.CapacityLimiter.borrowed_tokens", + "trio._sync.CapacityLimiter.release", + "trio._sync.CapacityLimiter.release_on_behalf_of", + "trio._sync.CapacityLimiter.statistics", + "trio._sync.CapacityLimiter.total_tokens", + "trio._sync.Condition", + "trio._sync.Condition.__init__", + "trio._sync.Condition.acquire", + "trio._sync.Condition.acquire_nowait", + "trio._sync.Condition.locked", + "trio._sync.Condition.notify", + "trio._sync.Condition.notify_all", + "trio._sync.Condition.release", + "trio._sync.Condition.statistics", + "trio._sync.Condition.wait", + "trio._sync.Event", + "trio._sync.Event.is_set", + "trio._sync.Event.set", + "trio._sync.Event.statistics", + "trio._sync.Event.wait", + "trio._sync.Lock", + "trio._sync.Semaphore", + "trio._sync.Semaphore.__init__", + "trio._sync.Semaphore.__repr__", + "trio._sync.Semaphore.acquire", + "trio._sync.Semaphore.acquire_nowait", + "trio._sync.Semaphore.max_value", + "trio._sync.Semaphore.release", + "trio._sync.Semaphore.statistics", + "trio._sync.Semaphore.value", + "trio._sync.StrictFIFOLock", + "trio._sync._LockImpl", + "trio._sync._LockImpl.__repr__", + "trio._sync._LockImpl.acquire", + "trio._sync._LockImpl.acquire_nowait", + "trio._sync._LockImpl.locked", + "trio._sync._LockImpl.release", + "trio._sync._LockImpl.statistics", + "trio._util.ConflictDetector.__enter__", + "trio._util.ConflictDetector.__exit__", + "trio._util.ConflictDetector.__init__", + "trio._util.Final.__new__", + "trio._util.NoPublicConstructor", + "trio._util.NoPublicConstructor.__call__", + "trio.testing._memory_streams.MemoryReceiveStream", "trio.testing._memory_streams.MemoryReceiveStream.__init__", "trio.testing._memory_streams.MemoryReceiveStream.aclose", "trio.testing._memory_streams.MemoryReceiveStream.close", @@ -137,6 +289,7 @@ "trio.testing._memory_streams.MemoryReceiveStream.put_eof", "trio.testing._memory_streams.MemoryReceiveStream.receive_some", "trio.testing._memory_streams.MemoryReceiveStream.receive_some_hook", + "trio.testing._memory_streams.MemorySendStream", "trio.testing._memory_streams.MemorySendStream.__init__", "trio.testing._memory_streams.MemorySendStream.aclose", "trio.testing._memory_streams.MemorySendStream.close", @@ -147,21 +300,571 @@ "trio.testing._memory_streams.MemorySendStream.send_all_hook", "trio.testing._memory_streams.MemorySendStream.wait_send_all_might_not_block", "trio.testing._memory_streams.MemorySendStream.wait_send_all_might_not_block_hook", - "trio.testing.assert_checkpoints", - "trio.testing.assert_no_checkpoints", - "trio.testing.check_half_closeable_stream", - "trio.testing.check_one_way_stream", - "trio.testing.check_two_way_stream", - "trio.testing.lockstep_stream_one_way_pair", - "trio.testing.lockstep_stream_pair", - "trio.testing.memory_stream_one_way_pair", - "trio.testing.memory_stream_pair", - "trio.testing.memory_stream_pump", - "trio.testing.open_stream_to_socket_listener", - "trio.testing.trio_test", - "trio.testing.wait_all_tasks_blocked", - "trio.tests.TestsDeprecationWrapper", - "trio.to_thread.current_default_thread_limiter" + "trio.testing._sequencer.Sequencer", + "trio.testing._sequencer.Sequencer.__call__", + "trio.tests.conftest.RUN_SLOW", + "trio.tests.conftest.autojump_clock", + "trio.tests.conftest.mock_clock", + "trio.tests.conftest.pytest_addoption", + "trio.tests.conftest.pytest_configure", + "trio.tests.conftest.pytest_pyfunc_call", + "trio.tests.module_with_deprecations.__deprecated_attributes__", + "trio.tests.module_with_deprecations.this_mod", + "trio.tests.test_abc.test_AsyncResource_defaults", + "trio.tests.test_abc.test_abc_generics", + "trio.tests.test_channel.test_553", + "trio.tests.test_channel.test_channel", + "trio.tests.test_channel.test_channel_fairness", + "trio.tests.test_channel.test_channel_multiple_consumers", + "trio.tests.test_channel.test_channel_multiple_producers", + "trio.tests.test_channel.test_close_basics", + "trio.tests.test_channel.test_close_multiple_receive_handles", + "trio.tests.test_channel.test_close_multiple_send_handles", + "trio.tests.test_channel.test_close_sync", + "trio.tests.test_channel.test_inf_capacity", + "trio.tests.test_channel.test_receive_channel_clone_and_close", + "trio.tests.test_channel.test_statistics", + "trio.tests.test_channel.test_unbuffered", + "trio.tests.test_contextvars.test_contextvars_copy", + "trio.tests.test_contextvars.test_contextvars_default", + "trio.tests.test_contextvars.test_contextvars_set", + "trio.tests.test_contextvars.trio_testing_contextvar", + "trio.tests.test_deprecate.Alias", + "trio.tests.test_deprecate.Alias.new_hotness_method", + "trio.tests.test_deprecate.Alias.old_hotness_method", + "trio.tests.test_deprecate.Foo", + "trio.tests.test_deprecate.Foo.method", + "trio.tests.test_deprecate.deprecated_old", + "trio.tests.test_deprecate.deprecated_with_thing", + "trio.tests.test_deprecate.docstring_test1", + "trio.tests.test_deprecate.docstring_test2", + "trio.tests.test_deprecate.docstring_test3", + "trio.tests.test_deprecate.docstring_test4", + "trio.tests.test_deprecate.new", + "trio.tests.test_deprecate.new_hotness", + "trio.tests.test_deprecate.old", + "trio.tests.test_deprecate.old_hotness", + "trio.tests.test_deprecate.recwarn_always", + "trio.tests.test_deprecate.test_deprecated_alias", + "trio.tests.test_deprecate.test_deprecated_alias_method", + "trio.tests.test_deprecate.test_deprecated_decorator", + "trio.tests.test_deprecate.test_deprecated_decorator_method", + "trio.tests.test_deprecate.test_deprecated_decorator_with_explicit_thing", + "trio.tests.test_deprecate.test_deprecated_docstring_munging", + "trio.tests.test_deprecate.test_module_with_deprecations", + "trio.tests.test_deprecate.test_warn_deprecated", + "trio.tests.test_deprecate.test_warn_deprecated_formatting", + "trio.tests.test_deprecate.test_warn_deprecated_no_instead_or_issue", + "trio.tests.test_deprecate.test_warn_deprecated_stacklevel", + "trio.tests.test_dtls.ca", + "trio.tests.test_dtls.client_ctx", + "trio.tests.test_dtls.dtls_echo_server", + "trio.tests.test_dtls.endpoint", + "trio.tests.test_dtls.parametrize_ipv6", + "trio.tests.test_dtls.server_cert", + "trio.tests.test_dtls.server_ctx", + "trio.tests.test_dtls.test_already_closed_socket_doesnt_crash", + "trio.tests.test_dtls.test_association_replaced_before_handshake_starts", + "trio.tests.test_dtls.test_association_replaced_while_handshake_running", + "trio.tests.test_dtls.test_channel_closing", + "trio.tests.test_dtls.test_client_cancels_handshake_and_starts_new_one", + "trio.tests.test_dtls.test_client_multiplex", + "trio.tests.test_dtls.test_connect_to_non_server", + "trio.tests.test_dtls.test_double_serve", + "trio.tests.test_dtls.test_dtls_over_dgram_only", + "trio.tests.test_dtls.test_explicit_tiny_mtu_is_respected", + "trio.tests.test_dtls.test_full_duplex", + "trio.tests.test_dtls.test_gc_after_trio_exits", + "trio.tests.test_dtls.test_gc_as_packet_received", + "trio.tests.test_dtls.test_gc_before_system_task_starts", + "trio.tests.test_dtls.test_handshake_handles_minimum_network_mtu", + "trio.tests.test_dtls.test_handshake_over_terrible_network", + "trio.tests.test_dtls.test_implicit_handshake", + "trio.tests.test_dtls.test_incoming_buffer_overflow", + "trio.tests.test_dtls.test_initial_retransmit_timeout_configuration", + "trio.tests.test_dtls.test_invalid_cookie_rejected", + "trio.tests.test_dtls.test_openssl_retransmit_doesnt_break_stuff", + "trio.tests.test_dtls.test_send_to_closed_local_port", + "trio.tests.test_dtls.test_serve_exits_cleanly_on_close", + "trio.tests.test_dtls.test_server_socket_doesnt_crash_on_garbage", + "trio.tests.test_dtls.test_smoke", + "trio.tests.test_dtls.test_socket_closed_while_processing_clienthello", + "trio.tests.test_dtls.test_swap_client_server", + "trio.tests.test_dtls.test_system_task_cleaned_up_on_gc", + "trio.tests.test_exports.PUBLIC_MODULES", + "trio.tests.test_exports.PUBLIC_MODULE_NAMES", + "trio.tests.test_exports.public_modules", + "trio.tests.test_exports.test_classes_are_final", + "trio.tests.test_exports.test_core_is_properly_reexported", + "trio.tests.test_exports.test_static_tool_sees_all_symbols", + "trio.tests.test_fakenet.fn", + "trio.tests.test_fakenet.test_basic_tcp", + "trio.tests.test_fakenet.test_basic_udp", + "trio.tests.test_fakenet.test_msg_trunc", + "trio.tests.test_file_io.async_file", + "trio.tests.test_file_io.path", + "trio.tests.test_file_io.test_aclose_cancelled", + "trio.tests.test_file_io.test_async_iter", + "trio.tests.test_file_io.test_async_methods_generated_once", + "trio.tests.test_file_io.test_async_methods_match_wrapper", + "trio.tests.test_file_io.test_async_methods_signature", + "trio.tests.test_file_io.test_async_methods_wrap", + "trio.tests.test_file_io.test_detach_rewraps_asynciobase", + "trio.tests.test_file_io.test_dir_matches_wrapped", + "trio.tests.test_file_io.test_open", + "trio.tests.test_file_io.test_open_context_manager", + "trio.tests.test_file_io.test_sync_attrs_forwarded", + "trio.tests.test_file_io.test_sync_attrs_match_wrapper", + "trio.tests.test_file_io.test_unsupported_not_forwarded", + "trio.tests.test_file_io.test_wrap_invalid", + "trio.tests.test_file_io.test_wrap_non_iobase", + "trio.tests.test_file_io.test_wrapped_property", + "trio.tests.test_file_io.wrapped", + "trio.tests.test_highlevel_generic.RecordReceiveStream", + "trio.tests.test_highlevel_generic.RecordReceiveStream.aclose", + "trio.tests.test_highlevel_generic.RecordReceiveStream.receive_some", + "trio.tests.test_highlevel_generic.RecordReceiveStream.record", + "trio.tests.test_highlevel_generic.RecordSendStream", + "trio.tests.test_highlevel_generic.RecordSendStream.aclose", + "trio.tests.test_highlevel_generic.RecordSendStream.record", + "trio.tests.test_highlevel_generic.RecordSendStream.send_all", + "trio.tests.test_highlevel_generic.RecordSendStream.wait_send_all_might_not_block", + "trio.tests.test_highlevel_generic.test_StapledStream", + "trio.tests.test_highlevel_generic.test_StapledStream_with_erroring_close", + "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver", + "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver.family_addr_pairs", + "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver.getaddrinfo", + "trio.tests.test_highlevel_open_tcp_listeners.FakeOSError", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.backlog", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.bind", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.close", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.closed", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.family", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.getsockopt", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.listen", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.poison_listen", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.proto", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.setsockopt", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.type", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.poison_after", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.raise_on_family", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.socket", + "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.sockets", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_backlog", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_basic", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_ipv6_v6only", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_multiple_host_cleanup_on_error", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_port_checking", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_rebind", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_socket_fails_not_afnosupport", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_some_address_families_unavailable", + "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_specific_port_specific_host", + "trio.tests.test_highlevel_open_tcp_listeners.test_serve_tcp", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.close", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.closed", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.connect", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.failing", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.family", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.ip", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.port", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.proto", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.scenario", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.setsockopt", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.succeeded", + "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.type", + "trio.tests.test_highlevel_open_tcp_stream.Scenario", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.__init__", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.check", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.connect_times", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.getaddrinfo", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.getnameinfo", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.ip_dict", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.ip_order", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.socket", + "trio.tests.test_highlevel_open_tcp_stream.Scenario.sockets", + "trio.tests.test_highlevel_open_tcp_stream.can_bind_127_0_0_2", + "trio.tests.test_highlevel_open_tcp_stream.run_scenario", + "trio.tests.test_highlevel_open_tcp_stream.test_all_fail", + "trio.tests.test_highlevel_open_tcp_stream.test_basic_fallthrough", + "trio.tests.test_highlevel_open_tcp_stream.test_cancel", + "trio.tests.test_highlevel_open_tcp_stream.test_close_all", + "trio.tests.test_highlevel_open_tcp_stream.test_custom_delay", + "trio.tests.test_highlevel_open_tcp_stream.test_custom_errors_expedite", + "trio.tests.test_highlevel_open_tcp_stream.test_does_reorder", + "trio.tests.test_highlevel_open_tcp_stream.test_early_success", + "trio.tests.test_highlevel_open_tcp_stream.test_format_host_port", + "trio.tests.test_highlevel_open_tcp_stream.test_handles_no_ipv4", + "trio.tests.test_highlevel_open_tcp_stream.test_handles_no_ipv6", + "trio.tests.test_highlevel_open_tcp_stream.test_local_address_real", + "trio.tests.test_highlevel_open_tcp_stream.test_multi_success", + "trio.tests.test_highlevel_open_tcp_stream.test_no_hosts", + "trio.tests.test_highlevel_open_tcp_stream.test_one_host_failed_after_connect", + "trio.tests.test_highlevel_open_tcp_stream.test_one_host_quick_fail", + "trio.tests.test_highlevel_open_tcp_stream.test_one_host_quick_success", + "trio.tests.test_highlevel_open_tcp_stream.test_one_host_slow_fail", + "trio.tests.test_highlevel_open_tcp_stream.test_one_host_slow_success", + "trio.tests.test_highlevel_open_tcp_stream.test_open_tcp_stream_input_validation", + "trio.tests.test_highlevel_open_tcp_stream.test_open_tcp_stream_real_socket_smoketest", + "trio.tests.test_highlevel_open_tcp_stream.test_reorder_for_rfc_6555_section_5_4", + "trio.tests.test_highlevel_open_unix_stream.pytestmark", + "trio.tests.test_highlevel_open_unix_stream.test_close_on_error", + "trio.tests.test_highlevel_open_unix_stream.test_open_bad_socket", + "trio.tests.test_highlevel_open_unix_stream.test_open_unix_socket", + "trio.tests.test_highlevel_open_unix_stream.test_open_with_bad_filename_type", + "trio.tests.test_highlevel_serve_listeners.MemoryListener", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.accept", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.accept_hook", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.accepted_streams", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.aclose", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.closed", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.connect", + "trio.tests.test_highlevel_serve_listeners.MemoryListener.queued_streams", + "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_accept_capacity_error", + "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_accept_unrecognized_error", + "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_basic", + "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_connection_nursery", + "trio.tests.test_highlevel_socket.fill_stream", + "trio.tests.test_highlevel_socket.name", + "trio.tests.test_highlevel_socket.test_SocketListener", + "trio.tests.test_highlevel_socket.test_SocketListener_accept_errors", + "trio.tests.test_highlevel_socket.test_SocketListener_socket_closed_underfoot", + "trio.tests.test_highlevel_socket.test_SocketStream_basics", + "trio.tests.test_highlevel_socket.test_SocketStream_generic", + "trio.tests.test_highlevel_socket.test_SocketStream_send_all", + "trio.tests.test_highlevel_socket.test_socket_stream_works_when_peer_has_already_closed", + "trio.tests.test_highlevel_socket.trio", + "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver", + "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.getaddrinfo", + "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.getnameinfo", + "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.sockaddr", + "trio.tests.test_highlevel_ssl_helpers.echo_handler", + "trio.tests.test_highlevel_ssl_helpers.test_open_ssl_over_tcp_listeners", + "trio.tests.test_highlevel_ssl_helpers.test_open_ssl_over_tcp_stream_and_everything_else", + "trio.tests.test_path.MockWrapped", + "trio.tests.test_path.MockWrapper", + "trio.tests.test_path.cls_pairs", + "trio.tests.test_path.method_pair", + "trio.tests.test_path.path", + "trio.tests.test_path.test_async_method_signature", + "trio.tests.test_path.test_async_methods_rewrap", + "trio.tests.test_path.test_classmethods", + "trio.tests.test_path.test_cmp_magic", + "trio.tests.test_path.test_compare_async_stat_methods", + "trio.tests.test_path.test_div_magic", + "trio.tests.test_path.test_forward_methods_rewrap", + "trio.tests.test_path.test_forward_methods_without_rewrap", + "trio.tests.test_path.test_forward_properties_rewrap", + "trio.tests.test_path.test_forwarded_properties", + "trio.tests.test_path.test_globmethods", + "trio.tests.test_path.test_hash_magic", + "trio.tests.test_path.test_invalid_name_not_wrapped", + "trio.tests.test_path.test_iterdir", + "trio.tests.test_path.test_magic", + "trio.tests.test_path.test_open_file_can_open_path", + "trio.tests.test_path.test_open_is_async_context_manager", + "trio.tests.test_path.test_path_nonpath", + "trio.tests.test_path.test_path_wraps_path", + "trio.tests.test_path.test_repr", + "trio.tests.test_path.test_type_forwards_private", + "trio.tests.test_path.test_type_forwards_unsupported", + "trio.tests.test_path.test_type_wraps_private", + "trio.tests.test_path.test_type_wraps_unsupported", + "trio.tests.test_scheduler_determinism.scheduler_trace", + "trio.tests.test_scheduler_determinism.test_the_trio_scheduler_is_deterministic_if_seeded", + "trio.tests.test_scheduler_determinism.test_the_trio_scheduler_is_not_deterministic", + "trio.tests.test_signals.test_catch_signals_race_condition_on_exit", + "trio.tests.test_signals.test_catch_signals_wrong_thread", + "trio.tests.test_signals.test_open_signal_receiver", + "trio.tests.test_signals.test_open_signal_receiver_conflict", + "trio.tests.test_signals.test_open_signal_receiver_empty_fail", + "trio.tests.test_signals.test_open_signal_receiver_no_starvation", + "trio.tests.test_signals.test_open_signal_receiver_restore_handler_after_duplicate_signal", + "trio.tests.test_signals.test_open_signal_receiver_restore_handler_after_one_bad_signal", + "trio.tests.test_signals.wait_run_sync_soon_idempotent_queue_barrier", + "trio.tests.test_socket.Addresses", + "trio.tests.test_socket.Addresses.arbitrary", + "trio.tests.test_socket.Addresses.bind_all", + "trio.tests.test_socket.Addresses.broadcast", + "trio.tests.test_socket.Addresses.localhost", + "trio.tests.test_socket.MonkeypatchedGAI", + "trio.tests.test_socket.MonkeypatchedGAI.__init__", + "trio.tests.test_socket.MonkeypatchedGAI.getaddrinfo", + "trio.tests.test_socket.MonkeypatchedGAI.record", + "trio.tests.test_socket.MonkeypatchedGAI.set", + "trio.tests.test_socket.gai_without_v4mapped_is_buggy", + "trio.tests.test_socket.monkeygai", + "trio.tests.test_socket.test_SocketType_basics", + "trio.tests.test_socket.test_SocketType_connect_paths", + "trio.tests.test_socket.test_SocketType_dup", + "trio.tests.test_socket.test_SocketType_is_abstract", + "trio.tests.test_socket.test_SocketType_is_readable", + "trio.tests.test_socket.test_SocketType_non_blocking_paths", + "trio.tests.test_socket.test_SocketType_resolve", + "trio.tests.test_socket.test_SocketType_shutdown", + "trio.tests.test_socket.test_SocketType_simple_server", + "trio.tests.test_socket.test_SocketType_unresolved_names", + "trio.tests.test_socket.test__try_sync", + "trio.tests.test_socket.test_custom_hostname_resolver", + "trio.tests.test_socket.test_custom_socket_factory", + "trio.tests.test_socket.test_from_fd", + "trio.tests.test_socket.test_from_stdlib_socket", + "trio.tests.test_socket.test_fromshare", + "trio.tests.test_socket.test_getaddrinfo", + "trio.tests.test_socket.test_getnameinfo", + "trio.tests.test_socket.test_getprotobyname", + "trio.tests.test_socket.test_idna", + "trio.tests.test_socket.test_interrupted_by_close", + "trio.tests.test_socket.test_many_sockets", + "trio.tests.test_socket.test_resolve_address_exception_in_connect_closes_socket", + "trio.tests.test_socket.test_send_recv_variants", + "trio.tests.test_socket.test_sniff_sockopts", + "trio.tests.test_socket.test_socket", + "trio.tests.test_socket.test_socket_has_some_reexports", + "trio.tests.test_socket.test_socket_v6", + "trio.tests.test_socket.test_socketpair_simple", + "trio.tests.test_socket.test_unix_domain_socket", + "trio.tests.test_ssl.PyOpenSSLEchoStream", + "trio.tests.test_ssl.PyOpenSSLEchoStream.__init__", + "trio.tests.test_ssl.PyOpenSSLEchoStream.aclose", + "trio.tests.test_ssl.PyOpenSSLEchoStream.receive_some", + "trio.tests.test_ssl.PyOpenSSLEchoStream.renegotiate", + "trio.tests.test_ssl.PyOpenSSLEchoStream.renegotiate_pending", + "trio.tests.test_ssl.PyOpenSSLEchoStream.send_all", + "trio.tests.test_ssl.PyOpenSSLEchoStream.sleeper", + "trio.tests.test_ssl.PyOpenSSLEchoStream.wait_send_all_might_not_block", + "trio.tests.test_ssl.client_ctx", + "trio.tests.test_ssl.ssl_echo_serve_sync", + "trio.tests.test_ssl.ssl_echo_server", + "trio.tests.test_ssl.ssl_echo_server_raw", + "trio.tests.test_ssl.ssl_lockstep_stream_pair", + "trio.tests.test_ssl.ssl_memory_stream_pair", + "trio.tests.test_ssl.ssl_wrap_pair", + "trio.tests.test_ssl.test_PyOpenSSLEchoStream_gives_resource_busy_errors", + "trio.tests.test_ssl.test_SSLListener", + "trio.tests.test_ssl.test_SSLStream_generic", + "trio.tests.test_ssl.test_attributes", + "trio.tests.test_ssl.test_checkpoints", + "trio.tests.test_ssl.test_closing_nice_case", + "trio.tests.test_ssl.test_full_duplex_basics", + "trio.tests.test_ssl.test_get_channel_binding_after_handshake", + "trio.tests.test_ssl.test_get_channel_binding_before_handshake", + "trio.tests.test_ssl.test_getpeercert", + "trio.tests.test_ssl.test_https_mode_eof_before_handshake", + "trio.tests.test_ssl.test_receive_error_during_handshake", + "trio.tests.test_ssl.test_renegotiation_randomized", + "trio.tests.test_ssl.test_renegotiation_simple", + "trio.tests.test_ssl.test_resource_busy_errors", + "trio.tests.test_ssl.test_selected_alpn_protocol_before_handshake", + "trio.tests.test_ssl.test_selected_alpn_protocol_when_not_set", + "trio.tests.test_ssl.test_selected_npn_protocol_before_handshake", + "trio.tests.test_ssl.test_selected_npn_protocol_when_not_set", + "trio.tests.test_ssl.test_send_all_empty_string", + "trio.tests.test_ssl.test_send_all_fails_in_the_middle", + "trio.tests.test_ssl.test_send_error_during_handshake", + "trio.tests.test_ssl.test_ssl_bad_shutdown", + "trio.tests.test_ssl.test_ssl_bad_shutdown_but_its_ok", + "trio.tests.test_ssl.test_ssl_client_basics", + "trio.tests.test_ssl.test_ssl_handshake_failure_during_aclose", + "trio.tests.test_ssl.test_ssl_https_compatibility_disagreement", + "trio.tests.test_ssl.test_ssl_only_closes_stream_once", + "trio.tests.test_ssl.test_ssl_over_ssl", + "trio.tests.test_ssl.test_ssl_server_basics", + "trio.tests.test_ssl.test_unwrap", + "trio.tests.test_ssl.test_wait_writable_calls_underlying_wait_writable", + "trio.tests.test_subprocess.CAT", + "trio.tests.test_subprocess.COPY_STDIN_TO_STDOUT_AND_BACKWARD_TO_STDERR", + "trio.tests.test_subprocess.EXIT_FALSE", + "trio.tests.test_subprocess.EXIT_TRUE", + "trio.tests.test_subprocess.background_process_param", + "trio.tests.test_subprocess.fail_after", + "trio.tests.test_subprocess.got_signal", + "trio.tests.test_subprocess.move_on_after", + "trio.tests.test_subprocess.open_process_then_kill", + "trio.tests.test_subprocess.posix", + "trio.tests.test_subprocess.python", + "trio.tests.test_subprocess.run_process", + "trio.tests.test_subprocess.run_process_in_nursery", + "trio.tests.test_subprocess.sleep", + "trio.tests.test_subprocess.sleep_forever", + "trio.tests.test_subprocess.test_async_with_basics_deprecated", + "trio.tests.test_subprocess.test_auto_update_returncode", + "trio.tests.test_subprocess.test_basic", + "trio.tests.test_subprocess.test_custom_deliver_cancel", + "trio.tests.test_subprocess.test_errors", + "trio.tests.test_subprocess.test_for_leaking_fds", + "trio.tests.test_subprocess.test_interactive", + "trio.tests.test_subprocess.test_kill_when_context_cancelled", + "trio.tests.test_subprocess.test_multi_wait", + "trio.tests.test_subprocess.test_pipes", + "trio.tests.test_subprocess.test_run", + "trio.tests.test_subprocess.test_run_check", + "trio.tests.test_subprocess.test_run_process_background_fail", + "trio.tests.test_subprocess.test_run_with_broken_pipe", + "trio.tests.test_subprocess.test_signals", + "trio.tests.test_subprocess.test_stderr_stdout", + "trio.tests.test_subprocess.test_subprocess_pidfd_unnotified", + "trio.tests.test_subprocess.test_wait_reapable_fails", + "trio.tests.test_subprocess.test_waitid_eintr", + "trio.tests.test_subprocess.test_warn_on_cancel_SIGKILL_escalation", + "trio.tests.test_subprocess.test_warn_on_failed_cancel_terminate", + "trio.tests.test_sync.ChannelLock1", + "trio.tests.test_sync.ChannelLock1.__init__", + "trio.tests.test_sync.ChannelLock1.acquire", + "trio.tests.test_sync.ChannelLock1.acquire_nowait", + "trio.tests.test_sync.ChannelLock1.r", + "trio.tests.test_sync.ChannelLock1.release", + "trio.tests.test_sync.ChannelLock1.s", + "trio.tests.test_sync.ChannelLock2", + "trio.tests.test_sync.ChannelLock2.acquire", + "trio.tests.test_sync.ChannelLock2.acquire_nowait", + "trio.tests.test_sync.ChannelLock2.r", + "trio.tests.test_sync.ChannelLock2.release", + "trio.tests.test_sync.ChannelLock2.s", + "trio.tests.test_sync.ChannelLock3", + "trio.tests.test_sync.ChannelLock3.acquire", + "trio.tests.test_sync.ChannelLock3.acquire_nowait", + "trio.tests.test_sync.ChannelLock3.acquired", + "trio.tests.test_sync.ChannelLock3.r", + "trio.tests.test_sync.ChannelLock3.release", + "trio.tests.test_sync.ChannelLock3.s", + "trio.tests.test_sync.enable_ki_protection", + "trio.tests.test_sync.generic_lock_test", + "trio.tests.test_sync.lock_factories", + "trio.tests.test_sync.lock_factory_names", + "trio.tests.test_sync.test_CapacityLimiter", + "trio.tests.test_sync.test_CapacityLimiter_change_total_tokens", + "trio.tests.test_sync.test_CapacityLimiter_inf", + "trio.tests.test_sync.test_CapacityLimiter_memleak_548", + "trio.tests.test_sync.test_Condition", + "trio.tests.test_sync.test_Event", + "trio.tests.test_sync.test_Lock_and_StrictFIFOLock", + "trio.tests.test_sync.test_Semaphore", + "trio.tests.test_sync.test_Semaphore_bounded", + "trio.tests.test_sync.test_generic_lock_acquire_nowait_blocks_acquire", + "trio.tests.test_sync.test_generic_lock_exclusion", + "trio.tests.test_sync.test_generic_lock_fifo_fairness", + "trio.tests.test_sync.trio", + "trio.tests.test_testing.assert_checkpoints", + "trio.tests.test_testing.assert_no_checkpoints", + "trio.tests.test_testing.check_half_closeable_stream", + "trio.tests.test_testing.check_one_way_stream", + "trio.tests.test_testing.check_two_way_stream", + "trio.tests.test_testing.fixup_module_metadata", + "trio.tests.test_testing.lockstep_stream_one_way_pair", + "trio.tests.test_testing.lockstep_stream_pair", + "trio.tests.test_testing.memory_stream_one_way_pair", + "trio.tests.test_testing.memory_stream_pair", + "trio.tests.test_testing.memory_stream_pump", + "trio.tests.test_testing.open_stream_to_socket_listener", + "trio.tests.test_testing.sleep", + "trio.tests.test_testing.test_MemoryReceiveStream", + "trio.tests.test_testing.test_MemoryRecvStream_closing", + "trio.tests.test_testing.test_MemorySendStream", + "trio.tests.test_testing.test_Sequencer", + "trio.tests.test_testing.test_Sequencer_cancel", + "trio.tests.test_testing.test__UnboundeByteQueue", + "trio.tests.test_testing.test__assert_raises", + "trio.tests.test_testing.test_assert_checkpoints", + "trio.tests.test_testing.test_assert_no_checkpoints", + "trio.tests.test_testing.test_lockstep_streams_with_generic_tests", + "trio.tests.test_testing.test_memory_stream_one_way_pair", + "trio.tests.test_testing.test_memory_stream_pair", + "trio.tests.test_testing.test_memory_stream_pump", + "trio.tests.test_testing.test_memory_streams_with_generic_tests", + "trio.tests.test_testing.test_open_stream_to_socket_listener", + "trio.tests.test_testing.test_wait_all_tasks_blocked", + "trio.tests.test_testing.test_wait_all_tasks_blocked_with_cushion", + "trio.tests.test_testing.test_wait_all_tasks_blocked_with_timeouts", + "trio.tests.test_testing.trio_test", + "trio.tests.test_testing.wait_all_tasks_blocked", + "trio.tests.test_threads.sleep", + "trio.tests.test_threads.test_await_in_trio_thread_while_main_exits", + "trio.tests.test_threads.test_do_in_trio_thread", + "trio.tests.test_threads.test_do_in_trio_thread_from_trio_thread", + "trio.tests.test_threads.test_from_thread_inside_trio_thread", + "trio.tests.test_threads.test_from_thread_no_token", + "trio.tests.test_threads.test_from_thread_run_during_shutdown", + "trio.tests.test_threads.test_run_fn_as_system_task_catched_badly_typed_token", + "trio.tests.test_threads.test_run_in_trio_thread_ki", + "trio.tests.test_threads.test_run_in_worker_thread", + "trio.tests.test_threads.test_run_in_worker_thread_abandoned", + "trio.tests.test_threads.test_run_in_worker_thread_cancellation", + "trio.tests.test_threads.test_run_in_worker_thread_custom_limiter", + "trio.tests.test_threads.test_run_in_worker_thread_fail_to_spawn", + "trio.tests.test_threads.test_run_in_worker_thread_limiter", + "trio.tests.test_threads.test_run_in_worker_thread_limiter_error", + "trio.tests.test_threads.test_trio_from_thread_run", + "trio.tests.test_threads.test_trio_from_thread_run_contextvars", + "trio.tests.test_threads.test_trio_from_thread_run_sync", + "trio.tests.test_threads.test_trio_from_thread_run_sync_contextvars", + "trio.tests.test_threads.test_trio_from_thread_token", + "trio.tests.test_threads.test_trio_from_thread_token_kwarg", + "trio.tests.test_threads.test_trio_to_thread_run_sync_contextvars", + "trio.tests.test_threads.test_trio_to_thread_run_sync_expected_error", + "trio.tests.test_threads.test_trio_to_thread_run_sync_token", + "trio.tests.test_threads.test_trio_token_weak_referenceable", + "trio.tests.test_threads.test_unsafe_cancellable_kwarg", + "trio.tests.test_threads.trio_test_contextvar", + "trio.tests.test_timeouts.check_takes_about", + "trio.tests.test_timeouts.fail_after", + "trio.tests.test_timeouts.move_on_after", + "trio.tests.test_timeouts.move_on_at", + "trio.tests.test_timeouts.sleep", + "trio.tests.test_timeouts.sleep_forever", + "trio.tests.test_timeouts.sleep_until", + "trio.tests.test_timeouts.test_fail", + "trio.tests.test_timeouts.test_move_on_after", + "trio.tests.test_timeouts.test_sleep", + "trio.tests.test_timeouts.trio", + "trio.tests.test_unix_pipes.make_clogged_pipe", + "trio.tests.test_unix_pipes.make_pipe", + "trio.tests.test_unix_pipes.move_on_after", + "trio.tests.test_unix_pipes.posix", + "trio.tests.test_unix_pipes.pytestmark", + "trio.tests.test_unix_pipes.test_async_with", + "trio.tests.test_unix_pipes.test_bizarro_OSError_from_receive", + "trio.tests.test_unix_pipes.test_close_at_bad_time_for_receive_some", + "trio.tests.test_unix_pipes.test_close_at_bad_time_for_send_all", + "trio.tests.test_unix_pipes.test_del", + "trio.tests.test_unix_pipes.test_misdirected_aclose_regression", + "trio.tests.test_unix_pipes.test_pipe_errors", + "trio.tests.test_unix_pipes.test_pipe_fully", + "trio.tests.test_unix_pipes.test_pipes_combined", + "trio.tests.test_unix_pipes.test_receive_pipe", + "trio.tests.test_unix_pipes.test_send_pipe", + "trio.tests.test_util.test_ConflictDetector", + "trio.tests.test_util.test_coroutine_or_error", + "trio.tests.test_util.test_final_metaclass", + "trio.tests.test_util.test_generic_function", + "trio.tests.test_util.test_is_main_thread", + "trio.tests.test_util.test_module_metadata_is_fixed_up", + "trio.tests.test_util.test_no_public_constructor_metaclass", + "trio.tests.test_util.test_signal_raise", + "trio.tests.test_wait_for_object.on_windows", + "trio.tests.test_wait_for_object.pytestmark", + "trio.tests.test_wait_for_object.test_WaitForMultipleObjects_sync", + "trio.tests.test_wait_for_object.test_WaitForMultipleObjects_sync_slow", + "trio.tests.test_wait_for_object.test_WaitForSingleObject", + "trio.tests.test_wait_for_object.test_WaitForSingleObject_slow", + "trio.tests.test_windows_pipes.PipeReceiveStream", + "trio.tests.test_windows_pipes.PipeSendStream", + "trio.tests.test_windows_pipes.make_pipe", + "trio.tests.test_windows_pipes.move_on_after", + "trio.tests.test_windows_pipes.pipe", + "trio.tests.test_windows_pipes.pytestmark", + "trio.tests.test_windows_pipes.test_async_with", + "trio.tests.test_windows_pipes.test_close_during_write", + "trio.tests.test_windows_pipes.test_pipe_error_on_close", + "trio.tests.test_windows_pipes.test_pipe_fully", + "trio.tests.test_windows_pipes.test_pipe_typecheck", + "trio.tests.test_windows_pipes.test_pipes_combined", + "trio.tests.tools.test_gen_exports.test_create_pass_through_args", + "trio.tests.tools.test_gen_exports.test_get_public_methods", + "trio.tests.tools.test_gen_exports.test_process", + "trio.trio.__deprecated_attributes__" ] } } From 553b1bcc083e92a83d40c1c0fccfa77dd3def7e0 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 04:17:25 -0500 Subject: [PATCH 03/21] Revert "Changes from `./check.sh`" This reverts commit 0ea61fb543069cc8b56dd60f404fe687d0166fc5. --- trio/_tests/verify_types.json | 871 ++++------------------------------ 1 file changed, 84 insertions(+), 787 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index f73d72b406..60132e07fd 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -2,21 +2,21 @@ "generalDiagnostics": [], "summary": { "errorCount": 0, - "filesAnalyzed": 41, + "filesAnalyzed": 8, "informationCount": 0, "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.17563739376770537, + "completenessScore": 0.9072, "exportedSymbolCounts": { - "withAmbiguousType": 45, - "withKnownType": 124, - "withUnknownType": 537 + "withAmbiguousType": 1, + "withKnownType": 567, + "withUnknownType": 57 }, "ignoreUnknownTypesFromImports": true, - "missingClassDocStringCount": 20, + "missingClassDocStringCount": 1, "missingDefaultParamCount": 0, - "missingFunctionDocStringCount": 424, + "missingFunctionDocStringCount": 4, "moduleName": "trio", "modules": [ { @@ -40,178 +40,51 @@ { "name": "trio.tests" }, - { - "name": "trio.tests.conftest" - }, - { - "name": "trio.tests.module_with_deprecations" - }, - { - "name": "trio.tests.test_abc" - }, - { - "name": "trio.tests.test_channel" - }, - { - "name": "trio.tests.test_contextvars" - }, - { - "name": "trio.tests.test_deprecate" - }, - { - "name": "trio.tests.test_dtls" - }, - { - "name": "trio.tests.test_exports" - }, - { - "name": "trio.tests.test_fakenet" - }, - { - "name": "trio.tests.test_file_io" - }, - { - "name": "trio.tests.test_highlevel_generic" - }, - { - "name": "trio.tests.test_highlevel_open_tcp_listeners" - }, - { - "name": "trio.tests.test_highlevel_open_tcp_stream" - }, - { - "name": "trio.tests.test_highlevel_open_unix_stream" - }, - { - "name": "trio.tests.test_highlevel_serve_listeners" - }, - { - "name": "trio.tests.test_highlevel_socket" - }, - { - "name": "trio.tests.test_highlevel_ssl_helpers" - }, - { - "name": "trio.tests.test_path" - }, - { - "name": "trio.tests.test_scheduler_determinism" - }, - { - "name": "trio.tests.test_signals" - }, - { - "name": "trio.tests.test_socket" - }, - { - "name": "trio.tests.test_ssl" - }, - { - "name": "trio.tests.test_subprocess" - }, - { - "name": "trio.tests.test_sync" - }, - { - "name": "trio.tests.test_testing" - }, - { - "name": "trio.tests.test_threads" - }, - { - "name": "trio.tests.test_timeouts" - }, - { - "name": "trio.tests.test_unix_pipes" - }, - { - "name": "trio.tests.test_util" - }, - { - "name": "trio.tests.test_wait_for_object" - }, - { - "name": "trio.tests.test_windows_pipes" - }, - { - "name": "trio.tests.tools" - }, - { - "name": "trio.tests.tools.test_gen_exports" - }, { "name": "trio.to_thread" } ], "otherSymbolCounts": { - "withAmbiguousType": 6, - "withKnownType": 54, - "withUnknownType": 158 + "withAmbiguousType": 3, + "withKnownType": 574, + "withUnknownType": 76 }, "packageName": "trio", "symbols": [ "trio.__deprecated_attributes__", - "trio._abc.AsyncResource.__aenter__", - "trio._abc.AsyncResource.__aexit__", - "trio._abc.AsyncResource.aclose", - "trio._abc.Clock.current_time", - "trio._abc.Clock.deadline_to_sleep_time", - "trio._abc.Clock.start_clock", - "trio._abc.HalfCloseableStream", - "trio._abc.HalfCloseableStream.send_eof", - "trio._abc.HostnameResolver.getaddrinfo", - "trio._abc.HostnameResolver.getnameinfo", - "trio._abc.Listener", - "trio._abc.Listener.accept", - "trio._abc.ReceiveStream", - "trio._abc.ReceiveStream.__aiter__", - "trio._abc.ReceiveStream.__anext__", - "trio._abc.ReceiveStream.receive_some", - "trio._abc.SendStream", - "trio._abc.SendStream.send_all", - "trio._abc.SendStream.wait_send_all_might_not_block", - "trio._abc.SocketFactory.socket", - "trio._abc.Stream", - "trio._core._mock_clock.MockClock", - "trio._core._mock_clock.MockClock.__init__", - "trio._core._mock_clock.MockClock.__repr__", - "trio._core._mock_clock.MockClock.autojump_threshold", - "trio._core._mock_clock.MockClock.current_time", - "trio._core._mock_clock.MockClock.deadline_to_sleep_time", + "trio._core._entry_queue.TrioToken.run_sync_soon", "trio._core._mock_clock.MockClock.jump", - "trio._core._mock_clock.MockClock.rate", - "trio._core._mock_clock.MockClock.start_clock", - "trio._core._parking_lot.ParkingLot", - "trio._core._parking_lot.ParkingLot.__bool__", - "trio._core._parking_lot.ParkingLot.__len__", - "trio._core._parking_lot.ParkingLot.park", - "trio._core._parking_lot.ParkingLot.repark", - "trio._core._parking_lot.ParkingLot.repark_all", - "trio._core._parking_lot.ParkingLot.statistics", - "trio._core._parking_lot.ParkingLot.unpark", - "trio._core._parking_lot.ParkingLot.unpark_all", - "trio._highlevel_generic.StapledStream", - "trio._highlevel_generic.StapledStream.aclose", - "trio._highlevel_generic.StapledStream.receive_some", - "trio._highlevel_generic.StapledStream.receive_stream", - "trio._highlevel_generic.StapledStream.send_all", - "trio._highlevel_generic.StapledStream.send_eof", - "trio._highlevel_generic.StapledStream.send_stream", - "trio._highlevel_generic.StapledStream.wait_send_all_might_not_block", - "trio._highlevel_socket.SocketListener", - "trio._highlevel_socket.SocketListener.__init__", - "trio._highlevel_socket.SocketListener.accept", - "trio._highlevel_socket.SocketListener.aclose", - "trio._highlevel_socket.SocketStream", - "trio._highlevel_socket.SocketStream.__init__", - "trio._highlevel_socket.SocketStream.aclose", + "trio._core._run.Nursery.start", + "trio._core._run.Nursery.start_soon", + "trio._core._run.TaskStatus.__repr__", + "trio._core._run.TaskStatus.started", + "trio._core._unbounded_queue.UnboundedQueue.__aiter__", + "trio._core._unbounded_queue.UnboundedQueue.__anext__", + "trio._core._unbounded_queue.UnboundedQueue.__repr__", + "trio._core._unbounded_queue.UnboundedQueue.empty", + "trio._core._unbounded_queue.UnboundedQueue.get_batch", + "trio._core._unbounded_queue.UnboundedQueue.get_batch_nowait", + "trio._core._unbounded_queue.UnboundedQueue.qsize", + "trio._core._unbounded_queue.UnboundedQueue.statistics", + "trio._dtls.DTLSChannel.__init__", + "trio._dtls.DTLSEndpoint.serve", "trio._highlevel_socket.SocketStream.getsockopt", - "trio._highlevel_socket.SocketStream.receive_some", "trio._highlevel_socket.SocketStream.send_all", - "trio._highlevel_socket.SocketStream.send_eof", "trio._highlevel_socket.SocketStream.setsockopt", - "trio._highlevel_socket.SocketStream.wait_send_all_might_not_block", - "trio._subprocess.Process", + "trio._ssl.SSLListener.__init__", + "trio._ssl.SSLListener.accept", + "trio._ssl.SSLListener.aclose", + "trio._ssl.SSLStream.__dir__", + "trio._ssl.SSLStream.__getattr__", + "trio._ssl.SSLStream.__init__", + "trio._ssl.SSLStream.__setattr__", + "trio._ssl.SSLStream.aclose", + "trio._ssl.SSLStream.do_handshake", + "trio._ssl.SSLStream.receive_some", + "trio._ssl.SSLStream.send_all", + "trio._ssl.SSLStream.transport_stream", + "trio._ssl.SSLStream.unwrap", + "trio._ssl.SSLStream.wait_send_all_might_not_block", "trio._subprocess.Process.__aenter__", "trio._subprocess.Process.__init__", "trio._subprocess.Process.__repr__", @@ -226,61 +99,36 @@ "trio._subprocess.Process.send_signal", "trio._subprocess.Process.terminate", "trio._subprocess.Process.wait", - "trio._sync.AsyncContextManagerMixin.__aenter__", - "trio._sync.AsyncContextManagerMixin.__aexit__", - "trio._sync.CapacityLimiter", - "trio._sync.CapacityLimiter.__init__", - "trio._sync.CapacityLimiter.__repr__", - "trio._sync.CapacityLimiter.acquire", - "trio._sync.CapacityLimiter.acquire_nowait", - "trio._sync.CapacityLimiter.acquire_on_behalf_of", - "trio._sync.CapacityLimiter.acquire_on_behalf_of_nowait", - "trio._sync.CapacityLimiter.available_tokens", - "trio._sync.CapacityLimiter.borrowed_tokens", - "trio._sync.CapacityLimiter.release", - "trio._sync.CapacityLimiter.release_on_behalf_of", - "trio._sync.CapacityLimiter.statistics", - "trio._sync.CapacityLimiter.total_tokens", - "trio._sync.Condition", - "trio._sync.Condition.__init__", - "trio._sync.Condition.acquire", - "trio._sync.Condition.acquire_nowait", - "trio._sync.Condition.locked", - "trio._sync.Condition.notify", - "trio._sync.Condition.notify_all", - "trio._sync.Condition.release", - "trio._sync.Condition.statistics", - "trio._sync.Condition.wait", - "trio._sync.Event", - "trio._sync.Event.is_set", - "trio._sync.Event.set", - "trio._sync.Event.statistics", - "trio._sync.Event.wait", - "trio._sync.Lock", - "trio._sync.Semaphore", - "trio._sync.Semaphore.__init__", - "trio._sync.Semaphore.__repr__", - "trio._sync.Semaphore.acquire", - "trio._sync.Semaphore.acquire_nowait", - "trio._sync.Semaphore.max_value", - "trio._sync.Semaphore.release", - "trio._sync.Semaphore.statistics", - "trio._sync.Semaphore.value", - "trio._sync.StrictFIFOLock", - "trio._sync._LockImpl", - "trio._sync._LockImpl.__repr__", - "trio._sync._LockImpl.acquire", - "trio._sync._LockImpl.acquire_nowait", - "trio._sync._LockImpl.locked", - "trio._sync._LockImpl.release", - "trio._sync._LockImpl.statistics", - "trio._util.ConflictDetector.__enter__", - "trio._util.ConflictDetector.__exit__", - "trio._util.ConflictDetector.__init__", - "trio._util.Final.__new__", - "trio._util.NoPublicConstructor", - "trio._util.NoPublicConstructor.__call__", - "trio.testing._memory_streams.MemoryReceiveStream", + "trio.current_time", + "trio.from_thread.run", + "trio.from_thread.run_sync", + "trio.lowlevel.cancel_shielded_checkpoint", + "trio.lowlevel.current_clock", + "trio.lowlevel.current_root_task", + "trio.lowlevel.current_statistics", + "trio.lowlevel.current_trio_token", + "trio.lowlevel.currently_ki_protected", + "trio.lowlevel.notify_closing", + "trio.lowlevel.open_process", + "trio.lowlevel.permanently_detach_coroutine_object", + "trio.lowlevel.reattach_detached_coroutine_object", + "trio.lowlevel.reschedule", + "trio.lowlevel.spawn_system_task", + "trio.lowlevel.start_guest_run", + "trio.lowlevel.start_thread_soon", + "trio.lowlevel.temporarily_detach_coroutine_object", + "trio.lowlevel.wait_readable", + "trio.lowlevel.wait_writable", + "trio.open_ssl_over_tcp_listeners", + "trio.open_ssl_over_tcp_stream", + "trio.open_tcp_listeners", + "trio.open_tcp_stream", + "trio.open_unix_socket", + "trio.run", + "trio.run_process", + "trio.serve_listeners", + "trio.serve_ssl_over_tcp", + "trio.serve_tcp", "trio.testing._memory_streams.MemoryReceiveStream.__init__", "trio.testing._memory_streams.MemoryReceiveStream.aclose", "trio.testing._memory_streams.MemoryReceiveStream.close", @@ -289,7 +137,6 @@ "trio.testing._memory_streams.MemoryReceiveStream.put_eof", "trio.testing._memory_streams.MemoryReceiveStream.receive_some", "trio.testing._memory_streams.MemoryReceiveStream.receive_some_hook", - "trio.testing._memory_streams.MemorySendStream", "trio.testing._memory_streams.MemorySendStream.__init__", "trio.testing._memory_streams.MemorySendStream.aclose", "trio.testing._memory_streams.MemorySendStream.close", @@ -300,571 +147,21 @@ "trio.testing._memory_streams.MemorySendStream.send_all_hook", "trio.testing._memory_streams.MemorySendStream.wait_send_all_might_not_block", "trio.testing._memory_streams.MemorySendStream.wait_send_all_might_not_block_hook", - "trio.testing._sequencer.Sequencer", - "trio.testing._sequencer.Sequencer.__call__", - "trio.tests.conftest.RUN_SLOW", - "trio.tests.conftest.autojump_clock", - "trio.tests.conftest.mock_clock", - "trio.tests.conftest.pytest_addoption", - "trio.tests.conftest.pytest_configure", - "trio.tests.conftest.pytest_pyfunc_call", - "trio.tests.module_with_deprecations.__deprecated_attributes__", - "trio.tests.module_with_deprecations.this_mod", - "trio.tests.test_abc.test_AsyncResource_defaults", - "trio.tests.test_abc.test_abc_generics", - "trio.tests.test_channel.test_553", - "trio.tests.test_channel.test_channel", - "trio.tests.test_channel.test_channel_fairness", - "trio.tests.test_channel.test_channel_multiple_consumers", - "trio.tests.test_channel.test_channel_multiple_producers", - "trio.tests.test_channel.test_close_basics", - "trio.tests.test_channel.test_close_multiple_receive_handles", - "trio.tests.test_channel.test_close_multiple_send_handles", - "trio.tests.test_channel.test_close_sync", - "trio.tests.test_channel.test_inf_capacity", - "trio.tests.test_channel.test_receive_channel_clone_and_close", - "trio.tests.test_channel.test_statistics", - "trio.tests.test_channel.test_unbuffered", - "trio.tests.test_contextvars.test_contextvars_copy", - "trio.tests.test_contextvars.test_contextvars_default", - "trio.tests.test_contextvars.test_contextvars_set", - "trio.tests.test_contextvars.trio_testing_contextvar", - "trio.tests.test_deprecate.Alias", - "trio.tests.test_deprecate.Alias.new_hotness_method", - "trio.tests.test_deprecate.Alias.old_hotness_method", - "trio.tests.test_deprecate.Foo", - "trio.tests.test_deprecate.Foo.method", - "trio.tests.test_deprecate.deprecated_old", - "trio.tests.test_deprecate.deprecated_with_thing", - "trio.tests.test_deprecate.docstring_test1", - "trio.tests.test_deprecate.docstring_test2", - "trio.tests.test_deprecate.docstring_test3", - "trio.tests.test_deprecate.docstring_test4", - "trio.tests.test_deprecate.new", - "trio.tests.test_deprecate.new_hotness", - "trio.tests.test_deprecate.old", - "trio.tests.test_deprecate.old_hotness", - "trio.tests.test_deprecate.recwarn_always", - "trio.tests.test_deprecate.test_deprecated_alias", - "trio.tests.test_deprecate.test_deprecated_alias_method", - "trio.tests.test_deprecate.test_deprecated_decorator", - "trio.tests.test_deprecate.test_deprecated_decorator_method", - "trio.tests.test_deprecate.test_deprecated_decorator_with_explicit_thing", - "trio.tests.test_deprecate.test_deprecated_docstring_munging", - "trio.tests.test_deprecate.test_module_with_deprecations", - "trio.tests.test_deprecate.test_warn_deprecated", - "trio.tests.test_deprecate.test_warn_deprecated_formatting", - "trio.tests.test_deprecate.test_warn_deprecated_no_instead_or_issue", - "trio.tests.test_deprecate.test_warn_deprecated_stacklevel", - "trio.tests.test_dtls.ca", - "trio.tests.test_dtls.client_ctx", - "trio.tests.test_dtls.dtls_echo_server", - "trio.tests.test_dtls.endpoint", - "trio.tests.test_dtls.parametrize_ipv6", - "trio.tests.test_dtls.server_cert", - "trio.tests.test_dtls.server_ctx", - "trio.tests.test_dtls.test_already_closed_socket_doesnt_crash", - "trio.tests.test_dtls.test_association_replaced_before_handshake_starts", - "trio.tests.test_dtls.test_association_replaced_while_handshake_running", - "trio.tests.test_dtls.test_channel_closing", - "trio.tests.test_dtls.test_client_cancels_handshake_and_starts_new_one", - "trio.tests.test_dtls.test_client_multiplex", - "trio.tests.test_dtls.test_connect_to_non_server", - "trio.tests.test_dtls.test_double_serve", - "trio.tests.test_dtls.test_dtls_over_dgram_only", - "trio.tests.test_dtls.test_explicit_tiny_mtu_is_respected", - "trio.tests.test_dtls.test_full_duplex", - "trio.tests.test_dtls.test_gc_after_trio_exits", - "trio.tests.test_dtls.test_gc_as_packet_received", - "trio.tests.test_dtls.test_gc_before_system_task_starts", - "trio.tests.test_dtls.test_handshake_handles_minimum_network_mtu", - "trio.tests.test_dtls.test_handshake_over_terrible_network", - "trio.tests.test_dtls.test_implicit_handshake", - "trio.tests.test_dtls.test_incoming_buffer_overflow", - "trio.tests.test_dtls.test_initial_retransmit_timeout_configuration", - "trio.tests.test_dtls.test_invalid_cookie_rejected", - "trio.tests.test_dtls.test_openssl_retransmit_doesnt_break_stuff", - "trio.tests.test_dtls.test_send_to_closed_local_port", - "trio.tests.test_dtls.test_serve_exits_cleanly_on_close", - "trio.tests.test_dtls.test_server_socket_doesnt_crash_on_garbage", - "trio.tests.test_dtls.test_smoke", - "trio.tests.test_dtls.test_socket_closed_while_processing_clienthello", - "trio.tests.test_dtls.test_swap_client_server", - "trio.tests.test_dtls.test_system_task_cleaned_up_on_gc", - "trio.tests.test_exports.PUBLIC_MODULES", - "trio.tests.test_exports.PUBLIC_MODULE_NAMES", - "trio.tests.test_exports.public_modules", - "trio.tests.test_exports.test_classes_are_final", - "trio.tests.test_exports.test_core_is_properly_reexported", - "trio.tests.test_exports.test_static_tool_sees_all_symbols", - "trio.tests.test_fakenet.fn", - "trio.tests.test_fakenet.test_basic_tcp", - "trio.tests.test_fakenet.test_basic_udp", - "trio.tests.test_fakenet.test_msg_trunc", - "trio.tests.test_file_io.async_file", - "trio.tests.test_file_io.path", - "trio.tests.test_file_io.test_aclose_cancelled", - "trio.tests.test_file_io.test_async_iter", - "trio.tests.test_file_io.test_async_methods_generated_once", - "trio.tests.test_file_io.test_async_methods_match_wrapper", - "trio.tests.test_file_io.test_async_methods_signature", - "trio.tests.test_file_io.test_async_methods_wrap", - "trio.tests.test_file_io.test_detach_rewraps_asynciobase", - "trio.tests.test_file_io.test_dir_matches_wrapped", - "trio.tests.test_file_io.test_open", - "trio.tests.test_file_io.test_open_context_manager", - "trio.tests.test_file_io.test_sync_attrs_forwarded", - "trio.tests.test_file_io.test_sync_attrs_match_wrapper", - "trio.tests.test_file_io.test_unsupported_not_forwarded", - "trio.tests.test_file_io.test_wrap_invalid", - "trio.tests.test_file_io.test_wrap_non_iobase", - "trio.tests.test_file_io.test_wrapped_property", - "trio.tests.test_file_io.wrapped", - "trio.tests.test_highlevel_generic.RecordReceiveStream", - "trio.tests.test_highlevel_generic.RecordReceiveStream.aclose", - "trio.tests.test_highlevel_generic.RecordReceiveStream.receive_some", - "trio.tests.test_highlevel_generic.RecordReceiveStream.record", - "trio.tests.test_highlevel_generic.RecordSendStream", - "trio.tests.test_highlevel_generic.RecordSendStream.aclose", - "trio.tests.test_highlevel_generic.RecordSendStream.record", - "trio.tests.test_highlevel_generic.RecordSendStream.send_all", - "trio.tests.test_highlevel_generic.RecordSendStream.wait_send_all_might_not_block", - "trio.tests.test_highlevel_generic.test_StapledStream", - "trio.tests.test_highlevel_generic.test_StapledStream_with_erroring_close", - "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver", - "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver.family_addr_pairs", - "trio.tests.test_highlevel_open_tcp_listeners.FakeHostnameResolver.getaddrinfo", - "trio.tests.test_highlevel_open_tcp_listeners.FakeOSError", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.backlog", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.bind", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.close", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.closed", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.family", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.getsockopt", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.listen", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.poison_listen", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.proto", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.setsockopt", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocket.type", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.poison_after", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.raise_on_family", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.socket", - "trio.tests.test_highlevel_open_tcp_listeners.FakeSocketFactory.sockets", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_backlog", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_basic", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_ipv6_v6only", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_multiple_host_cleanup_on_error", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_port_checking", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_rebind", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_socket_fails_not_afnosupport", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_some_address_families_unavailable", - "trio.tests.test_highlevel_open_tcp_listeners.test_open_tcp_listeners_specific_port_specific_host", - "trio.tests.test_highlevel_open_tcp_listeners.test_serve_tcp", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.close", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.closed", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.connect", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.failing", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.family", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.ip", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.port", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.proto", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.scenario", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.setsockopt", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.succeeded", - "trio.tests.test_highlevel_open_tcp_stream.FakeSocket.type", - "trio.tests.test_highlevel_open_tcp_stream.Scenario", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.__init__", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.check", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.connect_times", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.getaddrinfo", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.getnameinfo", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.ip_dict", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.ip_order", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.socket", - "trio.tests.test_highlevel_open_tcp_stream.Scenario.sockets", - "trio.tests.test_highlevel_open_tcp_stream.can_bind_127_0_0_2", - "trio.tests.test_highlevel_open_tcp_stream.run_scenario", - "trio.tests.test_highlevel_open_tcp_stream.test_all_fail", - "trio.tests.test_highlevel_open_tcp_stream.test_basic_fallthrough", - "trio.tests.test_highlevel_open_tcp_stream.test_cancel", - "trio.tests.test_highlevel_open_tcp_stream.test_close_all", - "trio.tests.test_highlevel_open_tcp_stream.test_custom_delay", - "trio.tests.test_highlevel_open_tcp_stream.test_custom_errors_expedite", - "trio.tests.test_highlevel_open_tcp_stream.test_does_reorder", - "trio.tests.test_highlevel_open_tcp_stream.test_early_success", - "trio.tests.test_highlevel_open_tcp_stream.test_format_host_port", - "trio.tests.test_highlevel_open_tcp_stream.test_handles_no_ipv4", - "trio.tests.test_highlevel_open_tcp_stream.test_handles_no_ipv6", - "trio.tests.test_highlevel_open_tcp_stream.test_local_address_real", - "trio.tests.test_highlevel_open_tcp_stream.test_multi_success", - "trio.tests.test_highlevel_open_tcp_stream.test_no_hosts", - "trio.tests.test_highlevel_open_tcp_stream.test_one_host_failed_after_connect", - "trio.tests.test_highlevel_open_tcp_stream.test_one_host_quick_fail", - "trio.tests.test_highlevel_open_tcp_stream.test_one_host_quick_success", - "trio.tests.test_highlevel_open_tcp_stream.test_one_host_slow_fail", - "trio.tests.test_highlevel_open_tcp_stream.test_one_host_slow_success", - "trio.tests.test_highlevel_open_tcp_stream.test_open_tcp_stream_input_validation", - "trio.tests.test_highlevel_open_tcp_stream.test_open_tcp_stream_real_socket_smoketest", - "trio.tests.test_highlevel_open_tcp_stream.test_reorder_for_rfc_6555_section_5_4", - "trio.tests.test_highlevel_open_unix_stream.pytestmark", - "trio.tests.test_highlevel_open_unix_stream.test_close_on_error", - "trio.tests.test_highlevel_open_unix_stream.test_open_bad_socket", - "trio.tests.test_highlevel_open_unix_stream.test_open_unix_socket", - "trio.tests.test_highlevel_open_unix_stream.test_open_with_bad_filename_type", - "trio.tests.test_highlevel_serve_listeners.MemoryListener", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.accept", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.accept_hook", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.accepted_streams", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.aclose", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.closed", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.connect", - "trio.tests.test_highlevel_serve_listeners.MemoryListener.queued_streams", - "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_accept_capacity_error", - "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_accept_unrecognized_error", - "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_basic", - "trio.tests.test_highlevel_serve_listeners.test_serve_listeners_connection_nursery", - "trio.tests.test_highlevel_socket.fill_stream", - "trio.tests.test_highlevel_socket.name", - "trio.tests.test_highlevel_socket.test_SocketListener", - "trio.tests.test_highlevel_socket.test_SocketListener_accept_errors", - "trio.tests.test_highlevel_socket.test_SocketListener_socket_closed_underfoot", - "trio.tests.test_highlevel_socket.test_SocketStream_basics", - "trio.tests.test_highlevel_socket.test_SocketStream_generic", - "trio.tests.test_highlevel_socket.test_SocketStream_send_all", - "trio.tests.test_highlevel_socket.test_socket_stream_works_when_peer_has_already_closed", - "trio.tests.test_highlevel_socket.trio", - "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver", - "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.getaddrinfo", - "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.getnameinfo", - "trio.tests.test_highlevel_ssl_helpers.FakeHostnameResolver.sockaddr", - "trio.tests.test_highlevel_ssl_helpers.echo_handler", - "trio.tests.test_highlevel_ssl_helpers.test_open_ssl_over_tcp_listeners", - "trio.tests.test_highlevel_ssl_helpers.test_open_ssl_over_tcp_stream_and_everything_else", - "trio.tests.test_path.MockWrapped", - "trio.tests.test_path.MockWrapper", - "trio.tests.test_path.cls_pairs", - "trio.tests.test_path.method_pair", - "trio.tests.test_path.path", - "trio.tests.test_path.test_async_method_signature", - "trio.tests.test_path.test_async_methods_rewrap", - "trio.tests.test_path.test_classmethods", - "trio.tests.test_path.test_cmp_magic", - "trio.tests.test_path.test_compare_async_stat_methods", - "trio.tests.test_path.test_div_magic", - "trio.tests.test_path.test_forward_methods_rewrap", - "trio.tests.test_path.test_forward_methods_without_rewrap", - "trio.tests.test_path.test_forward_properties_rewrap", - "trio.tests.test_path.test_forwarded_properties", - "trio.tests.test_path.test_globmethods", - "trio.tests.test_path.test_hash_magic", - "trio.tests.test_path.test_invalid_name_not_wrapped", - "trio.tests.test_path.test_iterdir", - "trio.tests.test_path.test_magic", - "trio.tests.test_path.test_open_file_can_open_path", - "trio.tests.test_path.test_open_is_async_context_manager", - "trio.tests.test_path.test_path_nonpath", - "trio.tests.test_path.test_path_wraps_path", - "trio.tests.test_path.test_repr", - "trio.tests.test_path.test_type_forwards_private", - "trio.tests.test_path.test_type_forwards_unsupported", - "trio.tests.test_path.test_type_wraps_private", - "trio.tests.test_path.test_type_wraps_unsupported", - "trio.tests.test_scheduler_determinism.scheduler_trace", - "trio.tests.test_scheduler_determinism.test_the_trio_scheduler_is_deterministic_if_seeded", - "trio.tests.test_scheduler_determinism.test_the_trio_scheduler_is_not_deterministic", - "trio.tests.test_signals.test_catch_signals_race_condition_on_exit", - "trio.tests.test_signals.test_catch_signals_wrong_thread", - "trio.tests.test_signals.test_open_signal_receiver", - "trio.tests.test_signals.test_open_signal_receiver_conflict", - "trio.tests.test_signals.test_open_signal_receiver_empty_fail", - "trio.tests.test_signals.test_open_signal_receiver_no_starvation", - "trio.tests.test_signals.test_open_signal_receiver_restore_handler_after_duplicate_signal", - "trio.tests.test_signals.test_open_signal_receiver_restore_handler_after_one_bad_signal", - "trio.tests.test_signals.wait_run_sync_soon_idempotent_queue_barrier", - "trio.tests.test_socket.Addresses", - "trio.tests.test_socket.Addresses.arbitrary", - "trio.tests.test_socket.Addresses.bind_all", - "trio.tests.test_socket.Addresses.broadcast", - "trio.tests.test_socket.Addresses.localhost", - "trio.tests.test_socket.MonkeypatchedGAI", - "trio.tests.test_socket.MonkeypatchedGAI.__init__", - "trio.tests.test_socket.MonkeypatchedGAI.getaddrinfo", - "trio.tests.test_socket.MonkeypatchedGAI.record", - "trio.tests.test_socket.MonkeypatchedGAI.set", - "trio.tests.test_socket.gai_without_v4mapped_is_buggy", - "trio.tests.test_socket.monkeygai", - "trio.tests.test_socket.test_SocketType_basics", - "trio.tests.test_socket.test_SocketType_connect_paths", - "trio.tests.test_socket.test_SocketType_dup", - "trio.tests.test_socket.test_SocketType_is_abstract", - "trio.tests.test_socket.test_SocketType_is_readable", - "trio.tests.test_socket.test_SocketType_non_blocking_paths", - "trio.tests.test_socket.test_SocketType_resolve", - "trio.tests.test_socket.test_SocketType_shutdown", - "trio.tests.test_socket.test_SocketType_simple_server", - "trio.tests.test_socket.test_SocketType_unresolved_names", - "trio.tests.test_socket.test__try_sync", - "trio.tests.test_socket.test_custom_hostname_resolver", - "trio.tests.test_socket.test_custom_socket_factory", - "trio.tests.test_socket.test_from_fd", - "trio.tests.test_socket.test_from_stdlib_socket", - "trio.tests.test_socket.test_fromshare", - "trio.tests.test_socket.test_getaddrinfo", - "trio.tests.test_socket.test_getnameinfo", - "trio.tests.test_socket.test_getprotobyname", - "trio.tests.test_socket.test_idna", - "trio.tests.test_socket.test_interrupted_by_close", - "trio.tests.test_socket.test_many_sockets", - "trio.tests.test_socket.test_resolve_address_exception_in_connect_closes_socket", - "trio.tests.test_socket.test_send_recv_variants", - "trio.tests.test_socket.test_sniff_sockopts", - "trio.tests.test_socket.test_socket", - "trio.tests.test_socket.test_socket_has_some_reexports", - "trio.tests.test_socket.test_socket_v6", - "trio.tests.test_socket.test_socketpair_simple", - "trio.tests.test_socket.test_unix_domain_socket", - "trio.tests.test_ssl.PyOpenSSLEchoStream", - "trio.tests.test_ssl.PyOpenSSLEchoStream.__init__", - "trio.tests.test_ssl.PyOpenSSLEchoStream.aclose", - "trio.tests.test_ssl.PyOpenSSLEchoStream.receive_some", - "trio.tests.test_ssl.PyOpenSSLEchoStream.renegotiate", - "trio.tests.test_ssl.PyOpenSSLEchoStream.renegotiate_pending", - "trio.tests.test_ssl.PyOpenSSLEchoStream.send_all", - "trio.tests.test_ssl.PyOpenSSLEchoStream.sleeper", - "trio.tests.test_ssl.PyOpenSSLEchoStream.wait_send_all_might_not_block", - "trio.tests.test_ssl.client_ctx", - "trio.tests.test_ssl.ssl_echo_serve_sync", - "trio.tests.test_ssl.ssl_echo_server", - "trio.tests.test_ssl.ssl_echo_server_raw", - "trio.tests.test_ssl.ssl_lockstep_stream_pair", - "trio.tests.test_ssl.ssl_memory_stream_pair", - "trio.tests.test_ssl.ssl_wrap_pair", - "trio.tests.test_ssl.test_PyOpenSSLEchoStream_gives_resource_busy_errors", - "trio.tests.test_ssl.test_SSLListener", - "trio.tests.test_ssl.test_SSLStream_generic", - "trio.tests.test_ssl.test_attributes", - "trio.tests.test_ssl.test_checkpoints", - "trio.tests.test_ssl.test_closing_nice_case", - "trio.tests.test_ssl.test_full_duplex_basics", - "trio.tests.test_ssl.test_get_channel_binding_after_handshake", - "trio.tests.test_ssl.test_get_channel_binding_before_handshake", - "trio.tests.test_ssl.test_getpeercert", - "trio.tests.test_ssl.test_https_mode_eof_before_handshake", - "trio.tests.test_ssl.test_receive_error_during_handshake", - "trio.tests.test_ssl.test_renegotiation_randomized", - "trio.tests.test_ssl.test_renegotiation_simple", - "trio.tests.test_ssl.test_resource_busy_errors", - "trio.tests.test_ssl.test_selected_alpn_protocol_before_handshake", - "trio.tests.test_ssl.test_selected_alpn_protocol_when_not_set", - "trio.tests.test_ssl.test_selected_npn_protocol_before_handshake", - "trio.tests.test_ssl.test_selected_npn_protocol_when_not_set", - "trio.tests.test_ssl.test_send_all_empty_string", - "trio.tests.test_ssl.test_send_all_fails_in_the_middle", - "trio.tests.test_ssl.test_send_error_during_handshake", - "trio.tests.test_ssl.test_ssl_bad_shutdown", - "trio.tests.test_ssl.test_ssl_bad_shutdown_but_its_ok", - "trio.tests.test_ssl.test_ssl_client_basics", - "trio.tests.test_ssl.test_ssl_handshake_failure_during_aclose", - "trio.tests.test_ssl.test_ssl_https_compatibility_disagreement", - "trio.tests.test_ssl.test_ssl_only_closes_stream_once", - "trio.tests.test_ssl.test_ssl_over_ssl", - "trio.tests.test_ssl.test_ssl_server_basics", - "trio.tests.test_ssl.test_unwrap", - "trio.tests.test_ssl.test_wait_writable_calls_underlying_wait_writable", - "trio.tests.test_subprocess.CAT", - "trio.tests.test_subprocess.COPY_STDIN_TO_STDOUT_AND_BACKWARD_TO_STDERR", - "trio.tests.test_subprocess.EXIT_FALSE", - "trio.tests.test_subprocess.EXIT_TRUE", - "trio.tests.test_subprocess.background_process_param", - "trio.tests.test_subprocess.fail_after", - "trio.tests.test_subprocess.got_signal", - "trio.tests.test_subprocess.move_on_after", - "trio.tests.test_subprocess.open_process_then_kill", - "trio.tests.test_subprocess.posix", - "trio.tests.test_subprocess.python", - "trio.tests.test_subprocess.run_process", - "trio.tests.test_subprocess.run_process_in_nursery", - "trio.tests.test_subprocess.sleep", - "trio.tests.test_subprocess.sleep_forever", - "trio.tests.test_subprocess.test_async_with_basics_deprecated", - "trio.tests.test_subprocess.test_auto_update_returncode", - "trio.tests.test_subprocess.test_basic", - "trio.tests.test_subprocess.test_custom_deliver_cancel", - "trio.tests.test_subprocess.test_errors", - "trio.tests.test_subprocess.test_for_leaking_fds", - "trio.tests.test_subprocess.test_interactive", - "trio.tests.test_subprocess.test_kill_when_context_cancelled", - "trio.tests.test_subprocess.test_multi_wait", - "trio.tests.test_subprocess.test_pipes", - "trio.tests.test_subprocess.test_run", - "trio.tests.test_subprocess.test_run_check", - "trio.tests.test_subprocess.test_run_process_background_fail", - "trio.tests.test_subprocess.test_run_with_broken_pipe", - "trio.tests.test_subprocess.test_signals", - "trio.tests.test_subprocess.test_stderr_stdout", - "trio.tests.test_subprocess.test_subprocess_pidfd_unnotified", - "trio.tests.test_subprocess.test_wait_reapable_fails", - "trio.tests.test_subprocess.test_waitid_eintr", - "trio.tests.test_subprocess.test_warn_on_cancel_SIGKILL_escalation", - "trio.tests.test_subprocess.test_warn_on_failed_cancel_terminate", - "trio.tests.test_sync.ChannelLock1", - "trio.tests.test_sync.ChannelLock1.__init__", - "trio.tests.test_sync.ChannelLock1.acquire", - "trio.tests.test_sync.ChannelLock1.acquire_nowait", - "trio.tests.test_sync.ChannelLock1.r", - "trio.tests.test_sync.ChannelLock1.release", - "trio.tests.test_sync.ChannelLock1.s", - "trio.tests.test_sync.ChannelLock2", - "trio.tests.test_sync.ChannelLock2.acquire", - "trio.tests.test_sync.ChannelLock2.acquire_nowait", - "trio.tests.test_sync.ChannelLock2.r", - "trio.tests.test_sync.ChannelLock2.release", - "trio.tests.test_sync.ChannelLock2.s", - "trio.tests.test_sync.ChannelLock3", - "trio.tests.test_sync.ChannelLock3.acquire", - "trio.tests.test_sync.ChannelLock3.acquire_nowait", - "trio.tests.test_sync.ChannelLock3.acquired", - "trio.tests.test_sync.ChannelLock3.r", - "trio.tests.test_sync.ChannelLock3.release", - "trio.tests.test_sync.ChannelLock3.s", - "trio.tests.test_sync.enable_ki_protection", - "trio.tests.test_sync.generic_lock_test", - "trio.tests.test_sync.lock_factories", - "trio.tests.test_sync.lock_factory_names", - "trio.tests.test_sync.test_CapacityLimiter", - "trio.tests.test_sync.test_CapacityLimiter_change_total_tokens", - "trio.tests.test_sync.test_CapacityLimiter_inf", - "trio.tests.test_sync.test_CapacityLimiter_memleak_548", - "trio.tests.test_sync.test_Condition", - "trio.tests.test_sync.test_Event", - "trio.tests.test_sync.test_Lock_and_StrictFIFOLock", - "trio.tests.test_sync.test_Semaphore", - "trio.tests.test_sync.test_Semaphore_bounded", - "trio.tests.test_sync.test_generic_lock_acquire_nowait_blocks_acquire", - "trio.tests.test_sync.test_generic_lock_exclusion", - "trio.tests.test_sync.test_generic_lock_fifo_fairness", - "trio.tests.test_sync.trio", - "trio.tests.test_testing.assert_checkpoints", - "trio.tests.test_testing.assert_no_checkpoints", - "trio.tests.test_testing.check_half_closeable_stream", - "trio.tests.test_testing.check_one_way_stream", - "trio.tests.test_testing.check_two_way_stream", - "trio.tests.test_testing.fixup_module_metadata", - "trio.tests.test_testing.lockstep_stream_one_way_pair", - "trio.tests.test_testing.lockstep_stream_pair", - "trio.tests.test_testing.memory_stream_one_way_pair", - "trio.tests.test_testing.memory_stream_pair", - "trio.tests.test_testing.memory_stream_pump", - "trio.tests.test_testing.open_stream_to_socket_listener", - "trio.tests.test_testing.sleep", - "trio.tests.test_testing.test_MemoryReceiveStream", - "trio.tests.test_testing.test_MemoryRecvStream_closing", - "trio.tests.test_testing.test_MemorySendStream", - "trio.tests.test_testing.test_Sequencer", - "trio.tests.test_testing.test_Sequencer_cancel", - "trio.tests.test_testing.test__UnboundeByteQueue", - "trio.tests.test_testing.test__assert_raises", - "trio.tests.test_testing.test_assert_checkpoints", - "trio.tests.test_testing.test_assert_no_checkpoints", - "trio.tests.test_testing.test_lockstep_streams_with_generic_tests", - "trio.tests.test_testing.test_memory_stream_one_way_pair", - "trio.tests.test_testing.test_memory_stream_pair", - "trio.tests.test_testing.test_memory_stream_pump", - "trio.tests.test_testing.test_memory_streams_with_generic_tests", - "trio.tests.test_testing.test_open_stream_to_socket_listener", - "trio.tests.test_testing.test_wait_all_tasks_blocked", - "trio.tests.test_testing.test_wait_all_tasks_blocked_with_cushion", - "trio.tests.test_testing.test_wait_all_tasks_blocked_with_timeouts", - "trio.tests.test_testing.trio_test", - "trio.tests.test_testing.wait_all_tasks_blocked", - "trio.tests.test_threads.sleep", - "trio.tests.test_threads.test_await_in_trio_thread_while_main_exits", - "trio.tests.test_threads.test_do_in_trio_thread", - "trio.tests.test_threads.test_do_in_trio_thread_from_trio_thread", - "trio.tests.test_threads.test_from_thread_inside_trio_thread", - "trio.tests.test_threads.test_from_thread_no_token", - "trio.tests.test_threads.test_from_thread_run_during_shutdown", - "trio.tests.test_threads.test_run_fn_as_system_task_catched_badly_typed_token", - "trio.tests.test_threads.test_run_in_trio_thread_ki", - "trio.tests.test_threads.test_run_in_worker_thread", - "trio.tests.test_threads.test_run_in_worker_thread_abandoned", - "trio.tests.test_threads.test_run_in_worker_thread_cancellation", - "trio.tests.test_threads.test_run_in_worker_thread_custom_limiter", - "trio.tests.test_threads.test_run_in_worker_thread_fail_to_spawn", - "trio.tests.test_threads.test_run_in_worker_thread_limiter", - "trio.tests.test_threads.test_run_in_worker_thread_limiter_error", - "trio.tests.test_threads.test_trio_from_thread_run", - "trio.tests.test_threads.test_trio_from_thread_run_contextvars", - "trio.tests.test_threads.test_trio_from_thread_run_sync", - "trio.tests.test_threads.test_trio_from_thread_run_sync_contextvars", - "trio.tests.test_threads.test_trio_from_thread_token", - "trio.tests.test_threads.test_trio_from_thread_token_kwarg", - "trio.tests.test_threads.test_trio_to_thread_run_sync_contextvars", - "trio.tests.test_threads.test_trio_to_thread_run_sync_expected_error", - "trio.tests.test_threads.test_trio_to_thread_run_sync_token", - "trio.tests.test_threads.test_trio_token_weak_referenceable", - "trio.tests.test_threads.test_unsafe_cancellable_kwarg", - "trio.tests.test_threads.trio_test_contextvar", - "trio.tests.test_timeouts.check_takes_about", - "trio.tests.test_timeouts.fail_after", - "trio.tests.test_timeouts.move_on_after", - "trio.tests.test_timeouts.move_on_at", - "trio.tests.test_timeouts.sleep", - "trio.tests.test_timeouts.sleep_forever", - "trio.tests.test_timeouts.sleep_until", - "trio.tests.test_timeouts.test_fail", - "trio.tests.test_timeouts.test_move_on_after", - "trio.tests.test_timeouts.test_sleep", - "trio.tests.test_timeouts.trio", - "trio.tests.test_unix_pipes.make_clogged_pipe", - "trio.tests.test_unix_pipes.make_pipe", - "trio.tests.test_unix_pipes.move_on_after", - "trio.tests.test_unix_pipes.posix", - "trio.tests.test_unix_pipes.pytestmark", - "trio.tests.test_unix_pipes.test_async_with", - "trio.tests.test_unix_pipes.test_bizarro_OSError_from_receive", - "trio.tests.test_unix_pipes.test_close_at_bad_time_for_receive_some", - "trio.tests.test_unix_pipes.test_close_at_bad_time_for_send_all", - "trio.tests.test_unix_pipes.test_del", - "trio.tests.test_unix_pipes.test_misdirected_aclose_regression", - "trio.tests.test_unix_pipes.test_pipe_errors", - "trio.tests.test_unix_pipes.test_pipe_fully", - "trio.tests.test_unix_pipes.test_pipes_combined", - "trio.tests.test_unix_pipes.test_receive_pipe", - "trio.tests.test_unix_pipes.test_send_pipe", - "trio.tests.test_util.test_ConflictDetector", - "trio.tests.test_util.test_coroutine_or_error", - "trio.tests.test_util.test_final_metaclass", - "trio.tests.test_util.test_generic_function", - "trio.tests.test_util.test_is_main_thread", - "trio.tests.test_util.test_module_metadata_is_fixed_up", - "trio.tests.test_util.test_no_public_constructor_metaclass", - "trio.tests.test_util.test_signal_raise", - "trio.tests.test_wait_for_object.on_windows", - "trio.tests.test_wait_for_object.pytestmark", - "trio.tests.test_wait_for_object.test_WaitForMultipleObjects_sync", - "trio.tests.test_wait_for_object.test_WaitForMultipleObjects_sync_slow", - "trio.tests.test_wait_for_object.test_WaitForSingleObject", - "trio.tests.test_wait_for_object.test_WaitForSingleObject_slow", - "trio.tests.test_windows_pipes.PipeReceiveStream", - "trio.tests.test_windows_pipes.PipeSendStream", - "trio.tests.test_windows_pipes.make_pipe", - "trio.tests.test_windows_pipes.move_on_after", - "trio.tests.test_windows_pipes.pipe", - "trio.tests.test_windows_pipes.pytestmark", - "trio.tests.test_windows_pipes.test_async_with", - "trio.tests.test_windows_pipes.test_close_during_write", - "trio.tests.test_windows_pipes.test_pipe_error_on_close", - "trio.tests.test_windows_pipes.test_pipe_fully", - "trio.tests.test_windows_pipes.test_pipe_typecheck", - "trio.tests.test_windows_pipes.test_pipes_combined", - "trio.tests.tools.test_gen_exports.test_create_pass_through_args", - "trio.tests.tools.test_gen_exports.test_get_public_methods", - "trio.tests.tools.test_gen_exports.test_process", - "trio.trio.__deprecated_attributes__" + "trio.testing.assert_checkpoints", + "trio.testing.assert_no_checkpoints", + "trio.testing.check_half_closeable_stream", + "trio.testing.check_one_way_stream", + "trio.testing.check_two_way_stream", + "trio.testing.lockstep_stream_one_way_pair", + "trio.testing.lockstep_stream_pair", + "trio.testing.memory_stream_one_way_pair", + "trio.testing.memory_stream_pair", + "trio.testing.memory_stream_pump", + "trio.testing.open_stream_to_socket_listener", + "trio.testing.trio_test", + "trio.testing.wait_all_tasks_blocked", + "trio.tests.TestsDeprecationWrapper", + "trio.to_thread.current_default_thread_limiter" ] } } From cdec244a52ad72d046faa5a5f8a262941d143ec6 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 04:20:45 -0500 Subject: [PATCH 04/21] Update `veryfy_types.json` --- trio/_tests/verify_types.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 60132e07fd..117d26409c 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -7,11 +7,11 @@ "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.9072, + "completenessScore": 0.9088, "exportedSymbolCounts": { "withAmbiguousType": 1, - "withKnownType": 567, - "withUnknownType": 57 + "withKnownType": 568, + "withUnknownType": 56 }, "ignoreUnknownTypesFromImports": true, "missingClassDocStringCount": 1, From dddeca0429d7c3c82520f96e6be18f1c5634275c Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 04:52:18 -0500 Subject: [PATCH 05/21] Update `verify_types.json` --- trio/_tests/verify_types.json | 1 - 1 file changed, 1 deletion(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 117d26409c..e5171506cf 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -121,7 +121,6 @@ "trio.lowlevel.wait_writable", "trio.open_ssl_over_tcp_listeners", "trio.open_ssl_over_tcp_stream", - "trio.open_tcp_listeners", "trio.open_tcp_stream", "trio.open_unix_socket", "trio.run", From a3f1a0db86a923043f2e83f28a19b1e630a39536 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 05:02:41 -0500 Subject: [PATCH 06/21] Remove unused `Iterable` import --- trio/_highlevel_open_tcp_listeners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index d4ed20a50d..012c416142 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -2,7 +2,7 @@ import errno import sys -from collections.abc import Awaitable, Callable, Iterable +from collections.abc import Awaitable, Callable from typing import Any import trio From a494931029ff68045279dbae39278c548777eb39 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 05:21:31 -0500 Subject: [PATCH 07/21] Change ... to comma --- trio/_highlevel_open_tcp_listeners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 012c416142..136e72df86 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -26,7 +26,7 @@ # backpressure. If a connection gets stuck waiting in the backlog queue, then # from the peer's point of view the connection succeeded but then their # send/recv will stall until we get to it, possibly for a long time. OTOH if -# there isn't room in the backlog queue... then their connect stalls, possibly +# there isn't room in the backlog queue, then their connect stalls, possibly # for a long time, which is pretty much the same thing. # # A large backlog can also use a bit more kernel memory, but this seems fairly From 43d229c2dc5d1f20254c117f73181ac45c9b3bf0 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 13:32:52 -0500 Subject: [PATCH 08/21] `Task` -> `TaskStatus` --- trio/_highlevel_open_tcp_listeners.py | 7 ++++--- trio/lowlevel.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 136e72df86..370691b9f3 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -3,9 +3,9 @@ import errno import sys from collections.abc import Awaitable, Callable -from typing import Any import trio +from trio.lowlevel import TaskStatus from . import socket as tsocket @@ -155,13 +155,13 @@ async def open_tcp_listeners( async def serve_tcp( - handler: Callable[[trio.SocketStream], Awaitable[Any]], + handler: Callable[[trio.SocketStream], Awaitable[object]], port: int, *, host: str | bytes | None = None, backlog: int | None = None, handler_nursery: trio.Nursery | None = None, - task_status: trio.lowlevel.Task = trio.TASK_STATUS_IGNORED, # type: ignore[has-type] # Cannot determine type of "TASK_STATUS_IGNORED" + task_status: TaskStatus = trio.TASK_STATUS_IGNORED, # type: ignore[assignment] # default has type "_TaskStatusIgnored", argument has type "TaskStatus" ) -> None: """Listen for incoming TCP connections, and for each one start a task running ``handler(stream)``. @@ -227,6 +227,7 @@ async def serve_tcp( """ listeners = await trio.open_tcp_listeners(port, host=host, backlog=backlog) + # typecheck: no-untyped-call error: Call to untyped function "serve_listeners" in typed context await trio.serve_listeners( handler, listeners, handler_nursery=handler_nursery, task_status=task_status ) diff --git a/trio/lowlevel.py b/trio/lowlevel.py index 54f4ef3141..0bbb0c25b3 100644 --- a/trio/lowlevel.py +++ b/trio/lowlevel.py @@ -15,6 +15,7 @@ RaiseCancelT as RaiseCancelT, RunVar as RunVar, Task as Task, + TaskStatus as TaskStatus, TrioToken as TrioToken, UnboundedQueue as UnboundedQueue, add_instrument as add_instrument, From cf4a35b2713b7aed245b97fefe9cb532a29330ab Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 18:55:53 -0500 Subject: [PATCH 09/21] Fix double export of `TaskStatus` --- trio/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/trio/__init__.py b/trio/__init__.py index be7de42cde..277baa5339 100644 --- a/trio/__init__.py +++ b/trio/__init__.py @@ -35,7 +35,6 @@ EndOfChannel as EndOfChannel, Nursery as Nursery, RunFinishedError as RunFinishedError, - TaskStatus as TaskStatus, TrioInternalError as TrioInternalError, WouldBlock as WouldBlock, current_effective_deadline as current_effective_deadline, From 069fb8b1d5be73166fa94ccba5420e55329aabfd Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 19:06:12 -0500 Subject: [PATCH 10/21] Update `verify_types.json` --- trio/_tests/verify_types.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 98b68a8277..dad1953ab6 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -7,11 +7,11 @@ "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.9104, + "completenessScore": 0.912, "exportedSymbolCounts": { "withAmbiguousType": 0, - "withKnownType": 569, - "withUnknownType": 56 + "withKnownType": 570, + "withUnknownType": 55 }, "ignoreUnknownTypesFromImports": true, "missingClassDocStringCount": 1, From e90e4cc77090d95157a9ccecf435a376d5baf5a6 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sun, 30 Jul 2023 20:46:23 -0500 Subject: [PATCH 11/21] Accept `math.inf` --- trio/_highlevel_open_tcp_listeners.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 370691b9f3..8e4bd66c25 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -3,6 +3,7 @@ import errno import sys from collections.abc import Awaitable, Callable +from math import inf import trio from trio.lowlevel import TaskStatus @@ -40,17 +41,23 @@ # so this is unnecessary -- we can just pass in "infinity" and get the maximum # that way. (Verified on Windows, Linux, macOS using # notes-to-self/measure-listen-backlog.py) -def _compute_backlog(backlog: int | None) -> int: +def _compute_backlog(backlog: int | float | None) -> int: # Many systems (Linux, BSDs, ...) store the backlog in a uint16 and are # missing overflow protection, so we apply our own overflow protection. # https://github.com/golang/go/issues/5030 + if isinstance(backlog, float): + # TODO: Remove when removing infinity support + # https://github.com/python-trio/trio/pull/2724#discussion_r1278541729 + if backlog != inf: + raise ValueError(f"Only accepts infinity, not {backlog!r}") + backlog = None if backlog is None: return 0xFFFF return min(backlog, 0xFFFF) async def open_tcp_listeners( - port: int, *, host: str | bytes | None = None, backlog: int | None = None + port: int, *, host: str | bytes | None = None, backlog: int | float | None = None ) -> list[trio.SocketListener]: """Create :class:`SocketListener` objects to listen for TCP connections. @@ -83,13 +90,16 @@ async def open_tcp_listeners( all interfaces, pass the family-specific wildcard address: ``"0.0.0.0"`` for IPv4-only and ``"::"`` for IPv6-only. - backlog (int or None): The listen backlog to use. If you leave this as - ``None`` then Trio will pick a good default. (Currently: whatever + backlog (int, math.inf, or None): The listen backlog to use. If you leave this as + ``None`` or ``math.inf`` then Trio will pick a good default. (Currently: whatever your system has configured as the maximum backlog.) Returns: list of :class:`SocketListener` + Raises: + :class:`TypeError` if invalid arguments. + """ # getaddrinfo sometimes allows port=None, sometimes not (depending on # whether host=None). And on some systems it treats "" as 0, others it @@ -98,7 +108,7 @@ async def open_tcp_listeners( if not isinstance(port, int): raise TypeError(f"port must be an int not {port!r}") - backlog = _compute_backlog(backlog) + computed_backlog = _compute_backlog(backlog) addresses = await tsocket.getaddrinfo( host, port, type=tsocket.SOCK_STREAM, flags=tsocket.AI_PASSIVE @@ -131,7 +141,7 @@ async def open_tcp_listeners( sock.setsockopt(tsocket.IPPROTO_IPV6, tsocket.IPV6_V6ONLY, 1) await sock.bind(sockaddr) - sock.listen(backlog) + sock.listen(computed_backlog) listeners.append(trio.SocketListener(sock)) except: @@ -159,7 +169,7 @@ async def serve_tcp( port: int, *, host: str | bytes | None = None, - backlog: int | None = None, + backlog: int | float | None = None, handler_nursery: trio.Nursery | None = None, task_status: TaskStatus = trio.TASK_STATUS_IGNORED, # type: ignore[assignment] # default has type "_TaskStatusIgnored", argument has type "TaskStatus" ) -> None: From 4050ca626e54aa168b306dd0c45f1ace3d4cbc3f Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:26:14 -0500 Subject: [PATCH 12/21] Update `verify_types.json` --- trio/_tests/verify_types.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 475dc73e09..73af64746e 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -7,11 +7,11 @@ "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.9137380191693291, + "completenessScore": 0.9153354632587859, "exportedSymbolCounts": { "withAmbiguousType": 0, - "withKnownType": 572, - "withUnknownType": 55 + "withKnownType": 573, + "withUnknownType": 53 }, "ignoreUnknownTypesFromImports": true, "missingClassDocStringCount": 1, From b305a4a0100e1bbde36b42a92378177ac10bad70 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:17:27 -0500 Subject: [PATCH 13/21] Update `test_highlevel_open_tcp_listeners.py` --- trio/_tests/test_highlevel_open_tcp_listeners.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trio/_tests/test_highlevel_open_tcp_listeners.py b/trio/_tests/test_highlevel_open_tcp_listeners.py index e58cbd13cc..00eb2d4875 100644 --- a/trio/_tests/test_highlevel_open_tcp_listeners.py +++ b/trio/_tests/test_highlevel_open_tcp_listeners.py @@ -1,4 +1,5 @@ import errno +from math import inf import socket as stdlib_socket import sys @@ -289,6 +290,7 @@ async def test_open_tcp_listeners_backlog(): tsocket.set_custom_socket_factory(fsf) for given, expected in [ (None, 0xFFFF), + (inf, 0xFFFF), (99999999, 0xFFFF), (10, 10), (1, 1), @@ -297,3 +299,11 @@ async def test_open_tcp_listeners_backlog(): assert listeners for listener in listeners: assert listener.socket.backlog == expected + + +async def test_open_tcp_listeners_backlog_float_error(): + fsf = FakeSocketFactory(99) + tsocket.set_custom_socket_factory(fsf) + for should_fail in (0.0, 2.18, 3.14, 9.75): + with pytest.raises(ValueError, match=f"Only accepts infinity, not {should_fail!r}") as exc_info: + await open_tcp_listeners(0, backlog=should_fail) From ce614c495fd16a9d621090c41a91586b12715b63 Mon Sep 17 00:00:00 2001 From: CoolCat467 Date: Tue, 1 Aug 2023 10:22:14 -0500 Subject: [PATCH 14/21] Fix formatting --- trio/_tests/test_highlevel_open_tcp_listeners.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trio/_tests/test_highlevel_open_tcp_listeners.py b/trio/_tests/test_highlevel_open_tcp_listeners.py index 00eb2d4875..5d54f09113 100644 --- a/trio/_tests/test_highlevel_open_tcp_listeners.py +++ b/trio/_tests/test_highlevel_open_tcp_listeners.py @@ -1,7 +1,7 @@ import errno -from math import inf import socket as stdlib_socket import sys +from math import inf import attr import pytest @@ -305,5 +305,7 @@ async def test_open_tcp_listeners_backlog_float_error(): fsf = FakeSocketFactory(99) tsocket.set_custom_socket_factory(fsf) for should_fail in (0.0, 2.18, 3.14, 9.75): - with pytest.raises(ValueError, match=f"Only accepts infinity, not {should_fail!r}") as exc_info: + with pytest.raises( + ValueError, match=f"Only accepts infinity, not {should_fail!r}" + ) as exc_info: await open_tcp_listeners(0, backlog=should_fail) From fbd82450445cd952e2e51c18b0be783db2ae5b91 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:39:26 -0500 Subject: [PATCH 15/21] Update `verify_types.json` --- trio/_tests/verify_types.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/trio/_tests/verify_types.json b/trio/_tests/verify_types.json index 83f1127dc8..9c71ddd58a 100644 --- a/trio/_tests/verify_types.json +++ b/trio/_tests/verify_types.json @@ -7,11 +7,11 @@ "warningCount": 0 }, "typeCompleteness": { - "completenessScore": 0.9154704944178629, + "completenessScore": 0.9170653907496013, "exportedSymbolCounts": { "withAmbiguousType": 0, - "withKnownType": 574, - "withUnknownType": 53 + "withKnownType": 575, + "withUnknownType": 52 }, "ignoreUnknownTypesFromImports": true, "missingClassDocStringCount": 1, @@ -108,8 +108,6 @@ "trio.lowlevel.wait_writable", "trio.open_ssl_over_tcp_listeners", "trio.open_ssl_over_tcp_stream", - "trio.open_tcp_stream", - "trio.open_tcp_listeners", "trio.open_unix_socket", "trio.run", "trio.run_process", From 79b478d41b991361dbc216518b51764994638efb Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:12:44 -0500 Subject: [PATCH 16/21] Update `test_highlevel_open_tcp_listeners.py` --- trio/_tests/test_highlevel_open_tcp_listeners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_tests/test_highlevel_open_tcp_listeners.py b/trio/_tests/test_highlevel_open_tcp_listeners.py index 5d54f09113..6eca844f0c 100644 --- a/trio/_tests/test_highlevel_open_tcp_listeners.py +++ b/trio/_tests/test_highlevel_open_tcp_listeners.py @@ -307,5 +307,5 @@ async def test_open_tcp_listeners_backlog_float_error(): for should_fail in (0.0, 2.18, 3.14, 9.75): with pytest.raises( ValueError, match=f"Only accepts infinity, not {should_fail!r}" - ) as exc_info: + ): await open_tcp_listeners(0, backlog=should_fail) From d71cedc6b031bae212b4120fb6169aa81128c96e Mon Sep 17 00:00:00 2001 From: CoolCat467 Date: Tue, 1 Aug 2023 13:36:44 -0500 Subject: [PATCH 17/21] Attempt to fix readthedocs error --- docs/source/reference-core.rst | 3 --- docs/source/reference-lowlevel.rst | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/source/reference-core.rst b/docs/source/reference-core.rst index 980a3106e5..30994e4386 100644 --- a/docs/source/reference-core.rst +++ b/docs/source/reference-core.rst @@ -922,9 +922,6 @@ The nursery API See :meth:`~Nursery.start`. -.. autoclass:: TaskStatus - :members: - .. _task-local-storage: Task-local storage diff --git a/docs/source/reference-lowlevel.rst b/docs/source/reference-lowlevel.rst index bacebff5ad..faf07268cb 100644 --- a/docs/source/reference-lowlevel.rst +++ b/docs/source/reference-lowlevel.rst @@ -534,6 +534,8 @@ Task API putting a task to sleep and then waking it up again. (See :func:`wait_task_rescheduled` for details.) +.. autoclass:: TaskStatus + :members: .. _guest-mode: From e61b5822bdd031d6912069491b83e766dc7e721e Mon Sep 17 00:00:00 2001 From: CoolCat467 Date: Tue, 1 Aug 2023 13:42:18 -0500 Subject: [PATCH 18/21] Change type imports --- trio/_dtls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trio/_dtls.py b/trio/_dtls.py index 8675cb75b6..b3ed0fd883 100644 --- a/trio/_dtls.py +++ b/trio/_dtls.py @@ -42,8 +42,8 @@ from OpenSSL.SSL import Context from typing_extensions import Self, TypeAlias - from ._core._run import TaskStatus - from ._socket import Address, _SocketType + from trio.lowlevel import TaskStatus + from trio.socket import Address, _SocketType MAX_UDP_PACKET_SIZE = 65527 From 17ec512b8e2d35919abf29e50547df5eb963fb6f Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Tue, 1 Aug 2023 23:40:34 -0500 Subject: [PATCH 19/21] Only import `TaskStatus` if type checking --- trio/_highlevel_open_tcp_listeners.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 8e4bd66c25..05c6615e76 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -4,12 +4,15 @@ import sys from collections.abc import Awaitable, Callable from math import inf +from typing import TYPE_CHECKING import trio -from trio.lowlevel import TaskStatus from . import socket as tsocket +if TYPE_CHECKING: + from trio.lowlevel import TaskStatus + if sys.version_info < (3, 11): from exceptiongroup import ExceptionGroup @@ -237,7 +240,6 @@ async def serve_tcp( """ listeners = await trio.open_tcp_listeners(port, host=host, backlog=backlog) - # typecheck: no-untyped-call error: Call to untyped function "serve_listeners" in typed context await trio.serve_listeners( handler, listeners, handler_nursery=handler_nursery, task_status=task_status ) From 4a9b024dc7da03d81e6b03162129479fa400287f Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:35:29 -0500 Subject: [PATCH 20/21] Revert "Only import `TaskStatus` if type checking" This reverts commit 17ec512b8e2d35919abf29e50547df5eb963fb6f. --- trio/_highlevel_open_tcp_listeners.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 05c6615e76..8e4bd66c25 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -4,15 +4,12 @@ import sys from collections.abc import Awaitable, Callable from math import inf -from typing import TYPE_CHECKING import trio +from trio.lowlevel import TaskStatus from . import socket as tsocket -if TYPE_CHECKING: - from trio.lowlevel import TaskStatus - if sys.version_info < (3, 11): from exceptiongroup import ExceptionGroup @@ -240,6 +237,7 @@ async def serve_tcp( """ listeners = await trio.open_tcp_listeners(port, host=host, backlog=backlog) + # typecheck: no-untyped-call error: Call to untyped function "serve_listeners" in typed context await trio.serve_listeners( handler, listeners, handler_nursery=handler_nursery, task_status=task_status ) From 6ff13c4b4592dc2dcfcc3814b73ab3fe985bd1e6 Mon Sep 17 00:00:00 2001 From: CoolCat467 Date: Thu, 3 Aug 2023 09:58:50 -0500 Subject: [PATCH 21/21] Remove mypy extension warning comment --- trio/_highlevel_open_tcp_listeners.py | 1 - 1 file changed, 1 deletion(-) diff --git a/trio/_highlevel_open_tcp_listeners.py b/trio/_highlevel_open_tcp_listeners.py index 8e4bd66c25..0d5f630495 100644 --- a/trio/_highlevel_open_tcp_listeners.py +++ b/trio/_highlevel_open_tcp_listeners.py @@ -237,7 +237,6 @@ async def serve_tcp( """ listeners = await trio.open_tcp_listeners(port, host=host, backlog=backlog) - # typecheck: no-untyped-call error: Call to untyped function "serve_listeners" in typed context await trio.serve_listeners( handler, listeners, handler_nursery=handler_nursery, task_status=task_status )