Skip to content

requests.packages.urllib3.exceptions stubs are incomplete (e.g. SNIMissingWarning is missing) #6054

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

Closed
rogalski opened this issue Sep 20, 2021 · 2 comments · Fixed by #6865
Closed
Labels
stubs: incomplete Annotations or sub-modules missing from an existing package or module

Comments

@rogalski
Copy link

from requests.packages.urllib3.exceptions import SNIMissingWarning is valid import.
It's part of module public API: https://github.com/urllib3/urllib3/blob/d8eabf304190c62766e05c79ef44be7ff94cfbcb/src/urllib3/exceptions.py#L260

Yet mypy complains: error: Module "requests.packages.urllib3.exceptions" has no attribute "SNIMissingWarning" [attr-defined]

@srittau srittau added the stubs: incomplete Annotations or sub-modules missing from an existing package or module label Sep 20, 2021
@srittau
Copy link
Collaborator

srittau commented Sep 20, 2021

Any contributions are welcome!

@srittau
Copy link
Collaborator

srittau commented Jan 8, 2022

We have decided to remove the requests.packages.urllib3 sub-package and are instead concentrating on creating proper urllib3 stubs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: incomplete Annotations or sub-modules missing from an existing package or module
Projects
None yet
2 participants