Skip to content
Merged
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
17 changes: 16 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
astor==0.8.1
# via -r test-requirements.in
astroid==2.14.1
astroid==2.14.2
# via pylint
async-generator==1.10
# via -r test-requirements.in
Expand Down Expand Up @@ -39,6 +39,10 @@ decorator==5.1.1
# via ipython
dill==0.3.6
# via pylint
exceptiongroup==1.1.0 ; python_version < "3.11"
# via
# -r test-requirements.in
# pytest
flake8==4.0.1
# via -r test-requirements.in
idna==3.4
Expand Down Expand Up @@ -121,6 +125,14 @@ sniffio==1.3.0
# via -r test-requirements.in
sortedcontainers==2.4.0
# via -r test-requirements.in
tomli==2.0.1
# via
# black
# build
# coverage
# mypy
# pylint
# pytest
tomlkit==0.11.6
# via pylint
traitlets==5.9.0
Expand All @@ -134,7 +146,10 @@ types-pyopenssl==23.0.0.2 ; implementation_name == "cpython"
typing-extensions==4.4.0 ; implementation_name == "cpython"
# via
# -r test-requirements.in
# astroid
# black
# mypy
# pylint
wcwidth==0.2.6
# via prompt-toolkit
wheel==0.38.4
Expand Down
1 change: 1 addition & 0 deletions trio/_core/_instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

F = TypeVar("F", bound=Callable[..., Any])


# Decorator to mark methods public. This does nothing by itself, but
# trio/_tools/gen_exports.py looks for it.
def _public(fn: F) -> F:
Expand Down
1 change: 1 addition & 0 deletions trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

FnT = TypeVar("FnT", bound="Callable[..., Any]")


# Decorator to mark methods public. This does nothing by itself, but
# trio/_tools/gen_exports.py looks for it.
def _public(fn: FnT) -> FnT:
Expand Down
2 changes: 2 additions & 0 deletions trio/_core/_traps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from typing import Callable, NoReturn, Any


# Helper for the bottommost 'yield'. You can't use 'yield' inside an async
# function, but you can inside a generator, and if you decorate your generator
# with @types.coroutine, then it's even awaitable. However, it's still not a
Expand Down Expand Up @@ -67,6 +68,7 @@ class WaitTaskRescheduled:

RaiseCancelT = Callable[[], NoReturn] # TypeAlias


# Should always return the type a Task "expects", unless you willfully reschedule it
# with a bad value.
async def wait_task_rescheduled(abort_func: Callable[[RaiseCancelT], Abort]) -> Any:
Expand Down
2 changes: 2 additions & 0 deletions trio/_core/tests/test_guest_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .tutil import gc_collect_harder, buggy_pypy_asyncgens, restore_unraisablehook
from ..._util import signal_raise


# The simplest possible "host" loop.
# Nice features:
# - we can run code "outside" of trio using the schedule function passed to
Expand Down Expand Up @@ -227,6 +228,7 @@ async def sit_in_wait_all_tasks_blocked(watb_cscope):
async def get_woken_by_host_deadline(watb_cscope):
with trio.CancelScope() as cscope:
print("scheduling stuff to happen")

# Altering the deadline from the host, to something in the
# future, will cause the run loop to wake up, but then
# discover that there is nothing to do and go back to sleep.
Expand Down
1 change: 1 addition & 0 deletions trio/_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ async def wrapper(self, *args, **kwargs):
# addresses everywhere. Split out into a standalone function so it can be reused by
# FakeNet.


# Take an address in Python's representation, and returns a new address in
# the same representation, but with names resolved to numbers,
# etc.
Expand Down