Skip to content

Commit

Permalink
Merge pull request #583 from molpopgen/change_to_future_warning
Browse files Browse the repository at this point in the history
Change DeprecationWarning to FutureWarning.
  • Loading branch information
molpopgen committed Oct 26, 2020
2 parents 17059a4 + dcf2168 commit 4077391
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fwdpy11/_evolve_genomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def evolve_genomes(rng, pop, params, recorder=None):

# warnings.simplefilter("default")
warnings.warn(
"Simulation without tree sequences is deprecated", DeprecationWarning,
"Simulation without tree sequences is deprecated and will be removed in 0.11 or soon thereafter.", FutureWarning,
)

from ._fwdpy11 import MutationRegions
Expand Down
28 changes: 21 additions & 7 deletions fwdpy11/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
import warnings

import attr
import numpy as np

import fwdpy11._fwdpy11
import numpy as np

from .class_decorators import (attr_add_asblack, attr_class_pickle_with_super,
attr_class_to_from_dict,
Expand All @@ -37,23 +36,38 @@ def _add_deprecated_properties(self):
"""

def b(self):
warnings.warn("b is deprecated in favor of beg", DeprecationWarning)
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", DeprecationWarning)
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", DeprecationWarning)
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", DeprecationWarning)
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", DeprecationWarning)
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)
Expand Down

0 comments on commit 4077391

Please sign in to comment.