Skip to content

refactor: split URL specs without a private uproot API - #333

Merged
henryiii merged 1 commit into
mainfrom
refactor/own-spec-split
Nov 21, 2026
Merged

henryiii merged 1 commit into
mainfrom
refactor/own-spec-split

Conversation

@henryiii

@henryiii henryiii commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Remove the calls to the private uproot._util.file_object_path_split. split_spec now splits URLs too: at the first colon after the host and port, and before a query. A Windows drive in a file:///C:/ URL is not a separator. Local paths split as before.

Differences from the uproot function, on purpose:

  • No .root suffix is necessary before the colon. A directory URL with a key (osdf:///dir/:sub/f.root) and any suffix (also .ROOT, .root.1, which uproot 5.6 and 5.7 split differently) now split.
  • The split is at the first colon, not at the last .root:.
  • The key is not changed (uproot removes / at the ends and collapses //); Node.resolve already ignores these.

Known limits (these worked before):

  • A password in the userinfo (root://user:pass@host/f.root:T) splits at the password colon. fix: skip the userinfo of a URL in split_spec #334 fixes this.
  • A remote file name with a colon (https://host/a:b.root:T) splits at the first colon.
  • An fsspec chain splits correctly only if the key is in the last URL (simplecache::root://host/f.root:T), not as in zip://inner.root:T::https://host/a.zip.

A new test checks a list of URL specs and compares each with the uproot function where they agree.

Refs #322

split_spec now splits a URL at the first colon after the host and port.
The uproot backend no longer calls uproot._util.file_object_path_split.

Refs #322

Assisted-by: ClaudeCode:claude-opus-5-5
@henryiii
henryiii marked this pull request as ready for review November 21, 2026 02:09
@henryiii
henryiii merged commit 2ae889f into main Nov 21, 2026
12 checks passed
@henryiii
henryiii deleted the refactor/own-spec-split branch November 21, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant