@@ -119,8 +119,7 @@ def decode(self, stored: bytes, *, key: dict | None = None) -> Any:
119119 return blob .unpack (stored , squeeze = False )
120120
121121
122- # Backward compatibility alias
123- DJBlobType = BlobCodec
122+ # Note: DJBlobType is defined at end of file as DJBlobCodec (not BlobCodec)
124123
125124
126125# =============================================================================
@@ -179,9 +178,9 @@ def encode(self, value: bytes, *, key: dict | None = None, store_name: str | Non
179178 Returns:
180179 Metadata dict: {hash, store, size}
181180 """
182- from .hash_registry import put_hash_content
181+ from .content_registry import put_content
183182
184- return put_hash_content (value , store_name = store_name )
183+ return put_content (value , store_name = store_name )
185184
186185 def decode (self , stored : dict , * , key : dict | None = None ) -> bytes :
187186 """
@@ -194,18 +193,17 @@ def decode(self, stored: dict, *, key: dict | None = None) -> bytes:
194193 Returns:
195194 Original bytes.
196195 """
197- from .hash_registry import get_hash_content
196+ from .content_registry import get_content
198197
199- return get_hash_content (stored ["hash" ], store_name = stored .get ("store" ))
198+ return get_content (stored ["hash" ], store_name = stored .get ("store" ))
200199
201200 def validate (self , value : Any ) -> None :
202201 """Validate that value is bytes."""
203202 if not isinstance (value , bytes ):
204203 raise TypeError (f"<hash> expects bytes, got { type (value ).__name__ } " )
205204
206205
207- # Backward compatibility alias
208- ContentType = HashCodec
206+ # Note: ContentType is defined at end of file as ContentCodec (not HashCodec)
209207
210208
211209# =============================================================================
@@ -300,7 +298,8 @@ def encode(
300298 from datetime import datetime , timezone
301299 from pathlib import Path
302300
303- from .storage import build_object_path , get_store_backend
301+ from .content_registry import get_store_backend
302+ from .storage import build_object_path
304303
305304 # Extract context from key
306305 key = key or {}
@@ -396,7 +395,7 @@ def decode(self, stored: dict, *, key: dict | None = None) -> Any:
396395 ObjectRef for accessing the stored content.
397396 """
398397 from .objectref import ObjectRef
399- from .storage import get_store_backend
398+ from .content_registry import get_store_backend
400399
401400 store_name = stored .get ("store" )
402401 backend = get_store_backend (store_name )
@@ -618,7 +617,7 @@ def encode(self, value: Any, *, key: dict | None = None, store_name: str | None
618617 """
619618 from datetime import datetime , timezone
620619
621- from .storage import get_store_backend
620+ from .content_registry import get_store_backend
622621
623622 path = str (value )
624623
@@ -653,7 +652,7 @@ def decode(self, stored: dict, *, key: dict | None = None) -> Any:
653652 ObjectRef for accessing the file.
654653 """
655654 from .objectref import ObjectRef
656- from .storage import get_store_backend
655+ from .content_registry import get_store_backend
657656
658657 store_name = stored .get ("store" )
659658 backend = get_store_backend (store_name )
@@ -669,11 +668,3 @@ def validate(self, value: Any) -> None:
669668
670669# Backward compatibility alias
671670FilepathType = FilepathCodec
672-
673-
674- # =============================================================================
675- # Legacy aliases for backward compatibility
676- # =============================================================================
677-
678- # Old names that mapped to content-addressed storage
679- XBlobType = BlobCodec # <xblob> is now <blob@>
0 commit comments