Skip to content

Commit

Permalink
Merge pull request #812 from oremanj/remove_deprecated_in_v0.5.0
Browse files Browse the repository at this point in the history
Remove APIs deprecated in 0.5.0
  • Loading branch information
njsmith authored Dec 19, 2018
2 parents a8e0d61 + 572b202 commit 3877632
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 177 deletions.
1 change: 1 addition & 0 deletions newsfragments/812.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the APIs deprecated in 0.5.0. (``ClosedStreamError``, ``ClosedListenerError``, ``Result``)
38 changes: 0 additions & 38 deletions trio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,6 @@

_deprecate.enable_attribute_deprecations(__name__)
__deprecated_attributes__ = {
"ClosedStreamError":
_deprecate.DeprecatedAttribute(
ClosedResourceError,
"0.5.0",
issue=36,
instead=ClosedResourceError
),
"ClosedListenerError":
_deprecate.DeprecatedAttribute(
ClosedResourceError,
"0.5.0",
issue=36,
instead=ClosedResourceError
),
"BrokenStreamError":
_deprecate.DeprecatedAttribute(
BrokenResourceError,
Expand All @@ -100,30 +86,6 @@
),
}

_deprecate.enable_attribute_deprecations(hazmat.__name__)

# Temporary hack to make sure _result is loaded, just during the deprecation
# period
from ._core import _result

hazmat.__deprecated_attributes__ = {
"Result":
_deprecate.DeprecatedAttribute(
_core._result.Result,
"0.5.0",
issue=494,
instead="outcome.Outcome"
),
"Value":
_deprecate.DeprecatedAttribute(
_core._result.Value, "0.5.0", issue=494, instead="outcome.Value"
),
"Error":
_deprecate.DeprecatedAttribute(
_core._result.Error, "0.5.0", issue=494, instead="outcome.Error"
)
}

# Having the public path in .__module__ attributes is important for:
# - exception names in printed tracebacks
# - sphinx :show-inheritance:
Expand Down
31 changes: 0 additions & 31 deletions trio/_core/_result.py

This file was deleted.

108 changes: 0 additions & 108 deletions trio/_core/tests/test_result.py

This file was deleted.

0 comments on commit 3877632

Please sign in to comment.