Page MenuHomeSoftware Heritage

D8025.diff
No OneTemporary

D8025.diff

diff --git a/swh/objstorage/api/server.py b/swh/objstorage/api/server.py
--- a/swh/objstorage/api/server.py
+++ b/swh/objstorage/api/server.py
@@ -156,11 +156,8 @@
cls = vcfg["cls"]
if cls == "pathslicing":
- # Backwards-compatibility: either get the deprecated `args` from the
- # objstorage config, or use the full config itself to check for keys
- args = vcfg.get("args", vcfg)
for key in ("root", "slicing"):
- v = args.get(key)
+ v = vcfg.get(key)
if v is None:
missing_keys.append(key)
diff --git a/swh/objstorage/factory.py b/swh/objstorage/factory.py
--- a/swh/objstorage/factory.py
+++ b/swh/objstorage/factory.py
@@ -4,7 +4,6 @@
# See top-level LICENSE file for more information
import importlib
-import warnings
from swh.objstorage.interface import ObjStorageInterface
from swh.objstorage.multiplexer import MultiplexerObjStorage, StripingObjStorage
@@ -30,7 +29,7 @@
}
-def get_objstorage(cls: str, args=None, **kwargs) -> ObjStorageInterface:
+def get_objstorage(cls: str, **kwargs) -> ObjStorageInterface:
"""Create an ObjStorage using the given implementation class.
Args:
@@ -45,16 +44,6 @@
ValueError: if the given storage class is not a valid objstorage
key.
"""
- if args is not None:
- warnings.warn(
- 'Explicit "args" key is deprecated for objstorage initialization, '
- "use class arguments keys directly instead.",
- DeprecationWarning,
- )
- # TODO: when removing this, drop the "args" backwards compatibility
- # from swh.objstorage.api.server configuration checker
- kwargs = args
-
class_path = OBJSTORAGE_IMPLEMENTATIONS.get(cls)
if class_path is None:
raise ValueError(

File Metadata

Mime Type
text/plain
Expires
Jul 3 2025, 6:32 PM (5 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218767

Event Timeline