From 762eb95d108aa82648ab580fdc4e9e00c890264c Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Thu, 29 Jun 2023 09:32:52 -0600 Subject: [PATCH 1/2] Do not unsuppress `DeprecationWarning`s with Kedro Signed-off-by: Deepyaman Datta --- kedro/io/__init__.py | 21 +++++++++------------ kedro/io/core.py | 2 -- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/kedro/io/__init__.py b/kedro/io/__init__.py index 2888b9f79c..67e049b6c2 100644 --- a/kedro/io/__init__.py +++ b/kedro/io/__init__.py @@ -5,7 +5,7 @@ import warnings -from .cached_dataset import CachedDataset +from .cached_dataset import CachedDataset, CachedDataSet from .core import ( AbstractDataSet, AbstractVersionedDataSet, @@ -15,17 +15,14 @@ Version, ) from .data_catalog import DataCatalog -from .lambda_dataset import LambdaDataset -from .memory_dataset import MemoryDataset -from .partitioned_dataset import IncrementalDataset, PartitionedDataset - -with warnings.catch_warnings(): - warnings.simplefilter("ignore", DeprecationWarning) - from .cached_dataset import CachedDataSet - from .lambda_dataset import LambdaDataSet - from .memory_dataset import MemoryDataSet - from .partitioned_dataset import IncrementalDataSet, PartitionedDataSet - +from .lambda_dataset import LambdaDataset, LambdaDataSet +from .memory_dataset import MemoryDataset, MemoryDataSet +from .partitioned_dataset import ( + IncrementalDataset, + IncrementalDataSet, + PartitionedDataset, + PartitionedDataSet, +) # https://github.com/pylint-dev/pylint/issues/4300#issuecomment-1043601901 DataSetError: type[Exception] diff --git a/kedro/io/core.py b/kedro/io/core.py index fd90d25b8f..c0e6ee48e0 100644 --- a/kedro/io/core.py +++ b/kedro/io/core.py @@ -22,8 +22,6 @@ from kedro.utils import load_obj -warnings.simplefilter("default", DeprecationWarning) - VERSION_FORMAT = "%Y-%m-%dT%H.%M.%S.%fZ" VERSIONED_FLAG_KEY = "versioned" VERSION_KEY = "version" From dde360a4900c0703e9d249a6abcb83fab6bfc66b Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Thu, 29 Jun 2023 09:59:56 -0600 Subject: [PATCH 2/2] Remove unused import Signed-off-by: Deepyaman Datta --- kedro/io/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/kedro/io/__init__.py b/kedro/io/__init__.py index 67e049b6c2..351c7f510e 100644 --- a/kedro/io/__init__.py +++ b/kedro/io/__init__.py @@ -3,8 +3,6 @@ """ from __future__ import annotations -import warnings - from .cached_dataset import CachedDataset, CachedDataSet from .core import ( AbstractDataSet,