question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python_type_check CI is broken: missing stubs for requests module

See original GitHub issue

🐛 Bug

The python_type_check CI is failing since mypy can’t find library stubs for requests module used here . This can be seen in the failed tests for the recent commit by @prabhat00155 (although those changes are completely unrelated to this) and on some other PRs like #4008 (edit: and #4010)

Pitch

A simple fix would be to install them with python3 -m pip install types-requests or to avoid something like this happening later we should just run mypy --install-types to install all the missing stubs.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
AnirudhDagarcommented, Jun 9, 2021

Closing this now, fixed with #4014.

2reactions
AnirudhDagarcommented, Jun 8, 2021

After digging up a bit more, I found that this sudden appearance is probably due to the mypy 0.900 release today.

According to the docs:

Starting in mypy 0.900, most third-party package stubs must be installed explicitly. This decouples mypy and stub versioning, allowing stubs to updated without updating mypy. This also allows stubs not originally included with mypy to be installed. Earlier mypy versions included a fixed set of stubs for third-party packages.

cc @NicolasHug @pmeier

Read more comments on GitHub >

github_iconTop Results From Across the Web

requests.packages missing in types-requests 2.27.5 #6893
When moving from types-requests 2.26.3 to 2.27.5, the following ... module is installed, but missing library stubs or py.typed marker #6894.
Read more >
Why is mypy finding "no type hints or library stubs" for any ...
This error is because mypy was not able to find the module you are trying to import, whether it comes bundled with type...
Read more >
Mypy 0.900 Released
Third-party Library Stubs in Stub Packages (Breaking Change). Mypy now only ships with type stubs for stdlib modules (plus typing_extensions and ...
Read more >
Using the Python Requests Module to Work with REST APIs
Initiate HTTP requests such as GET, PUT, POST, PATCH, and DELETE; Set HTTP headers to be used in the outgoing request; Store and...
Read more >
mypy library stubs not installed for
I'm running Mypy inside a gitlab CI/CD, and mypy can't find installed stubs, ... module is installed, but missing library stubs or py.typed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found