Skip to content

Comments

fix: pin click>=8.1 to prevent Python 3.14/Homebrew env isolation crash#1648

Merged
mnriem merged 2 commits intogithub:mainfrom
mnriem:fix/click-version-pin-for-python314
Feb 20, 2026
Merged

fix: pin click>=8.1 to prevent Python 3.14/Homebrew env isolation crash#1648
mnriem merged 2 commits intogithub:mainfrom
mnriem:fix/click-version-pin-for-python314

Conversation

@mnriem
Copy link
Collaborator

@mnriem mnriem commented Feb 20, 2026

Problem

Fixes #1631.

When installing specify-cli via uv on macOS with Homebrew Python 3.14, the uv virtual environment can fail to fully isolate from Homebrew's system site-packages. If the system click package is older than 8.1, it gets loaded instead of the version uv installed, causing:

TypeError: ParamType.get_metavar() got an unexpected keyword argument 'ctx'

typer 0.24.0 calls ParamType.get_metavar(ctx= the ctxkeyword argument was added in **click 8.1**. Any older click bleeds through and crashes immediately onspecify init --help.ctx)

Fix

Add an explicit click>=8.1 dependency to pyproject.toml. This gives uv (and pip) a hard lower-bound constraint so a compatible version is always resolved and installed, regardless of what the system Python environment contains.

Changes

  • pyproject.toml: add click>=8.1 dependency, bump version to 0.1.2
  • CHANGELOG.md: document the fix

…lures

Fixes github#1631. When uv installs specify-cli on macOS with Homebrew Python
3.14, the virtual environment can fail to fully isolate from the system
site-packages, causing Homebrew's click to be loaded instead of the one
uv installed. If that system click is older than 8.1, it lacks the `ctx`
keyword argument in `ParamType.get_metavar()`, which typer 0.24.0 requires,
resulting in:

  TypeError: ParamType.get_metavar() got an unexpected keyword argument 'ctx'

Adding an explicit `click>=8.1` dependency gives uv a hard constraint so
the correct version is always resolved and installed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 16:13
@mnriem mnriem self-assigned this Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent a TypeError crash on macOS/Homebrew Python 3.14 installs by explicitly requiring a Click version new enough for Typer’s help rendering path.

Changes:

  • Bump specify-cli version from 0.1.1 to 0.1.2.
  • Add an explicit runtime dependency click>=8.1.
  • Document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Adds click>=8.1 to runtime deps and bumps package version to 0.1.2.
CHANGELOG.md Adds a 0.1.2 entry describing the Click lower-bound fix for the Python 3.14/Homebrew scenario.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 16:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem mnriem merged commit 6fca5d8 into github:main Feb 20, 2026
12 checks passed
@mnriem mnriem deleted the fix/click-version-pin-for-python314 branch February 20, 2026 16:22
markhazleton pushed a commit to markhazleton/spec-kit that referenced this pull request Feb 20, 2026
…sh (github#1648)

* fix: pin click>=8.1 to prevent Python 3.14/Homebrew env isolation failures

Fixes github#1631. When uv installs specify-cli on macOS with Homebrew Python
3.14, the virtual environment can fail to fully isolate from the system
site-packages, causing Homebrew's click to be loaded instead of the one
uv installed. If that system click is older than 8.1, it lacks the `ctx`
keyword argument in `ParamType.get_metavar()`, which typer 0.24.0 requires,
resulting in:

  TypeError: ParamType.get_metavar() got an unexpected keyword argument 'ctx'

Adding an explicit `click>=8.1` dependency gives uv a hard constraint so
the correct version is always resolved and installed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Help message breakage?

1 participant