You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REST: list_namespaces double-encodes the parent namespace query parameter聽#4111
RestCatalog.list_namespaces(parent) URL-encodes each part of the parent namespace with quote() (via _encode_namespace_path) and then hands the result to requests as a query parameter, which encodes it again. Any namespace part that contains a space, /, % or a non-ASCII character is therefore sent double-encoded, and the server looks up the wrong parent namespace (typically a 404 / NoSuchNamespaceError, or an empty listing).
This started when list_namespaces moved from building the query string by hand to params= in #3347.
Expected: after the server decodes the query string, parent is the namespace parts joined by the namespace separator (my namespace, dept/finance, ...). This is what the Java client sends: RESTUtil.namespaceToQueryParam joins the raw levels with the separator and leaves encoding to the HTTP client, and the server parses the value with RESTUtil.namespaceFromQueryParam without decoding it again.
Actual: the server receives my%20namespace, dept%2Ffinance, and so on. Plain ASCII names such as accounting are unaffected, which is why the existing tests pass.
Environment: pyiceberg main (b32392d), Python 3.12.13, requests 2.34.2, macOS.
Activity