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

Fix "library stubs not installed" mypy error #924

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

brunoapimentel
Copy link
Contributor

After merging #920, mypy started to fail with:

'Library stubs not installed for "requests.packages.urllib3.util.retry"'

Looking at the requests source code, it seems that urllib3 is imported ad-hoc in the packages module, so changing the import to urllib3 directly solved the issue.

I still don't know what caused it originally, since the merge request was just a bump to the 'packaging' library.

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • New code has type annotations
  • OpenAPI schema is updated (if applicable)
  • DB schema change has corresponding DB migration (if applicable)
  • README updated (if worker configuration changed, or if applicable)
  • Draft release notes are updated before merging

After merging containerbuildsystem#920,
mypy started to fail with:

'Library stubs not installed for "requests.packages.urllib3.util.retry"'

Looking at the requests source code, it seems that urllib3 is imported
ad-hoc in the packages module, so changing the import to urllib3
directly solved the issue.

I still don't know what caused it originally, since the merge request
was just a bump to the 'packaging' library.

Signed-off-by: Bruno Pimentel <bpimente@redhat.com>
@mike-kingsbury
Copy link
Contributor

👍 Just solved it the same way for my PR.....

@brunoapimentel brunoapimentel added this pull request to the merge queue Oct 17, 2023
Merged via the queue into containerbuildsystem:master with commit 51f1967 Oct 17, 2023
14 checks passed
@brunoapimentel brunoapimentel deleted the fix-ci branch October 17, 2023 19:42
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.

3 participants