Repository: kedro-org/kedro
File: kedro/io/core.py (Python)

Code before:
                "paths or paths ending with a dot."
            )
        class_paths = (prefix + dataset_type for prefix in _DEFAULT_PACKAGES)

        for class_path in class_paths:
            tmp = _load_obj(class_path)
            if tmp is not None:
                class_obj = tmp
                break
        else:
            hint = ""
            if "DataSet" in dataset_type:
                hint = (
                    "Hint: If you are trying to use a dataset from `kedro-datasets`>=2.0.0, "
                    "make sure that the dataset name uses the `Dataset` spelling instead of `DataSet`."
                )
            else:
                hint = (
                    "Hint: If you are trying to use a dataset from `kedro-datasets`, "
                    "make sure that the package is installed in your current environment. "
                    "You can do so by running `pip install kedro-datasets`."
                )
            raise DatasetError(
                f"Class '{dataset_type}' not found, is this a typo?" f"\n{hint}"
            )

    if not class_obj:
        class_obj = dataset_type

    if not issubclass(class_obj, AbstractDataset):
        raise DatasetError(
            f"Dataset type '{class_obj.__module__}.{class_obj.__qualname__}' "
            f"is invalid: all data set types must extend 'AbstractDataset'."
        )

    if VERSION_KEY in config:
        # remove "version" key so that it's not passed
        # to the "unversioned" data set constructor
        message = (
            "'%s' attribute removed from data set configuration since it is a "
            "reserved word and cannot be directly specified"
        )
        logging.getLogger(__name__).warning(message, VERSION_KEY)
        del config[VERSION_KEY]

    # dataset is either versioned explicitly by the user or versioned is set to true by default
    # on the dataset
    if config.pop(VERSIONED_FLAG_KEY, False) or getattr(
        class_obj, VERSIONED_FLAG_KEY, False
    ):
        config[VERSION_KEY] = Version(load_version, save_version)

Review comment (bug):
I wonder:

- if we could aid debugging by spitting out the full importlib classpath at this point
- if we could check if users are missing an `__int__.py` a common issue

Code after:
                "paths or paths ending with a dot."
            )
        class_paths = (prefix + dataset_type for prefix in _DEFAULT_PACKAGES)

        for class_path in class_paths:
            tmp = _load_obj(class_path)
            if tmp is not None:
                class_obj = tmp
                break
        else:
            hint = ""
            if "DataSet" in dataset_type:
                hint = (  # pragma: no cover # To remove when we drop support for python 3.8
                    "Hint: If you are trying to use a dataset from `kedro-datasets`>=2.0.0, "
                    "make sure that the dataset name uses the `Dataset` spelling instead of `DataSet`."
                )
            else:
                hint = (
                    "Hint: If you are trying to use a dataset from `kedro-datasets`, "
                    "make sure that the package is installed in your current environment. "
                    "You can do so by running `pip install kedro-datasets` or "
                    "`pip install kedro-datasets[<dataset-group>]` to install `kedro-datasets` along with "
                    "related dependencies for the specific dataset group."
                )
            raise DatasetError(
                f"Class '{dataset_type}' not found, is this a typo?" f"\n{hint}"
            )

    if not class_obj:
        class_obj = dataset_type

    if not issubclass(class_obj, AbstractDataset):
        raise DatasetError(
            f"Dataset type '{class_obj.__module__}.{class_obj.__qualname__}' "
            f"is invalid: all data set types must extend 'AbstractDataset'."
        )

    if VERSION_KEY in config:
        # remove "version" key so that it's not passed
        # to the "unversioned" data set constructor
        message = (
            "'%s' attribute removed from data set configuration since it is a "
            "reserved word and cannot be directly specified"
        )
        logging.getLogger(__name__).warning(message, VERSION_KEY)
        del config[VERSION_KEY]

    # dataset is either versioned explicitly by the user or versioned is set to true by default
    # on the dataset
    if config.pop(VERSIONED_FLAG_KEY, False) or getattr(
        class_obj, VERSIONED_FLAG_KEY, False