Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9348458
D8025.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8025.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 6:32 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218767
Attached To
D8025: Remove deprecated 'args' argument of get_objstorage
Event Timeline
Log In to Comment