Skip to content

Commit

Permalink
Remove deprecated attributes from "region" classes.
Browse files Browse the repository at this point in the history
Closes #886
  • Loading branch information
molpopgen committed May 26, 2022
1 parent e5c7d88 commit bf96ad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 58 deletions.
4 changes: 4 additions & 0 deletions doc/misc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Breaking changes
has changed from `False` to `True`.
This change will generally result in faster simulations, but will
break work flows that relied on accessing the trees during simulation.
* Removed deprecated attributes from distribution of effect size types.
These attributes have been undocumented for so long that no one's code
should break.
PR {pr}`938`. Issue {issue}`886`.

Behavior changes

Expand Down
58 changes: 0 additions & 58 deletions fwdpy11/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,57 +30,6 @@
attr_class_to_from_dict_no_recurse)


def _add_deprecated_properties(self):
"""
We've been using some non-Pythonic property names for a while.
This decorator adds them back
"""

def b(self):
warnings.warn(
"b is deprecated in favor of beg and is scheduled for removal in 0.11.",
FutureWarning,
)
return self.beg

def e(self):
warnings.warn(
"e is deprecated in favor of end and is scheduled for removal in 0.11.",
FutureWarning,
)
return self.end

def w(self):
warnings.warn(
"w is deprecated in favor of weight and is scheduled for removal in 0.11.",
FutureWarning,
)
return self.weight

def c(self):
warnings.warn(
"c is deprecated in favor of coupled and is scheduled for removal in 0.11.",
FutureWarning,
)
return self.coupled

def l(self):
warnings.warn(
"l is deprecated in favor of label and is scheduled for removal in 0.11.",
FutureWarning,
)
return self.label

self.b = property(b)
self.e = property(e)
self.w = property(w)
self.c = property(c)
self.l = property(l)

return self


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
Expand Down Expand Up @@ -131,7 +80,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -192,7 +140,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -255,7 +202,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -320,7 +266,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -381,7 +326,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -492,7 +436,6 @@ def mv(
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down Expand Up @@ -557,7 +500,6 @@ def __attrs_post_init__(self):
)


@_add_deprecated_properties
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
Expand Down

0 comments on commit bf96ad6

Please sign in to comment.