Hugging Face released huggingface_hub v2.0.0 on 2026-09-24: the HTTP stack switches from httpx/httpcore to httpx2/httpcore2, so custom client factories and transport except clauses must use the new types; all 1.x deprecated APIs (upload_large_folder, huggingface-cli, etc.) are removed with an official migration guide.

Key Takeaways

  • ✓Breaking: clients/exceptions come from httpx2/httpcore2 (release v2.0.0)
  • ✓Compat import: `from huggingface_hub.utils import get_session, httpx` (works from v1.30.0)
  • ✓OS trust store by default; loggers `httpx2`/`httpcore2`; oauth needs authlib>=1.8.0
  • ✓Removed APIs: upload_large_folder→upload_folder, huggingface-cli→hf, etc.
  • ✓Upgrade: `pip install -U "huggingface_hub>=2.0.0"` + migration guide
🔬

In-Depth Technical Analysis

Background

Most HF Python tooling talks to the Hub through huggingface_hub. Carrying an old HTTP stack plus many deprecated APIs forced repeated workarounds. v2.0.0 swaps the HTTP layer and deletes the deprecated surface in one cut.

Architecture

Clients and transport exceptions now come from httpx2/httpcore2. Custom factories and except clauses must use the new types. For dual support with ≥1.30.0, import get_session and compatibility httpx from huggingface_hub.utils. httpx2 uses the OS trust store by default; loggers are httpx2/httpcore2; oauth extra needs authlib≥1.8.0.

Benchmarks

No official throughput/SWE numbers—this is an API/dependency break. Verified: GitHub release published 2026-09-24T11:35:51Z; PyPI latest is 2.0.0.

Get started

pip install -U "huggingface_hub>=2.0.0", follow the migration guide, rename removed APIs, and update CLI invocations to hf.