diff --git a/verde/datasets/sample_data.py b/verde/datasets/sample_data.py index 67ac00d7f..7b6b47832 100644 --- a/verde/datasets/sample_data.py +++ b/verde/datasets/sample_data.py @@ -17,9 +17,6 @@ from ..version import full_version -# Otherwise, DeprecationWarning won't be shown, kind of defeating the purpose. -warnings.simplefilter("default") - REGISTRY = pooch.create( path=pooch.os_cache("verde"), base_url="https://github.com/fatiando/verde/raw/{version}/data/", @@ -183,7 +180,7 @@ def fetch_rio_magnetic(): warnings.warn( "The Rio magnetic anomaly dataset is deprecated and will be removed " "in Verde v2.0.0. Use a different dataset instead.", - DeprecationWarning, + FutureWarning, ) data_file = REGISTRY.fetch("rio-magnetic.csv.xz") data = pd.read_csv(data_file, compression="xz") @@ -216,7 +213,7 @@ def setup_rio_magnetic_map(ax, region=(-42.6, -42, -22.5, -22)): warnings.warn( "The Rio magnetic anomaly dataset is deprecated and will be removed " "in Verde v2.0.0. Use a different dataset instead.", - DeprecationWarning, + FutureWarning, ) _setup_map( ax, diff --git a/verde/model_selection.py b/verde/model_selection.py index dfff35532..a1ec6fd73 100644 --- a/verde/model_selection.py +++ b/verde/model_selection.py @@ -14,10 +14,6 @@ from .utils import dispatch, partition_by_sum -# Otherwise, DeprecationWarning won't be shown, kind of defeating the purpose. -warnings.simplefilter("default") - - # Pylint doesn't like X, y scikit-learn argument names. # pylint: disable=invalid-name,unused-argument @@ -758,7 +754,7 @@ def cross_val_score( "The 'client' parameter of 'verde.cross_val_score' is deprecated " "and will be removed in Verde 2.0.0. " "Use the 'delayed' parameter instead.", - DeprecationWarning, + FutureWarning, ) coordinates, data, weights = check_fit_input( coordinates, data, weights, unpack=False diff --git a/verde/spline.py b/verde/spline.py index 271d69c6b..6baa7e8dd 100644 --- a/verde/spline.py +++ b/verde/spline.py @@ -20,10 +20,6 @@ from .utils import dummy_jit as jit -# Otherwise, DeprecationWarning won't be shown, kind of defeating the purpose. -warnings.simplefilter("default") - - class SplineCV(BaseGridder): r""" Cross-validated biharmonic spline interpolation. @@ -145,7 +141,7 @@ def __init__( "The 'client' parameter of 'verde.SplineCV' is " "deprecated and will be removed in Verde 2.0.0. " "Use the 'delayed' parameter instead.", - DeprecationWarning, + FutureWarning, ) def fit(self, coordinates, data, weights=None): diff --git a/verde/vector.py b/verde/vector.py index f307c08d1..9df20b6e0 100644 --- a/verde/vector.py +++ b/verde/vector.py @@ -19,10 +19,6 @@ from .utils import dummy_jit as jit -# Otherwise, DeprecationWarning won't be shown, kind of defeating the purpose. -warnings.simplefilter("default") - - class Vector(BaseGridder): """ Fit an estimator to each component of multi-component vector data. @@ -234,7 +230,7 @@ def __init__( "VectorSpline2D is deprecated and will be removed in Verde v2.0.0." " Please use the implementation in the Erizo package instead " "(https://github.com/fatiando/erizo).", - DeprecationWarning, + FutureWarning, ) def fit(self, coordinates, data, weights=None):