Skip to content

Pin CI version of click to resolve mypy error - #2769

Merged
zanieb merged 3 commits into
masterfrom
ci/click-version
Jul 12, 2023
Merged

Pin CI version of click to resolve mypy error#2769
zanieb merged 3 commits into
masterfrom
ci/click-version

Conversation

@zanieb

@zaniebzanieb commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

CI is failing (e.g. #2768) because of a mypy/click bug ref pallets/click#2558

❯ mypy httpx
httpx/_main.py:308: error: Argument 1 has incompatible type "Callable[[str, str, list[tuple[str, str]], str, list[tuple[str, str]], list[tuple[str, File]], str, list[tuple[str, str]], list[tuple[str, str]], tuple[str, str] | None, str, float, bool, bool, bool, BinaryIO | None, bool], None]"; expected <nothing> [arg-type]
Found 1 error in 1 file (checked 24 source files)

This is resolves the type error by temporarily adding a bound to the supported click version and can be reverted once the bug is fixed upstream.

Additional refs pallets/click#2559pallets/click#2562python/mypy#13449

@Kludex

Copy link
Copy Markdown
Contributor

It looks like a release in click will happen soon, fyi

@zanieb

Copy link
Copy Markdown
ContributorAuthor

I tried the linked pull request locally and it didn't work — figure we might as well be unblocked in the meantime but don't have strong feelings.

@lovelydinosaur

lovelydinosaur commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

Ah well caught.

We'd probably want to resolve a CI failure by pinning in requirements.txt, rather than in our packaging.

figure we might as well be unblocked in the meantime

Yep.

@zanieb

Copy link
Copy Markdown
ContributorAuthor

@tomchristie done!

@zaniebzanieb changed the title Add upper bound to click version to fix mypy errorPin CI version of click to resolve mypy errorJul 12, 2023
@zanieb
zanieb merged commit 2c49a15 into masterJul 12, 2023
@zanieb
zanieb deleted the ci/click-version branch July 12, 2023 14:07
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
* Add upper bound to click version to fix mypy error
* Move pin to `requirements.txt`
* Restore `pyproject.toml`
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@zanieb@Kludex@lovelydinosaur