Skip to content

Commit

Permalink
Move introspection APIs into trio.hazmat
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Sep 15, 2017
1 parent 6107b25 commit 4fdde3a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions trio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
_deprecate.DeprecatedAttribute(
run_sync_in_worker_thread, "0.2.0", issue=68
),
"current_clock":
_deprecate.DeprecatedAttribute(
hazmat.current_clock, "0.2.0", issue=317
),
"current_statistics":
_deprecate.DeprecatedAttribute(
hazmat.current_statistics, "0.2.0", issue=317
),
}

_deprecate.enable_attribute_deprecations(hazmat.__name__)
Expand Down
4 changes: 2 additions & 2 deletions trio/_toplevel_core_reexports.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"TrioInternalError", "RunFinishedError", "WouldBlock", "Cancelled",
"ResourceBusyError", "MultiError", "format_exception", "run",
"open_nursery", "open_cancel_scope", "current_effective_deadline",
"STATUS_IGNORED", "current_time", "current_instruments", "current_clock",
"remove_instrument", "add_instrument", "current_statistics", "TaskLocal"
"STATUS_IGNORED", "current_time", "current_instruments",
"TaskLocal"
]

from . import _core
Expand Down
4 changes: 4 additions & 0 deletions trio/hazmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"spawn_system_task",
"reschedule",
"current_call_soon_thread_and_signal_safe",
"remove_instrument",
"add_instrument",
"current_clock",
"current_statistics",
"wait_writable",
"wait_readable",
"ParkingLot",
Expand Down

0 comments on commit 4fdde3a

Please sign in to comment.