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

Do not unsuppress DeprecationWarnings with Kedro #2747

Merged
merged 2 commits into from
Jun 30, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions kedro/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"""
from __future__ import annotations

import warnings

from .cached_dataset import CachedDataset
from .cached_dataset import CachedDataset, CachedDataSet
from .core import (
AbstractDataSet,
AbstractVersionedDataSet,
Expand All @@ -15,17 +13,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]
Expand Down
2 changes: 0 additions & 2 deletions kedro/io/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down