Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin CI version of click to resolve mypy error #2769

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Jul 12, 2023

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#2559 pallets/click#2562 python/mypy#13449

@zanieb zanieb requested a review from tomchristie July 12, 2023 00:51
@Kludex
Copy link
Sponsor Member

Kludex commented Jul 12, 2023

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

@zanieb
Copy link
Contributor Author

zanieb commented Jul 12, 2023

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.

@tomchristie
Copy link
Member

tomchristie commented Jul 12, 2023

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
Contributor Author

zanieb commented Jul 12, 2023

@tomchristie done!

@zanieb zanieb changed the title Add upper bound to click version to fix mypy error Pin CI version of click to resolve mypy error Jul 12, 2023
@zanieb zanieb merged commit 2c49a15 into master Jul 12, 2023
5 checks passed
@zanieb zanieb deleted the ci/click-version branch July 12, 2023 14:07
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.

None yet

3 participants