@@ -335,10 +335,6 @@ def __init__(self, name: str, **properties: str):
335335 self .uri = properties [URI ]
336336 self ._fetch_config ()
337337 self ._session = self ._create_session ()
338- separator_from_properties = self .properties .get (NAMESPACE_SEPARATOR_PROPERTY , DEFAULT_NAMESPACE_SEPARATOR )
339- if not separator_from_properties :
340- raise ValueError ("Namespace separator cannot be an empty string" )
341- self ._namespace_separator = unquote (separator_from_properties )
342338
343339 def _create_session (self ) -> Session :
344340 """Create a request session with provided catalog configuration."""
@@ -526,6 +522,11 @@ def _fetch_config(self) -> None:
526522 if property_as_bool (self .properties , VIEW_ENDPOINTS_SUPPORTED , VIEW_ENDPOINTS_SUPPORTED_DEFAULT ):
527523 self ._supported_endpoints .update (VIEW_ENDPOINTS )
528524
525+ separator_from_properties = self .properties .get (NAMESPACE_SEPARATOR_PROPERTY , DEFAULT_NAMESPACE_SEPARATOR )
526+ if not separator_from_properties :
527+ raise ValueError ("Namespace separator cannot be an empty string" )
528+ self ._namespace_separator = unquote (separator_from_properties )
529+
529530 def _identifier_to_validated_tuple (self , identifier : str | Identifier ) -> Identifier :
530531 identifier_tuple = self .identifier_to_tuple (identifier )
531532 if len (identifier_tuple ) <= 1 :
@@ -542,6 +543,7 @@ def _split_identifier_for_path(
542543 }
543544 identifier_tuple = self ._identifier_to_validated_tuple (identifier )
544545
546+ # Use quote to ensure that '/' aren't treated as path separators.
545547 return {
546548 "namespace" : self ._encode_namespace_path (identifier_tuple [:- 1 ]),
547549 kind .value : quote (identifier_tuple [- 1 ], safe = "" ),
0 commit comments