diff --git a/dvc/config.py b/dvc/config.py index b0d280b81..10b228b56 100644 --- a/dvc/config.py +++ b/dvc/config.py @@ -181,15 +181,6 @@ class Config(object): # pylint: disable=too-many-instance-attributes Optional(SECTION_CACHE_SLOW_LINK_WARNING, default=True): BOOL_SCHEMA, } - # backward compatibility - SECTION_CORE_CLOUD = "cloud" - SECTION_CORE_CLOUD_SCHEMA = And( - Use(str.lower), - # only the clouds which were supported by obsoleted cloud config - Choices("aws", "gcp", "local", ""), - ) - SECTION_CORE_STORAGEPATH = "storagepath" - SECTION_CORE_SCHEMA = { Optional(SECTION_CORE_LOGLEVEL): And( str, Use(str.lower), SECTION_CORE_LOGLEVEL_SCHEMA @@ -204,9 +195,6 @@ class Config(object): # pylint: disable=too-many-instance-attributes Optional( SECTION_CORE_CHECKSUM_JOBS, default=None ): SECTION_CORE_CHECKSUM_JOBS_SCHEMA, - # backward compatibility - Optional(SECTION_CORE_CLOUD, default=""): SECTION_CORE_CLOUD_SCHEMA, - Optional(SECTION_CORE_STORAGEPATH, default=""): str, } # backward compatibility diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 0cfa3129b..ae6b584fe 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -124,9 +124,6 @@ class RemoteBASE(object): path_info=self.path_info or "No path", ) - def compat_config(config): - return config.copy() - @classmethod def supported(cls, config): if isinstance(config, basestring): diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py index 95ce4c1c3..b171b9c4e 100644 --- a/dvc/remote/gs.py +++ b/dvc/remote/gs.py @@ -35,13 +35,6 @@ class RemoteGS(RemoteBASE): self.projectname = config.get(Config.SECTION_GCP_PROJECTNAME, None) self.credentialpath = config.get(Config.SECTION_GCP_CREDENTIALPATH) - @staticmethod - def compat_config(config): - ret = config.copy() - url = "gs://" + ret.pop(Config.SECTION_GCP_STORAGEPATH, "").lstrip("/") - ret[Config.SECTION_REMOTE_URL] = url - return ret - @cached_property def gs(self): return ( diff --git a/dvc/remote/local/__init__.py b/dvc/remote/local/__init__.py index 786e92ed3..127a4a3ba 100644 --- a/dvc/remote/local/__init__.py +++ b/dvc/remote/local/__init__.py @@ -91,13 +91,6 @@ class RemoteLOCAL(RemoteBASE): def supported(cls, config): return True - @staticmethod - def compat_config(config): - ret = config.copy() - url = ret.pop(Config.SECTION_LOCAL_STORAGEPATH, "") - ret[Config.SECTION_REMOTE_URL] = url - return ret - def list_cache_paths(self): assert self.path_info is not None diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py index deb095170..d9adab21b 100644 --- a/dvc/remote/s3.py +++ b/dvc/remote/s3.py @@ -70,13 +70,6 @@ class RemoteS3(RemoteBASE): if shared_creds: os.environ.setdefault("AWS_SHARED_CREDENTIALS_FILE", shared_creds) - @staticmethod - def compat_config(config): - ret = config.copy() - url = "s3://" + ret.pop(Config.SECTION_AWS_STORAGEPATH, "").lstrip("/") - ret[Config.SECTION_REMOTE_URL] = url - return ret - @cached_property def s3(self): session = boto3.session.Session( diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py index ef6558939..f3ed1fe57 100644 --- a/tests/func/test_data_cloud.py +++ b/tests/func/test_data_cloud.py @@ -569,15 +569,6 @@ class TestDataCloudCLIBase(TestDvc): self._test() -class TestCompatRemoteLOCALCLI(TestDataCloudCLIBase): - def _test(self): - storagepath = get_local_storagepath() - self.main(["config", "core.cloud", "local"]) - self.main(["config", "local.storagepath", storagepath]) - - self._test_cloud() - - class TestRemoteLOCALCLI(TestDataCloudCLIBase): def _test(self): url = get_local_url() @@ -611,18 +602,6 @@ class TestRemoteHDFSCLI(TestDataCloudCLIBase): self._test_cloud(TEST_REMOTE) -class TestCompatRemoteS3CLI(TestDataCloudCLIBase): - def _should_test(self): - return _should_test_aws() - - def _test(self): - storagepath = get_aws_storagepath() - self.main(["config", "core.cloud", "aws"]) - self.main(["config", "aws.storagepath", storagepath]) - - self._test_cloud() - - class TestRemoteS3CLI(TestDataCloudCLIBase): def _should_test(self): return _should_test_aws() @@ -635,18 +614,6 @@ class TestRemoteS3CLI(TestDataCloudCLIBase): self._test_cloud(TEST_REMOTE) -class TestCompatRemoteGSCLI(TestDataCloudCLIBase): - def _should_test(self): - return _should_test_gcp() - - def _test(self): - storagepath = get_gcp_storagepath() - self.main(["config", "core.cloud", "gcp"]) - self.main(["config", "gcp.storagepath", storagepath]) - - self._test_cloud() - - class TestRemoteGSCLI(TestDataCloudCLIBase): def _should_test(self): return _should_test_gcp()