diff --git a/src/trio/_core/_parking_lot.py b/src/trio/_core/_parking_lot.py index ddf6276117..8e2d53ab86 100644 --- a/src/trio/_core/_parking_lot.py +++ b/src/trio/_core/_parking_lot.py @@ -146,6 +146,11 @@ class ParkingLot: the number of parked tasks, and ``if parking_lot: ...`` to check whether there are any parked tasks. + Attributes: + broken_by: + The tasks that have broken this lot, in the order in which they + did so. Empty as long as the lot is usable; see :meth:`break_lot`. + """ # {task: None}, we just want a deque where we can quickly delete random diff --git a/src/trio/_subprocess.py b/src/trio/_subprocess.py index d73ba3dc23..6d2aeaf7a2 100644 --- a/src/trio/_subprocess.py +++ b/src/trio/_subprocess.py @@ -98,7 +98,14 @@ def pidfd_open(fd: int, flags: int) -> int: class HasFileno(Protocol): """Represents any file-like object that has a file descriptor.""" - def fileno(self) -> int: ... + def fileno(self) -> int: + """Return the file descriptor of the underlying file. + + This is the same method as :meth:`io.IOBase.fileno`, and is what + Trio uses to pass the descriptor to the subprocess APIs. + + """ + ... @final diff --git a/src/trio/_tests/_check_type_completeness.json b/src/trio/_tests/_check_type_completeness.json index d8a2948cd9..a44f90dfe0 100644 --- a/src/trio/_tests/_check_type_completeness.json +++ b/src/trio/_tests/_check_type_completeness.json @@ -12,7 +12,6 @@ "all": [ "No docstring found for class \"trio._core._run.Task\"", "No docstring found for class \"trio._socket.SocketType\"", - "No docstring found for function \"trio._subprocess.HasFileno.fileno\"", "No docstring found for class \"trio._sync.AsyncContextManagerMixin\"", "No docstring found for function \"trio._sync._HasAcquireRelease.acquire\"", "No docstring found for function \"trio._sync._HasAcquireRelease.release\"",