Skip to content

Commit

Permalink
Remove all module-level aliases deprecated in 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Dec 25, 2017
1 parent 158e8dd commit be851a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 77 deletions.
60 changes: 0 additions & 60 deletions trio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,66 +63,6 @@
from . import ssl
# Not imported by default: testing

# Stuff that got moved:
_deprecate.enable_attribute_deprecations(__name__)

__deprecated_attributes__ = {
"Task":
_deprecate.DeprecatedAttribute(hazmat.Task, "0.2.0", issue=136),
"current_task":
_deprecate.DeprecatedAttribute(
hazmat.current_task, "0.2.0", issue=136
),
"Result":
_deprecate.DeprecatedAttribute(hazmat.Result, "0.2.0", issue=136),
"Value":
_deprecate.DeprecatedAttribute(hazmat.Value, "0.2.0", issue=136),
"Error":
_deprecate.DeprecatedAttribute(hazmat.Error, "0.2.0", issue=136),
"UnboundedQueue":
_deprecate.DeprecatedAttribute(
hazmat.UnboundedQueue, "0.2.0", issue=136
),
"run_in_worker_thread":
_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
),
# STATUS_IGNORED never made it into a release, but I think people were
# using while it was in the dev version, so we might as well provide an
# alias for a little while.
"STATUS_IGNORED":
_deprecate.DeprecatedAttribute(
TASK_STATUS_IGNORED, "0.2.0", issue=353
),
}

_deprecate.enable_attribute_deprecations(hazmat.__name__)

hazmat.__deprecated_attributes__ = {
"yield_briefly":
_deprecate.DeprecatedAttribute(hazmat.checkpoint, "0.2.0", issue=157),
"yield_briefly_no_cancel":
_deprecate.DeprecatedAttribute(
hazmat.cancel_shielded_checkpoint, "0.2.0", issue=157
),
"yield_if_cancelled":
_deprecate.DeprecatedAttribute(
hazmat.checkpoint_if_cancelled, "0.2.0", issue=157
),
"yield_indefinitely":
_deprecate.DeprecatedAttribute(
hazmat.wait_task_rescheduled, "0.2.0", issue=157
),
}

# Having the public path in .__module__ attributes is important for:
# - exception names in printed tracebacks
# - sphinx :show-inheritance:
Expand Down
17 changes: 0 additions & 17 deletions trio/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,6 @@

################################################################

from .. import _deprecate

_deprecate.enable_attribute_deprecations(__name__)

__deprecated_attributes__ = {
"assert_yields":
_deprecate.DeprecatedAttribute(assert_checkpoints, "0.2.0", issue=157),
"assert_no_yields":
_deprecate.DeprecatedAttribute(
assert_no_checkpoints, "0.2.0", issue=157
),
}

del _deprecate

################################################################

from .._util import fixup_module_metadata
fixup_module_metadata(__name__, globals())
del fixup_module_metadata

0 comments on commit be851a5

Please sign in to comment.