Page MenuHomeSoftware Heritage

D5721.diff
No OneTemporary

D5721.diff

diff --git a/swh/storage/__init__.py b/swh/storage/__init__.py
--- a/swh/storage/__init__.py
+++ b/swh/storage/__init__.py
@@ -15,12 +15,13 @@
"local": ".postgresql.storage.Storage",
"remote": ".api.client.RemoteStorage",
"memory": ".in_memory.InMemoryStorage",
- "filter": ".filter.FilteringProxyStorage",
- "buffer": ".buffer.BufferingProxyStorage",
- "retry": ".retry.RetryingProxyStorage",
"cassandra": ".cassandra.CassandraStorage",
- "validate": ".validate.ValidatingProxyStorage",
- "tenacious": ".tenacious.TenaciousProxyStorage",
+ # proxy storages
+ "filter": ".proxies.filter.FilteringProxyStorage",
+ "buffer": ".proxies.buffer.BufferingProxyStorage",
+ "retry": ".proxies.retry.RetryingProxyStorage",
+ "validate": ".proxies.validate.ValidatingProxyStorage",
+ "tenacious": ".proxies.tenacious.TenaciousProxyStorage",
}
diff --git a/swh/storage/buffer.py b/swh/storage/proxies/buffer.py
rename from swh/storage/buffer.py
rename to swh/storage/proxies/buffer.py
diff --git a/swh/storage/filter.py b/swh/storage/proxies/filter.py
rename from swh/storage/filter.py
rename to swh/storage/proxies/filter.py
diff --git a/swh/storage/retry.py b/swh/storage/proxies/retry.py
rename from swh/storage/retry.py
rename to swh/storage/proxies/retry.py
diff --git a/swh/storage/tenacious.py b/swh/storage/proxies/tenacious.py
rename from swh/storage/tenacious.py
rename to swh/storage/proxies/tenacious.py
diff --git a/swh/storage/validate.py b/swh/storage/proxies/validate.py
rename from swh/storage/validate.py
rename to swh/storage/proxies/validate.py
diff --git a/swh/storage/tests/test_buffer.py b/swh/storage/tests/test_buffer.py
--- a/swh/storage/tests/test_buffer.py
+++ b/swh/storage/tests/test_buffer.py
@@ -7,7 +7,7 @@
from unittest.mock import Mock
from swh.storage import get_storage
-from swh.storage.buffer import BufferingProxyStorage
+from swh.storage.proxies.buffer import BufferingProxyStorage
def get_storage_with_buffer_config(**buffer_config) -> BufferingProxyStorage:
diff --git a/swh/storage/tests/test_init.py b/swh/storage/tests/test_init.py
--- a/swh/storage/tests/test_init.py
+++ b/swh/storage/tests/test_init.py
@@ -10,11 +10,11 @@
from swh.core.pytest_plugin import RPCTestAdapter
from swh.storage import get_storage
from swh.storage.api import client, server
-from swh.storage.buffer import BufferingProxyStorage
-from swh.storage.filter import FilteringProxyStorage
from swh.storage.in_memory import InMemoryStorage
from swh.storage.postgresql.storage import Storage as DbStorage
-from swh.storage.retry import RetryingProxyStorage
+from swh.storage.proxies.buffer import BufferingProxyStorage
+from swh.storage.proxies.filter import FilteringProxyStorage
+from swh.storage.proxies.retry import RetryingProxyStorage
STORAGES = [
pytest.param(cls, real_class, kwargs, id=cls)
diff --git a/swh/storage/tests/test_retry.py b/swh/storage/tests/test_retry.py
--- a/swh/storage/tests/test_retry.py
+++ b/swh/storage/tests/test_retry.py
@@ -18,7 +18,7 @@
"""In test context, we don't want to wait, make test faster
"""
- from swh.storage.retry import RetryingProxyStorage
+ from swh.storage.proxies.retry import RetryingProxyStorage
for method_name, method in RetryingProxyStorage.__dict__.items():
if "_add" in method_name or "_update" in method_name:
diff --git a/swh/storage/tests/test_tenacious.py b/swh/storage/tests/test_tenacious.py
--- a/swh/storage/tests/test_tenacious.py
+++ b/swh/storage/tests/test_tenacious.py
@@ -14,7 +14,7 @@
from swh.model.tests.swh_model_data import TEST_OBJECTS
from swh.storage import get_storage
from swh.storage.in_memory import InMemoryStorage
-from swh.storage.tenacious import TenaciousProxyStorage
+from swh.storage.proxies.tenacious import TenaciousProxyStorage
from swh.storage.tests.storage_data import StorageData
from swh.storage.tests.storage_tests import (
TestStorageGeneratedData as _TestStorageGeneratedData,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 9:49 PM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3232336

Event Timeline