Skip to content

Commit

Permalink
Export Nursery as trio.Nursery
Browse files Browse the repository at this point in the history
  • Loading branch information
bengartner committed Jun 14, 2019
1 parent c149ea4 commit 15c19fd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ Highlights
:ref:`async-file-io` (`gh-20
<https://github.com/python-trio/trio/pull/20>`__)

* The new nursery :meth:`~The nursery interface.start` method makes it
* The new nursery :meth:`~Nursery.start` method makes it
easy to perform controlled start-up of long-running tasks. For
example, given an appropriate ``http_server_on_random_open_port``
function, you could write::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ Nursery objects provide the following interface:

.. attribute:: TASK_STATUS_IGNORED

See :meth:`~The nursery interface.start`.
See :meth:`~Nursery.start`.


Working with :exc:`MultiError`\s
Expand Down
3 changes: 2 additions & 1 deletion trio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
TrioInternalError, RunFinishedError, WouldBlock, Cancelled,
BusyResourceError, ClosedResourceError, MultiError, run, open_nursery,
CancelScope, open_cancel_scope, current_effective_deadline,
TASK_STATUS_IGNORED, current_time, BrokenResourceError, EndOfChannel
TASK_STATUS_IGNORED, current_time, BrokenResourceError, EndOfChannel,
Nursery
)

from ._timeouts import (
Expand Down
2 changes: 1 addition & 1 deletion trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
__all__ = [
"Task", "run", "open_nursery", "open_cancel_scope", "CancelScope",
"checkpoint", "current_task", "current_effective_deadline",
"checkpoint_if_cancelled", "TASK_STATUS_IGNORED"
"checkpoint_if_cancelled", "TASK_STATUS_IGNORED", "Nursery"
]

GLOBAL_RUN_CONTEXT = threading.local()
Expand Down

0 comments on commit 15c19fd

Please sign in to comment.