8000 `urllib3`: move stubs for `ssl_match_hostname` around (#10117) · python/typeshed@e0db6d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e0db6d2

Browse files
authored
urllib3: move stubs for ssl_match_hostname around (#10117)
1 parent 6f6b1c9 commit e0db6d2

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

stubs/urllib3/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ urllib3.connectionpool.HTTPConnectionPool.urlopen
1414
urllib3.connectionpool.HTTPSConnectionPool.__init__
1515
urllib3.connectionpool.VerifiedHTTPSConnection.__init__
1616
urllib3.connectionpool.VerifiedHTTPSConnection.set_cert
17-
urllib3.packages.ssl_match_hostname
18-
urllib3.packages.ssl_match_hostname._implementation
1917
urllib3.poolmanager.PoolManager.connection_from_host
2018
urllib3.poolmanager.PoolManager.connection_from_url
2119
urllib3.poolmanager.PoolManager.urlopen

stubs/urllib3/urllib3/connection.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ from http.client import HTTPConnection as _HTTPConnection, HTTPException as HTTP
44
from typing import Any
55

66
from . import exceptions, util
7-
from .packages import ssl_match_hostname
8-
from .util import ssl_
7+
from .util import ssl_, ssl_match_hostname
98

109
class DummyConnection: ...
1110

stubs/urllib3/urllib3/connectionpool.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ from typing_extensions import Literal, Self, TypeAlias
77

88
from . import connection, exceptions, request, response
99
from .connection import BaseSSLError as BaseSSLError, ConnectionError as ConnectionError, HTTPException as HTTPException
10-
from .packages import ssl_match_hostname
11-
from .util import Url, connection as _connection, queue as urllib3queue, retry, timeout, url
10+
from .util import Url, connection as _connection, queue as urllib3queue, retry, ssl_match_hostname, timeout, url
1211

1312
ClosedPoolError = exceptions.ClosedPoolError
1413
ProtocolError = exceptions.ProtocolError

stubs/urllib3/urllib3/packages/ssl_match_hostname/__init__.pyi

Lines changed: 0 additions & 4 deletions
This file was deleted.

stubs/urllib3/urllib3/packages/ssl_match_hostname/_implementation.pyi

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from ssl import _PeerCertRetDictType
2+
from typing_extensions import Final
3+
4+
__version__: Final[str]
5+
6+
class CertificateError(ValueError): ...
7+
8+
def match_hostname(cert: _PeerCertRetDictType, hostname: str) -> None: ...

0 commit comments

Comments
 (0)
0