Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate dataset errors with module
__getattr__
(kedro-org#2673)
* Replace and deprecate `DataSet` use in class names * Replace another format string with an f-string * Perform deprecations for cached, lambda, and partitioned datasets * Deprecated `MemoryDataSet` in favor of `MemoryDataset` Signed-off-by: Deepyaman Datta <[email protected]> * Fix keyword argument to specify metaclass on `CachedDataSet` * Fix reference to `PartitionedDataset` * Keep `AbstractDataSet` subscriptable * Update __init__.py files, __all__ definitions, etc * Warn of impending Kedro 0.19 (not abstract future) * Update `VideoDataSet` to `VideoDataset` (and refs) * Add missing `kedro.utils.DeprecatedClassMeta` imps * Change deprecated references to `AbstractDataSet` Signed-off-by: Deepyaman Datta <[email protected]> * Warn of impending Kedro 0.19 (not abstract future) * Rename `pandas.CSVDataSet` to `pandas.CSVDataset` * Fix some pylint errors and blacken code * Update `dask.ParquetDataSet` * Undo changes for `VideoDataSet`, inherit from new base * Undo changes to `APIDataSet`, inherit from new base * Fix some imports and missed references * Undo changes to `BioSequenceDataSet`, inherit from new base * Undo changes to Dask and Pandas datasets, inherit from new bases * Remove the `AbstractDataset` and `AbstractVersionedDataset` alias, update `kedro.io.core` * Undo changes in `kedro/extras/datasets` * Update branch * Change `DataSetError` to `DatasetError` * Remove deprecated aliases for Abstract*DataSet * Change `DataSetError` to `DatasetError` in tests/ * Change DataSet*Error to Dataset*Error in tests/ * Fix references to DataSet in a lot of tests * Change `CSVDataset` back to `CSBVDataSet` * Rename core datasets used across `tests` directory * Fix "Saving 'None' to a 'DataSet' is not allowed." messages * Fix `test_http_filesystem_no_versioning` everywhere * Fix removal of "data" * Deprecate `_SharedMemoryDataSet` in favor of `_SharedMemoryDataset` * Fix tests/pipeline/test_pipeline_from_missing.py * Fix list datasets test * Change patched IncrementalDataSet to IncrementalDataset * Fix default checkpoint dataset * Fix data catalog tests * Fix error message * Use `MemoryDataset`, not `MemoryDataSet`, by default * Use `MemoryDataset`, not `MemoryDataSet`, for missing datasets in data catalog * Rename DefaultDataSet key to DefaultDataset * Change `LambdaDataSet` to `LambdaDataset` in `test_node_run.py` * Update error message--but should I? * Update error message--but should I? * Update error message in kedro/io/core.py--but should I? * Update RELEASE.md * Fix remaining tests * Fix lint issues * Align capitalization * Add `DeprecatedClassMeta` tests from StackOverflow * Blacken kedro/utils.py * Ignore "No value for argument 'subclass' in unbound method call" * Rename 'foo' to 'value' to satisfy linter * Disable pylint messages on deprecated class definitions * Blacken kedro/utils.py * Wrap `kedro.io.core` to fix error deprecation * Simplify deprecation of error names to try to fix docs * Undo attempt to make docs pass Revert "Simplify deprecation of error names to try to fix docs" This reverts commit e9294be. Revert "Wrap `kedro.io.core` to fix error deprecation" This reverts commit db9b7ac. * Wrap `kedro.io.core` to fix error deprecation * Leverage PEP 562 for less hacky error deprecations * Test old `DataSetError` in `kedro.extras.datasets` * Fix missing and unnecessary imports/other mistakes * Blacken kedro/io/core.py * Don't raise `DeprecationWarning` each time import from `kedro.io` * Replace `DataSetError` with `DatasetError` in test * Add missing "in" to a `DeprecationWarning` message * Add "Dataset" versions of errors to `kedro.io` doc * Add updated "Dataset" names to `kedro.io.rst` and sort the entries * Add `_SharedMemoryDataset` to type targets in conf * Revert all changes to `DatasetError` in `kedro/extras/datasets` The idea is so that we're not making changes not in Kedro-Datasets, and we can be confident that Kedro-Datasets won't break. * docs(datasets): fix a ref to `GeoJSONLocalDataset` * Consistently use `DatasetError` in dataset tests * Remove unused import * Remove "DataSet" imports from kedro/io/__init__.py * chore(sdk): use type hints to skirt linting errors * Implement workaround in `kedro/io/__init__.py` too * Import future annotation in `kedro/io/__init__.py` * test(datasets): cover raising a DeprecationWarning * Ignore pylint warnings (working as intended) * Replace `globals()` in `kedro.io.core.__getattr__` * Remove use of `exec` (use `import_module` instead) * Rename the parameters passed to `test_deprecation` --------- Signed-off-by: Deepyaman Datta <[email protected]> Signed-off-by: Juan Lovera <[email protected]>
- Loading branch information