Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/trio/_core/_parking_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/trio/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/trio/_tests/_check_type_completeness.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
Loading