Skip to content

Pin Click to version 8.1.8#2440

Merged
jemrobinson merged 1 commit into
alan-turing-institute:developfrom
llewelld:2439-fix-click
Jun 27, 2025
Merged

Pin Click to version 8.1.8#2440
jemrobinson merged 1 commit into
alan-turing-institute:developfrom
llewelld:2439-fix-click

Conversation

@llewelld

@llewelld llewelld commented May 15, 2025

Copy link
Copy Markdown
Contributor

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).

🚦 Depends on

⤴️ Summary

DSH currently has Typer pinned to version 0.15.2. Typer has Click as a dependency, but Typer 0.15.2 doesn't pin the Click version. Installing Typer 0.15.2 therefore, by default, results in Click 8.2.0 being installed (the latest version of Click as of now).

Unfortunately Typer 0.15.2 isn't compatible with Click 8.2.0. This change therefore pins Click to 8.1.8 in order to retain compatibility. Without this fix, calling "dsh --help" on a clean install results in an error.

Note that an alternative solution would be to upgrade the pinned version of Typer to 0.15.4, see Issue #1215 in the Typer repository. I didn't go down this route because I thought this would probably need more robust testing. But it's probably the better option.

🌂 Related issues

Closes #2439

🔬 Tests

I've not tested this change. I've only performed a preliminary test by installing this version of Click manually in a virtual environment:

python3.12 -m venv venv
. ./venv/bin/activate
pip install --upgrade pip
pip install click==8.1.8
pip install data-safe-haven

DSH currently has Typer fixed to version 0.15.2. Typer has Click as a
dependency, but Typer 0.15.2 doesn't fix the Click version. Installing
Typer 0.15.2 therefore, by default, results in Click 8.2.0 being
installed (the latest version of Click as of now).

Unfortunately Typer 0.15.2 isn't compatible with Click 8.2.0. This
change therefore fixes Click to 8.1.8 in order to retain compatibility.
Without this fix, calling "dsh --help" on a clean install results in an
error.

Fixes alan-turing-institute#2439
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@llewelld llewelld changed the title Fix Click to version 8.1.8 Pin Click to version 8.1.8 May 15, 2025
@JimMadge
JimMadge requested a review from cptanalatriste May 19, 2025 09:45
@JimMadge

Copy link
Copy Markdown
Member

@cptanalatriste can you check this issue and fix?

@cptanalatriste

Copy link
Copy Markdown
Contributor

@JimMadge , I'm not able to reproduce the original issue (#2439 ). At the moment I do not have bandwidth to look into it, but I'll investigate once I have availability.

@jemrobinson jemrobinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@jemrobinson
jemrobinson merged commit 8039389 into alan-turing-institute:develop Jun 27, 2025
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.

TypeError "missing 1 required positional argument: 'ctx'" running "dsh --help" on clean install

4 participants