Skip to content

Commit 4e099e4

Browse files
committed
Remove warning
1 parent 4d8e7ad commit 4e099e4

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/zarr/storage/_common.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import importlib.util
44
import json
5-
import warnings
65
from pathlib import Path
76
from typing import TYPE_CHECKING, Any, Literal, Self, TypeAlias
87

@@ -117,12 +116,6 @@ async def open(cls, store: Store, path: str, mode: AccessModeLiteral | None = No
117116
elif mode == "r":
118117
# Create read-only copy for read mode on writable store
119118
try:
120-
warnings.warn(
121-
"Store is not read-only but mode is 'r'. Creating a read-only copy. "
122-
"This behavior may change in the future with a more granular permissions model.",
123-
UserWarning,
124-
stacklevel=1,
125-
)
126119
self = await cls._create_open_instance(store.with_read_only(True), path)
127120
except NotImplementedError as e:
128121
raise ValueError(

tests/test_store/test_core.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,4 @@ def test_relativize_path_invalid() -> None:
266266
def test_different_open_mode() -> None:
267267
store = MemoryStore()
268268
zarr.create((100,), store=store, zarr_format=2, path="a")
269-
with pytest.warns(
270-
UserWarning,
271-
match="Store is not read-only but mode is 'r'. Creating a read-only copy. This behavior may change in the future with a more granular permissions model",
272-
):
273-
zarr.open_array(store=store, path="a", zarr_format=2, mode="r")
269+
zarr.open_array(store=store, path="a", zarr_format=2, mode="r")

0 commit comments

Comments
 (0)