diff --git a/cloudpathlib/azure/azblobclient.py b/cloudpathlib/azure/azblobclient.py index 60e0fa5e..4db96183 100644 --- a/cloudpathlib/azure/azblobclient.py +++ b/cloudpathlib/azure/azblobclient.py @@ -169,7 +169,7 @@ def _list_dir( ) yield from ( - (self.CloudPath(f"azure://{c.name}"), True) + (self.CloudPath(f"az://{c.name}"), True) for c in self.service_client.list_containers() ) return @@ -194,7 +194,7 @@ def _list_dir( continue yield ( - self.CloudPath(f"azure://{cloud_path.container}/{prefix}{parent}"), + self.CloudPath(f"az://{cloud_path.container}/{prefix}{parent}"), True, # is a directory ) yielded_dirs.add(parent) @@ -203,7 +203,7 @@ def _list_dir( if not recursive and "/" in o.name[len(prefix) :]: continue - yield (self.CloudPath(f"azure://{cloud_path.container}/{o.name}"), False) # is a file + yield (self.CloudPath(f"az://{cloud_path.container}/{o.name}"), False) # is a file def _move_file( self, src: AzureBlobPath, dst: AzureBlobPath, remove_src: bool = True diff --git a/cloudpathlib/azure/azblobpath.py b/cloudpathlib/azure/azblobpath.py index 1ab08257..e6777ab7 100644 --- a/cloudpathlib/azure/azblobpath.py +++ b/cloudpathlib/azure/azblobpath.py @@ -30,7 +30,7 @@ class AzureBlobPath(CloudPath): is used. See `AzureBlobClient`'s documentation for more details. """ - cloud_prefix: str = "azure://" + cloud_prefix: str = "az://" client: "AzureBlobClient" @property diff --git a/cloudpathlib/local/implementations/azure.py b/cloudpathlib/local/implementations/azure.py index b573d63f..519924d0 100644 --- a/cloudpathlib/local/implementations/azure.py +++ b/cloudpathlib/local/implementations/azure.py @@ -42,7 +42,7 @@ class LocalAzureBlobPath(LocalPath): substitute when writing tests. """ - cloud_prefix: str = "azure://" + cloud_prefix: str = "az://" _cloud_meta = local_azure_blob_implementation @property diff --git a/docs/docs/script/why_cloudpathlib.py b/docs/docs/script/why_cloudpathlib.py index 19887809..5259d4ba 100644 --- a/docs/docs/script/why_cloudpathlib.py +++ b/docs/docs/script/why_cloudpathlib.py @@ -105,7 +105,7 @@ from cloudpathlib import AzureBlobPath -azp = AzureBlobPath("azure://cloudpathlib-test-container/file.txt") +azp = AzureBlobPath("az://cloudpathlib-test-container/file.txt") azp.name @@ -149,7 +149,7 @@ from cloudpathlib import CloudPath # Changing this root path is the ONLY change! -cloud_directory = CloudPath("azure://cloudpathlib-test-container/why_cloudpathlib/") +cloud_directory = CloudPath("az://cloudpathlib-test-container/why_cloudpathlib/") upload = cloud_directory / "user_upload.txt" upload.write_text("A user made this file!") diff --git a/docs/docs/why_cloudpathlib.ipynb b/docs/docs/why_cloudpathlib.ipynb index 9dae4f7e..62ac4167 100644 --- a/docs/docs/why_cloudpathlib.ipynb +++ b/docs/docs/why_cloudpathlib.ipynb @@ -408,7 +408,7 @@ "source": [ "from cloudpathlib import AzureBlobPath\n", "\n", - "azp = AzureBlobPath(\"azure://cloudpathlib-test-container/file.txt\")\n", + "azp = AzureBlobPath(\"az://cloudpathlib-test-container/file.txt\")\n", "azp.name" ] }, @@ -480,7 +480,7 @@ { "data": { "text/plain": [ - "[AzureBlobPath('azure://cloudpathlib-test-container/file.txt')]" + "[AzureBlobPath('az://cloudpathlib-test-container/file.txt')]" ] }, "execution_count": 19, @@ -564,7 +564,7 @@ "from cloudpathlib import CloudPath\n", "\n", "# Changing this root path is the ONLY change!\n", - "cloud_directory = CloudPath(\"azure://cloudpathlib-test-container/why_cloudpathlib/\")\n", + "cloud_directory = CloudPath(\"az://cloudpathlib-test-container/why_cloudpathlib/\")\n", "\n", "upload = cloud_directory / \"user_upload.txt\"\n", "upload.write_text(\"A user made this file!\")\n", diff --git a/pyproject.toml b/pyproject.toml index 163044db..c79df8f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ requires-python = ">=3.7" dependencies = [ "importlib_metadata ; python_version < '3.8'", "typing_extensions>4 ; python_version < '3.11'", - "smart_open[all] >=6", + "smart_open >=6", ] [project.optional-dependencies] diff --git a/tests/test_azure_specific.py b/tests/test_azure_specific.py index 4c7e79d7..05f4be31 100644 --- a/tests/test_azure_specific.py +++ b/tests/test_azure_specific.py @@ -12,11 +12,11 @@ def test_azureblobpath_properties(path_class, monkeypatch): if not os.getenv("AZURE_STORAGE_CONNECTION_STRING"): monkeypatch.setenv("AZURE_STORAGE_CONNECTION_STRING", "AccountName=fake;AccountKey=fake2;") - p = path_class("azure://mycontainer") + p = path_class("az://mycontainer") assert p.blob == "" assert p.container == "mycontainer" - p2 = path_class("azure://mycontainer/") + p2 = path_class("az://mycontainer/") assert p2.blob == "" assert p2.container == "mycontainer" diff --git a/tests/test_cloudpath_instantiation.py b/tests/test_cloudpath_instantiation.py index 10eb62ce..e49f54ba 100644 --- a/tests/test_cloudpath_instantiation.py +++ b/tests/test_cloudpath_instantiation.py @@ -12,10 +12,10 @@ @pytest.mark.parametrize( "path_class, cloud_path", [ - (AzureBlobPath, "azure://b/k"), - (AzureBlobPath, "azure://b/k"), - (AzureBlobPath, "azure://b/k"), - (AzureBlobPath, "azure://b/k"), + (AzureBlobPath, "az://b/k"), + (AzureBlobPath, "az://b/k"), + (AzureBlobPath, "az://b/k"), + (AzureBlobPath, "az://b/k"), (S3Path, "s3://b/k"), (S3Path, "S3://b/k"), (GSPath, "gs://b/k"),