Skip to content

Commit

Permalink
Add visible DeprecationWarning for kedro.extras.datasets
Browse files Browse the repository at this point in the history
Fix gh-1501.

Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
  • Loading branch information
astrojuanlu committed Apr 27, 2023
1 parent 1c28e2a commit 6fc045c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kedro/extras/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""``kedro.extras.datasets`` is where you can find all of Kedro's data connectors.
These data connectors are implementations of the ``AbstractDataSet``.
"""

from warnings import warn as _warn

_warn(
"`kedro.extras.datasets` is deprecated and will be removed in Kedro 0.19, "
"install `kedro-datasets` instead by running `pip install kedro-datasets`.",
DeprecationWarning,
stacklevel=2,
)
3 changes: 3 additions & 0 deletions kedro/io/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ class Version(namedtuple("Version", ["load", "save"])):
"intermediate data sets where possible to avoid this warning."
)

# `kedro_datasets` is probed before `kedro.extras.datasets`,
# hence the DeprecationWarning will not be shown
# if the dataset is available in the former
_DEFAULT_PACKAGES = ["kedro.io.", "kedro_datasets.", "kedro.extras.datasets.", ""]


Expand Down

0 comments on commit 6fc045c

Please sign in to comment.