Skip to content

Commit 29ef41d

Browse files
jhammandstansby
andauthored
Make make_store_path private (#2628)
* Clean up public store API * chore: make_store_path is private --------- Co-authored-by: David Stansby <dstansby@gmail.com>
1 parent 12f6012 commit 29ef41d

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/zarr/api/asynchronous.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@
2727
from zarr.core.metadata import ArrayMetadataDict, ArrayV2Metadata, ArrayV3Metadata
2828
from zarr.core.metadata.v2 import _default_compressor, _default_filters
2929
from zarr.errors import NodeTypeValidationError
30-
from zarr.storage import (
31-
StoreLike,
32-
make_store_path,
33-
)
30+
from zarr.storage._common import make_store_path
3431

3532
if TYPE_CHECKING:
3633
from collections.abc import Iterable
3734

3835
from zarr.abc.codec import Codec
3936
from zarr.core.chunk_key_encodings import ChunkKeyEncoding
37+
from zarr.storage import StoreLike
4038

4139
# TODO: this type could use some more thought
4240
ArrayLike = AsyncArray[ArrayV2Metadata] | AsyncArray[ArrayV3Metadata] | Array | npt.NDArray[Any]

src/zarr/core/array.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
_parse_bytes_bytes_codec,
113113
get_pipeline_class,
114114
)
115-
from zarr.storage import StoreLike, make_store_path
116-
from zarr.storage._common import StorePath, ensure_no_existing_node
115+
from zarr.storage import StoreLike
116+
from zarr.storage._common import StorePath, ensure_no_existing_node, make_store_path
117117

118118
if TYPE_CHECKING:
119119
from collections.abc import Iterator, Sequence
@@ -122,6 +122,7 @@
122122
from zarr.abc.codec import CodecPipeline
123123
from zarr.codecs.sharding import ShardingCodecIndexLocation
124124
from zarr.core.group import AsyncGroup
125+
from zarr.storage import StoreLike
125126

126127

127128
# Array and AsyncArray are defined in the base ``zarr`` namespace

src/zarr/core/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
from zarr.core.metadata.v3 import V3JsonEncoder
5151
from zarr.core.sync import SyncMixin, sync
5252
from zarr.errors import MetadataValidationError
53-
from zarr.storage import StoreLike, StorePath, make_store_path
54-
from zarr.storage._common import ensure_no_existing_node
53+
from zarr.storage import StoreLike, StorePath
54+
from zarr.storage._common import ensure_no_existing_node, make_store_path
5555

5656
if TYPE_CHECKING:
5757
from collections.abc import AsyncGenerator, Generator, Iterable, Iterator

src/zarr/storage/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from types import ModuleType
44
from typing import Any
55

6-
from zarr.storage._common import StoreLike, StorePath, make_store_path
6+
from zarr.storage._common import StoreLike, StorePath
77
from zarr.storage._fsspec import FsspecStore
88
from zarr.storage._local import LocalStore
99
from zarr.storage._logging import LoggingStore
@@ -21,7 +21,6 @@
2121
"StorePath",
2222
"WrapperStore",
2323
"ZipStore",
24-
"make_store_path",
2524
]
2625

2726

tests/test_group.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
from zarr.core.group import ConsolidatedMetadata, GroupMetadata
2323
from zarr.core.sync import sync
2424
from zarr.errors import ContainsArrayError, ContainsGroupError
25-
from zarr.storage import LocalStore, MemoryStore, StorePath, ZipStore, make_store_path
25+
from zarr.storage import LocalStore, MemoryStore, StorePath, ZipStore
26+
from zarr.storage._common import make_store_path
2627
from zarr.testing.store import LatencyStore
2728

2829
from .conftest import parse_store

tests/test_store/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from _pytest.compat import LEGACY_PATH
66

77
from zarr.core.common import AccessModeLiteral
8-
from zarr.storage import FsspecStore, LocalStore, MemoryStore, StoreLike, StorePath, make_store_path
8+
from zarr.storage import FsspecStore, LocalStore, MemoryStore, StoreLike, StorePath
9+
from zarr.storage._common import make_store_path
910
from zarr.storage._utils import normalize_path
1011

1112

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy