Repository navigation
Update urllib3.exceptions stubs #6865
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
369e761
Update urllib3.exceptions stubs
jpy-git 300ffdd
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git f0a268f
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 4bec3ee
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 4a1e5f0
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 9a4539f
update `reason` instance attribute type
jpy-git 01fbea1
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 3519d4a
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 6235978
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git 6b3eeb7
Update stubs/urllib3/urllib3/exceptions.pyi
jpy-git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,87 @@ | ||
| from email.errors import MessageDefect | ||
| from http.client import IncompleteRead as httplib_IncompleteRead | ||
| from typing import Any | ||
|
|
||
| from urllib3.connectionpool import ConnectionPool, HTTPResponse | ||
| from urllib3.util.retry import Retry | ||
|
|
||
| class HTTPError(Exception): ... | ||
| class HTTPWarning(Warning): ... | ||
|
|
||
| class PoolError(HTTPError): | ||
| pool: Any | ||
| def __init__(self, pool, message) -> None: ... | ||
| def __reduce__(self): ... | ||
| pool: ConnectionPool | ||
| def __init__(self, pool: ConnectionPool, message: str) -> None: ... | ||
|
|
||
| class RequestError(PoolError): | ||
| url: Any | ||
| def __init__(self, pool, url, message) -> None: ... | ||
| def __reduce__(self): ... | ||
| url: str | ||
| def __init__(self, pool: ConnectionPool, url: str, message: str) -> None: ... | ||
|
jpy-git marked this conversation as resolved.
|
||
|
|
||
| class SSLError(HTTPError): ... | ||
| class ProxyError(HTTPError): ... | ||
|
|
||
| class ProxyError(HTTPError): | ||
| original_error: Exception | ||
| def __init__(self, message: str, error: Exception, *args: Any) -> None: ... | ||
|
|
||
| class DecodeError(HTTPError): ... | ||
| class ProtocolError(HTTPError): ... | ||
|
|
||
| ConnectionError: Any | ||
| ConnectionError = ProtocolError | ||
|
|
||
| class MaxRetryError(RequestError): | ||
| reason: Any | ||
| def __init__(self, pool, url, reason=...) -> None: ... | ||
| reason: Exception | None | ||
| def __init__(self, pool: ConnectionPool, url: str, reason: Exception | None = ...) -> None: ... | ||
|
|
||
| class HostChangedError(RequestError): | ||
| retries: Any | ||
| def __init__(self, pool, url, retries=...) -> None: ... | ||
| retries: Retry | int | ||
| def __init__(self, pool: ConnectionPool, url: str, retries: Retry | int = ...) -> None: ... | ||
|
|
||
| class TimeoutStateError(HTTPError): ... | ||
| class TimeoutError(HTTPError): ... | ||
| class ReadTimeoutError(TimeoutError, RequestError): ... | ||
| class ConnectTimeoutError(TimeoutError): ... | ||
| class NewConnectionError(ConnectTimeoutError, HTTPError): ... | ||
| class EmptyPoolError(PoolError): ... | ||
| class ClosedPoolError(PoolError): ... | ||
| class LocationValueError(ValueError, HTTPError): ... | ||
|
|
||
| class LocationParseError(LocationValueError): | ||
| location: Any | ||
| def __init__(self, location) -> None: ... | ||
| location: str | ||
| def __init__(self, location: str) -> None: ... | ||
|
jpy-git marked this conversation as resolved.
|
||
|
|
||
| class URLSchemeUnknown(LocationValueError): | ||
| scheme: str | ||
| def __init__(self, scheme: str) -> None: ... | ||
|
jpy-git marked this conversation as resolved.
|
||
|
|
||
| class ResponseError(HTTPError): | ||
| GENERIC_ERROR: Any | ||
| SPECIFIC_ERROR: Any | ||
| GENERIC_ERROR: str | ||
| SPECIFIC_ERROR: str | ||
|
|
||
| class SecurityWarning(HTTPWarning): ... | ||
| class SubjectAltNameWarning(SecurityWarning): ... | ||
| class InsecureRequestWarning(SecurityWarning): ... | ||
| class SystemTimeWarning(SecurityWarning): ... | ||
| class InsecurePlatformWarning(SecurityWarning): ... | ||
| class SNIMissingWarning(HTTPWarning): ... | ||
| class DependencyWarning(HTTPWarning): ... | ||
| class ResponseNotChunked(ProtocolError, ValueError): ... | ||
| class BodyNotHttplibCompatible(HTTPError): ... | ||
|
|
||
| class IncompleteRead(HTTPError, httplib_IncompleteRead): | ||
| def __init__(self, partial: bytes, expected: int | None) -> None: ... | ||
|
|
||
| class InvalidChunkLength(HTTPError, httplib_IncompleteRead): | ||
| response: HTTPResponse | ||
| length: bytes | ||
| def __init__(self, response: HTTPResponse, length: bytes) -> None: ... | ||
|
|
||
| class InvalidHeader(HTTPError): ... | ||
|
|
||
| class ProxySchemeUnknown(AssertionError, URLSchemeUnknown): | ||
| def __init__(self, scheme: str | None) -> None: ... | ||
|
|
||
| class ProxySchemeUnsupported(ValueError): ... | ||
|
|
||
| class HeaderParsingError(HTTPError): | ||
| def __init__(self, defects: list[MessageDefect], unparsed_data: str | bytes | None) -> None: ... | ||
|
|
||
| class UnrewindableBodyError(HTTPError): ... | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.