Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated class attributes #938

Merged
merged 1 commit into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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