-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
requests.packages missing in types-requests 2.27.5 #6893
Comments
We removed it in #6859. That PR doesn't make clear why the copy in |
Yeah, that was what I saw as well, that it still seems to be in |
The original plan was to import the urllib3 stubs from |
The code example in this issue needs the same copy of urllib3 as requests uses internally, because it is suppressing a warning that requests generates while it is using its urllib3. I think we should add back |
The |
>>> import urllib3, requests.packages.urllib3
>>> requests.packages.urllib3 is urllib3
True |
types-requests removed urllib3 stubs and [have recommended](python/typeshed#6893 (comment)) to use types-urllib3 directly.
See python/typeshed#6893. The `request.packages.urllib3` module no longer has type stubs, but there are dedicated type stubs for `urllib3` that can be used instead.
* fix: CI yml name * add: mypy configuraion * add: type annotation to waybackpy modules * add: type annotation to test modules * fix: mypy command * add: types-requests to dev deps * fix: disable max-line-length * fix: move pytest.ini into setup.cfg * add: urllib3 to deps * fix: Retry (ref: python/typeshed#6893) * fix: f-string * fix: shorten long lines * add: staticmethod decorator to no-self-use methods * fix: str(headers)->headers_str * fix: error message * fix: revert "str(headers)->headers_str" and ignore assignment CaseInsensitiveDict with str * fix: mypy error
Closing per @andersk's comment. |
* remove dependency on urllib3 vendored in requests since it is not maintained anymore. See python/typeshed#6893 (comment) * new version of mypy does not require overloads for type checking * [skip] remove pragma comment
* remove dependency on urllib3 vendored in requests since it is not maintained anymore. See python/typeshed#6893 (comment) * new version of mypy does not require overloads for type checking * [skip] remove pragma comment
When moving from types-requests 2.26.3 to 2.27.5, the following code
now gets a type error in mypy,
error: Module has no attribute "packages"
I was able to fix the issuing by forcing mypy to use types-requests 2.26.3.
The text was updated successfully, but these errors were encountered: