Skip to content

[Internal] Cap typer below 0.26.0 (CLI incompatibility)#4272

Merged
hanouticelina merged 1 commit into
mainfrom
fix-typer-upper-bound
May 26, 2026
Merged

[Internal] Cap typer below 0.26.0 (CLI incompatibility)#4272
hanouticelina merged 1 commit into
mainfrom
fix-typer-upper-bound

Conversation

@hanouticelina

@hanouticelina hanouticelina commented May 26, 2026

Copy link
Copy Markdown
Collaborator

from @hanouticelina : follow-up to #4270, typer broke other things as well 🙃

Summary

Cap typer to <0.26.0 in install_requires. Typer 0.26.0 (released 2026-05-26) vendored Click internally, which breaks the hf CLI in several ways:

  • Every --help invocation (e.g. hf jobs ps --help, hf spaces ls --help) prints help correctly but then dumps click.exceptions.Exit: 0 to stderr — typer now raises its vendored typer._click.exceptions.Exit, which our HFCliTyperGroup handling no longer catches.
  • The global formatting flags (--json, -q, --format, --no-truncate) are no longer intercepted by _consume_format_flags_for_leafhf jobs ps --json prints "No jobs found" instead of [], hf jobs ps -q prints the full human table, etc.
  • Bucket CLI tests, models ls / webhooks / papers tests fail on CI because of the above.

Local verification:

typer hf jobs ps --help hf jobs ps --json pytest tests/test_cli.py
0.26.0 dumps Exit(0) traceback "No jobs found" (wrong mode) many failures
0.25.1 clean exit [] 250 passed

This is a temporary cap. The real fix is to make HFCliTyperGroup (and the rest of the framework in _cli_utils.py / _help_formatter.py) compatible with typer 0.26.0's vendored-Click internals — happy to open a follow-up issue for that. For now this unblocks CI.


Note

Cursor Bugbot is generating a summary for commit 89afd0a. Configure here.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinact found unpinned actions in this repo.

Auto-fixable, but outside this PR's diff (run pinact run locally and commit):

  • .github/workflows/model_card_consistency_reminder.yml:15actions/checkout@v6actions/checkout@de0fac2e45… # v6.0.2
  • .github/workflows/python-prerelease.yml:34actions/checkout@v6actions/checkout@de0fac2e45… # v6.0.2
  • .github/workflows/python-quality.yml:23- actions/checkout@v6- actions/checkout@de0fac2e45… # v6.0.2
  • .github/workflows/python-quality.yml:25actions/setup-python@v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/python-tests.yml:22actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/python-tests.yml:57actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/python-tests.yml:174actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:293- actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6- actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:348- actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6- actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:435- actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6- actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:555- actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6- actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:690- actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6- actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/release.yml:1018actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/style-bot-action.yml:184actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/sync-hf-cli-skill.yml:17actions/checkout@v6actions/checkout@de0fac2e45… # v6.0.2
  • .github/workflows/sync-hf-cli-skill.yml:20actions/setup-python@v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/sync-hf-cli-skill.yml:46actions/create-github-app-token@v3actions/create-github-app-token@bcd2ba4921… # v3.2.0
  • .github/workflows/sync-hf-cli-skill.yml:53actions/checkout@v6actions/checkout@de0fac2e45… # v6.0.2
  • .github/workflows/sync-hf-cli-skill.yml:60astral-sh/setup-uv@v7astral-sh/setup-uv@37802adc94… # v7.6.0
  • .github/workflows/sync-hf-cli-skill.yml:86peter-evans/create-pull-request@v8peter-evans/create-pull-request@5f6978faf0… # v8.1.1
  • .github/workflows/build_repocard_examples.yaml:18actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/update-inference-types.yaml:22actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6actions/setup-python@a309ff8b42… # v6.2.0
  • .github/workflows/update-inference-types.yaml:37- actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6- actions/setup-node@48b55a011b… # v6.4.0
  • .github/workflows/update-inference-types.yaml:71peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8peter-evans/create-pull-request@5f6978faf0… # v8.1.1

@hanouticelina hanouticelina changed the title [CI] Cap typer below 0.26.0 (CLI incompatibility) [Internal] Cap typer below 0.26.0 (CLI incompatibility) May 26, 2026
@hanouticelina hanouticelina merged commit e243fcd into main May 26, 2026
24 of 26 checks passed
@hanouticelina hanouticelina deleted the fix-typer-upper-bound branch May 26, 2026 17:01
@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.16.3 release.

@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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