@@ -231,10 +231,6 @@ def __init__(self, name: str, **properties: str):
231231 self .uri = properties [URI ]
232232 self ._fetch_config ()
233233 self ._session = self ._create_session ()
234- separator_from_properties = self .properties .get (NAMESPACE_SEPARATOR_PROPERTY , DEFAULT_NAMESPACE_SEPARATOR )
235- if not separator_from_properties :
236- raise ValueError ("Namespace separator cannot be an empty string" )
237- self ._namespace_separator = unquote (separator_from_properties )
238234
239235 def _create_session (self ) -> Session :
240236 """Create a request session with provided catalog configuration."""
@@ -389,6 +385,11 @@ def _fetch_config(self) -> None:
389385 # Update URI based on overrides
390386 self .uri = config [URI ]
391387
388+ separator_from_properties = self .properties .get (NAMESPACE_SEPARATOR_PROPERTY , DEFAULT_NAMESPACE_SEPARATOR )
389+ if not separator_from_properties :
390+ raise ValueError ("Namespace separator cannot be an empty string" )
391+ self ._namespace_separator = unquote (separator_from_properties )
392+
392393 def _identifier_to_validated_tuple (self , identifier : str | Identifier ) -> Identifier :
393394 identifier_tuple = self .identifier_to_tuple (identifier )
394395 if len (identifier_tuple ) <= 1 :
@@ -405,6 +406,7 @@ def _split_identifier_for_path(
405406 }
406407 identifier_tuple = self ._identifier_to_validated_tuple (identifier )
407408
409+ # Use quote to ensure that '/' aren't treated as path separators.
408410 return {
409411 "namespace" : self ._encode_namespace_path (identifier_tuple [:- 1 ]),
410412 kind .value : quote (identifier_tuple [- 1 ], safe = "" ),
0 commit comments