pypi / huggingface-hub
huggingface-hub
What changed in huggingface-hub 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
5 breaking2 new APIs and options2 performance1 behavior and defaults1 tooling16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inithuggingface-hub 227 changes
Breaking changes 5
Prints one snapshot and exits by default instead of streaming until the job completes; use -f/--follow for live stats.
Listing a newly created empty bucket returns an empty list instead of raising FileNotFoundError.
Raises FileNotFoundError instead of ValueError when the checkpoint path does not exist.
Raises ValueError when given an empty list.
The CLI command was renamed from hf spaces zero-gpu-quota to hf spaces zero-gpu quota.
New APIs and options 2
Snapshot output supports json, agent, and quiet formats, which output the raw API metrics.
Adds a follow parameter defaulting to False, so the method returns the current sample; pass True to stream until the job completes.
Performance 2
Planning cache pruning no longer scales quadratically with the number of files per revision.
Planning cache removal no longer scales quadratically with the number of files per revision.
Behavior and default changes 1
Warns when allow or ignore patterns match no files.
Tooling 1
The package is now installed on Windows ARM64.
Fixes and other changes 16
Fixes a race that could skip the first scheduled push.
The CLI reads the file as UTF-8 and strips the BOM.
On Windows, quoted glob patterns are no longer expanded into local file names before reaching the command.
Without -f, logs no longer hang while the job keeps printing.
Prints [] when no job is running.
No longer fails when one of the requested jobs has finished.
Without -f, logs no longer hang while the job keeps printing.
Uploads existing paths containing glob characters as-is.
Concurrent downloads now see the resolved version, preventing parallel downloads from incorrectly skipping Xet.
With refresh=True, clears cached not-found results so newly created repos, branches, or buckets are recognized.
Clears cached not-found results for the specified path, so newly created repos, branches, or buckets are recognized.
Directory listings replace cached listings rather than append, avoiding duplicates, stale deleted files, and incorrect bucket-folder listings.
Card validation now respects the configured endpoint.
Redirect handling now considers the port.
The CLI reads the file as UTF-8 and strips the BOM.
Works offline with a pinned revision.