Skip to content

Commit

Permalink
Add DataCatalog deprecation warning (#4510)
Browse files Browse the repository at this point in the history
* Added deprecation warnign

Signed-off-by: Elena Khaustova <[email protected]>

* Fixed typo

Signed-off-by: Elena Khaustova <[email protected]>

* Updated release notes

Signed-off-by: Elena Khaustova <[email protected]>

* Updated deprecation warning

Signed-off-by: Elena Khaustova <[email protected]>

* Updated broken link

Signed-off-by: Elena Khaustova <[email protected]>

---------

Signed-off-by: Elena Khaustova <[email protected]>
  • Loading branch information
ElenaKhaustova authored Mar 6, 2025
1 parent 9ec67a3 commit 3708823
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Added `Pipeline.grouped_nodes_by_namespace` property which returns a dictionary of nodes grouped by namespace, intended to be used by plugins to facilitate deployment of namespaced nodes together.

## Bug fixes and other changes
* Added `DataCatalog` deprecation warning.
* Updated `_LazyDataset` representation when printing `KedroDataCatalog`.
* Fixed `MemoryDataset` to infer `assign` copy mode for Ibis Tables, which previously would be inferred as `deepcopy`.
* Fixed pipeline packaging issue by ensuring `pipelines/__init__.py` exists when creating new pipelines.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/integrations/mlflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ to a local directory called `mlflow_runs`.
:::{note}
If you want to use a more sophisticated setup,
have a look at the documentation of
[MLflow tracking server](https://mlflow.org/docs/latest/tracking/server.html),
[MLflow tracking server](https://mlflow.org/docs/latest/tracking/server),
{external+mlflow:doc}`the official MLflow tracking server 5 minute overview <getting-started/tracking-server-overview/index>`,
and {external+mlflow:ref}`the MLflow tracking server documentation <logging_to_a_tracking_server>`.
:::
Expand Down
11 changes: 11 additions & 0 deletions kedro/io/data_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
import logging
import pprint
import re
import warnings
from typing import Any

from kedro import KedroDeprecationWarning
from kedro.io.catalog_config_resolver import (
CREDENTIALS_KEY, # noqa: F401
CatalogConfigResolver,
Expand Down Expand Up @@ -160,6 +162,15 @@ def __init__( # noqa: PLR0913
>>> save_args={"index": False})
>>> catalog = DataCatalog(datasets={'cars': cars})
"""
warnings.warn(
"`DataCatalog` has been deprecated and will be replaced by `KedroDataCatalog`, in Kedro 1.0.0."
"Currently some `KedroDataCatalog` APIs have been retained for compatibility with `DataCatalog`, including "
"the `datasets` property and the `get_datasets`, `_get_datasets`, `add`,` list`, `add_feed_dict`, "
"and `shallow_copy` methods. These will be removed or replaced with updated alternatives in Kedro 1.0.0. "
"For more details, refer to the documentation: "
"https://docs.kedro.org/en/stable/data/index.html#kedrodatacatalog-experimental-feature",
KedroDeprecationWarning,
)
self._config_resolver = config_resolver or CatalogConfigResolver()
# Kept to avoid breaking changes
if not config_resolver:
Expand Down

0 comments on commit 3708823

Please sign in to comment.