diff --git a/python/sedona/core/jvm/config.py b/python/sedona/core/jvm/config.py index 3350fa8798..1ad1da12c7 100644 --- a/python/sedona/core/jvm/config.py +++ b/python/sedona/core/jvm/config.py @@ -18,7 +18,7 @@ import logging import os from re import findall -from typing import Any, Optional, Tuple +from typing import Optional, Tuple from py4j.protocol import Py4JJavaError from pyspark.sql import SparkSession @@ -89,13 +89,11 @@ def decorator(func1): @functools.wraps(func1) def new_func1(*args, **kwargs): - warnings.simplefilter('always', DeprecationWarning) warnings.warn( fmt1.format(name=func1.__name__, reason=reason), category=DeprecationWarning, stacklevel=2 ) - warnings.simplefilter('default', DeprecationWarning) return func1(*args, **kwargs) return new_func1 @@ -121,13 +119,11 @@ def new_func1(*args, **kwargs): @functools.wraps(func2) def new_func2(*args, **kwargs): - warnings.simplefilter('always', DeprecationWarning) warnings.warn( fmt2.format(name=func2.__name__), category=DeprecationWarning, stacklevel=2 ) - warnings.simplefilter('default', DeprecationWarning) return func2(*args, **kwargs) return new_func2