basedpyright 1.31.7-8064362195d32e67ab0ff5fd0052429de44e1f90 → 1.31.7-8ac5a72630dcfd427279146821828b85ee246732
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/ast.pyi +29 -10
- package/dist/typeshed-fallback/stdlib/builtins.pyi +79 -62
- package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/copy.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +4 -9
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/operator.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/pdb.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +160 -69
- package/dist/typeshed-fallback/stdlib/turtle.pyi +18 -14
- package/dist/typeshed-fallback/stdlib/types.pyi +21 -16
- package/dist/typeshed-fallback/stdlib/typing.pyi +11 -2
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +16 -3
- package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +3 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +7 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +6 -4
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/constants.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi +2 -21
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_cdev.pyi +11 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pin_data.pyi +22 -3
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pinmux_lookup.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/PySocks/sockshandler.pyi +0 -5
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +15 -4
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +11 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi +13 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi +8 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi +18 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +4 -3
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +2 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/receiver.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/sender.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transaction_us_bank_account_request.pyi +17 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transfer.pyi +4 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/us_bank_account_verification.pyi +1 -0
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +36 -5
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/func.pyi +45 -10
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/keys.pyi +2 -2
- package/dist/typeshed-fallback/stubs/django-filter/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/django-filter/django_filters/filters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/swarm.pyi +12 -9
- package/dist/typeshed-fallback/stubs/docker/docker/credentials/store.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +9 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/services.pyi +4 -6
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipeconn.pyi +16 -16
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipesocket.pyi +40 -32
- package/dist/typeshed-fallback/stubs/docker/docker/transport/sshconn.pyi +30 -24
- package/dist/typeshed-fallback/stubs/docker/docker/transport/unixconn.pyi +22 -19
- package/dist/typeshed-fallback/stubs/docker/docker/types/networks.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/types/services.pyi +16 -10
- package/dist/typeshed-fallback/stubs/docker/docker/types/swarm.pyi +2 -7
- package/dist/typeshed-fallback/stubs/docker/docker/utils/decorators.pyi +8 -4
- package/dist/typeshed-fallback/stubs/docker/docker/utils/utils.pyi +4 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +2 -2
- package/dist/typeshed-fallback/stubs/flake8-rst-docstrings/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/grpcio/grpc/__init__.pyi +32 -34
- package/dist/typeshed-fallback/stubs/grpcio/grpc/aio/__init__.pyi +40 -21
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/base.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +0 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/config.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/glogging.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/message.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/unreader.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/wsgi.pyi +0 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/instrument/statsd.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/reloader.pyi +1 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/sock.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/geventlet.pyi +1 -8
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/ggevent.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/gtornado.pyi +1 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/sync.pyi +0 -3
- package/dist/typeshed-fallback/stubs/html5lib/html5lib/html5parser.pyi +5 -5
- package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/exceptions.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +11 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +4 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +10 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +26 -19
- package/dist/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +8 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +10 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +22 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/rcm.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stubs/psycopg2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +3 -0
- package/dist/typeshed-fallback/stubs/pyserial/serial/rfc2217.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports_windows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/urlhandler/protocol_spy.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/rrule.pyi +30 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32pipe.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/www-authenticate/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/www-authenticate/www_authenticate.pyi +34 -0
- package/dist/typeshed-fallback/stubs/xlrd/xlrd/sheet.pyi +5 -5
- package/dist/typeshed-fallback/stubs/xmldiff/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/actions.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff.pyi +36 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff_match_patch.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/formatting.pyi +80 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/main.pyi +70 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/patch.pyi +12 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/utils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/common.pyi +48 -32
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonmistakes.pyi +5 -3
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonprotocols.pyi +5 -3
- package/package.json +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import socket
|
|
2
|
-
|
|
2
|
+
import subprocess
|
|
3
3
|
|
|
4
4
|
import urllib3
|
|
5
5
|
import urllib3.connection
|
|
6
6
|
from docker.transport.basehttpadapter import BaseHTTPAdapter
|
|
7
|
+
from paramiko import SSHClient, Transport
|
|
8
|
+
from urllib3._collections import RecentlyUsedContainer as urllib3_RecentlyUsedContainer
|
|
7
9
|
|
|
8
|
-
RecentlyUsedContainer
|
|
10
|
+
RecentlyUsedContainer = urllib3_RecentlyUsedContainer
|
|
9
11
|
|
|
10
12
|
class SSHSocket(socket.socket):
|
|
11
|
-
host:
|
|
12
|
-
port:
|
|
13
|
-
user:
|
|
14
|
-
proc:
|
|
15
|
-
def __init__(self, host) -> None: ...
|
|
13
|
+
host: str
|
|
14
|
+
port: str | None
|
|
15
|
+
user: str | None
|
|
16
|
+
proc: subprocess.Popen[bytes] | None
|
|
17
|
+
def __init__(self, host: str) -> None: ...
|
|
16
18
|
def connect(self, **kwargs) -> None: ... # type:ignore[override]
|
|
17
19
|
def sendall(self, data) -> None: ... # type:ignore[override]
|
|
18
20
|
def send(self, data): ... # type:ignore[override]
|
|
@@ -21,27 +23,31 @@ class SSHSocket(socket.socket):
|
|
|
21
23
|
def close(self) -> None: ...
|
|
22
24
|
|
|
23
25
|
class SSHConnection(urllib3.connection.HTTPConnection):
|
|
24
|
-
ssh_transport:
|
|
25
|
-
timeout:
|
|
26
|
-
ssh_host:
|
|
27
|
-
def __init__(self, ssh_transport=None, timeout: int = 60, host=None) -> None: ...
|
|
28
|
-
sock:
|
|
26
|
+
ssh_transport: Transport | None
|
|
27
|
+
timeout: int
|
|
28
|
+
ssh_host: str | None
|
|
29
|
+
def __init__(self, ssh_transport: Transport | None = None, timeout: int = 60, host: str | None = None) -> None: ...
|
|
30
|
+
sock: SSHSocket | None
|
|
29
31
|
def connect(self) -> None: ...
|
|
30
32
|
|
|
31
33
|
class SSHConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
|
|
32
34
|
scheme: str
|
|
33
|
-
ssh_transport:
|
|
34
|
-
timeout:
|
|
35
|
-
ssh_host:
|
|
36
|
-
def __init__(
|
|
35
|
+
ssh_transport: Transport | None
|
|
36
|
+
timeout: urllib3.Timeout
|
|
37
|
+
ssh_host: str | None
|
|
38
|
+
def __init__(
|
|
39
|
+
self, ssh_client: SSHClient | None = None, timeout: int = 60, maxsize: int = 10, host: str | None = None
|
|
40
|
+
) -> None: ...
|
|
37
41
|
|
|
38
42
|
class SSHHTTPAdapter(BaseHTTPAdapter):
|
|
39
|
-
__attrs__:
|
|
40
|
-
ssh_client:
|
|
41
|
-
ssh_host:
|
|
42
|
-
timeout:
|
|
43
|
-
max_pool_size:
|
|
44
|
-
pools:
|
|
45
|
-
def __init__(
|
|
46
|
-
|
|
43
|
+
__attrs__: list[str]
|
|
44
|
+
ssh_client: SSHClient | None
|
|
45
|
+
ssh_host: str
|
|
46
|
+
timeout: int
|
|
47
|
+
max_pool_size: int
|
|
48
|
+
pools: int
|
|
49
|
+
def __init__(
|
|
50
|
+
self, base_url: str, timeout: int = 60, pool_connections: int = 25, max_pool_size: int = 10, shell_out: bool = False
|
|
51
|
+
) -> None: ...
|
|
52
|
+
def get_connection(self, url: str | bytes, proxies=None) -> SSHConnectionPool: ...
|
|
47
53
|
def close(self) -> None: ...
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import socket
|
|
2
2
|
|
|
3
3
|
import urllib3
|
|
4
4
|
import urllib3.connection
|
|
5
5
|
from docker.transport.basehttpadapter import BaseHTTPAdapter
|
|
6
|
+
from requests import PreparedRequest
|
|
7
|
+
from urllib3._collections import RecentlyUsedContainer as urllib3_RecentlyUsedContainer
|
|
6
8
|
|
|
7
|
-
RecentlyUsedContainer
|
|
9
|
+
RecentlyUsedContainer = urllib3_RecentlyUsedContainer
|
|
8
10
|
|
|
9
11
|
class UnixHTTPConnection(urllib3.connection.HTTPConnection):
|
|
10
|
-
base_url:
|
|
11
|
-
unix_socket:
|
|
12
|
-
timeout:
|
|
13
|
-
def __init__(self, base_url, unix_socket, timeout: int = 60) -> None: ...
|
|
14
|
-
sock:
|
|
12
|
+
base_url: str
|
|
13
|
+
unix_socket: str
|
|
14
|
+
timeout: int
|
|
15
|
+
def __init__(self, base_url: str, unix_socket: str, timeout: int = 60) -> None: ...
|
|
16
|
+
sock: socket.socket | None
|
|
15
17
|
def connect(self) -> None: ...
|
|
16
18
|
|
|
17
19
|
class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
|
|
18
|
-
base_url:
|
|
19
|
-
socket_path:
|
|
20
|
-
timeout:
|
|
21
|
-
def __init__(self, base_url, socket_path, timeout: int = 60, maxsize: int = 10) -> None: ...
|
|
20
|
+
base_url: str
|
|
21
|
+
socket_path: str
|
|
22
|
+
timeout: urllib3.Timeout
|
|
23
|
+
def __init__(self, base_url: str, socket_path: str, timeout: int = 60, maxsize: int = 10) -> None: ...
|
|
22
24
|
|
|
23
25
|
class UnixHTTPAdapter(BaseHTTPAdapter):
|
|
24
|
-
__attrs__:
|
|
25
|
-
socket_path:
|
|
26
|
-
timeout:
|
|
27
|
-
max_pool_size:
|
|
28
|
-
pools:
|
|
29
|
-
def __init__(self, socket_url, timeout: int = 60, pool_connections=25, max_pool_size=10) -> None: ...
|
|
30
|
-
def get_connection(self, url, proxies=None): ...
|
|
31
|
-
|
|
26
|
+
__attrs__: list[str]
|
|
27
|
+
socket_path: str
|
|
28
|
+
timeout: int
|
|
29
|
+
max_pool_size: int
|
|
30
|
+
pools: RecentlyUsedContainer
|
|
31
|
+
def __init__(self, socket_url: str, timeout: int = 60, pool_connections: int = 25, max_pool_size: int = 10) -> None: ...
|
|
32
|
+
def get_connection(self, url: bytes | str, proxies=None) -> UnixHTTPConnectionPool: ...
|
|
33
|
+
# proxies is unused
|
|
34
|
+
def request_url(self, request: PreparedRequest, proxies) -> str: ...
|
|
@@ -5,7 +5,7 @@ class EndpointConfig(dict[str, Incomplete]):
|
|
|
5
5
|
def __init__(
|
|
6
6
|
self,
|
|
7
7
|
version: str,
|
|
8
|
-
aliases: list[
|
|
8
|
+
aliases: list[str] | None = None,
|
|
9
9
|
links: dict[str, str] | dict[str, None] | dict[str, str | None] | Iterable[tuple[str, str | None]] | None = None,
|
|
10
10
|
ipv4_address: str | None = None,
|
|
11
11
|
ipv6_address: str | None = None,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from collections.abc import Iterable, Mapping
|
|
3
|
-
from typing import Final, Literal, TypeVar, overload
|
|
3
|
+
from typing import Final, Literal, TypedDict, TypeVar, overload
|
|
4
4
|
|
|
5
5
|
from .healthcheck import Healthcheck
|
|
6
6
|
|
|
@@ -36,12 +36,12 @@ class ContainerSpec(dict[str, Incomplete]):
|
|
|
36
36
|
env: dict[str, Incomplete] | list[str] | None = None,
|
|
37
37
|
workdir: str | None = None,
|
|
38
38
|
user: str | None = None,
|
|
39
|
-
labels: dict[
|
|
39
|
+
labels: dict[str, str] | None = None,
|
|
40
40
|
mounts: Iterable[str | Mount] | None = None,
|
|
41
41
|
stop_grace_period: int | None = None,
|
|
42
42
|
secrets: list[SecretReference] | None = None,
|
|
43
43
|
tty: bool | None = None,
|
|
44
|
-
groups: list[
|
|
44
|
+
groups: list[str] | None = None,
|
|
45
45
|
open_stdin: bool | None = None,
|
|
46
46
|
read_only: bool | None = None,
|
|
47
47
|
stop_signal: str | None = None,
|
|
@@ -52,9 +52,9 @@ class ContainerSpec(dict[str, Incomplete]):
|
|
|
52
52
|
privileges: Privileges | None = None,
|
|
53
53
|
isolation: str | None = None,
|
|
54
54
|
init: bool | None = None,
|
|
55
|
-
cap_add: list[
|
|
56
|
-
cap_drop: list[
|
|
57
|
-
sysctls: dict[str,
|
|
55
|
+
cap_add: list[str] | None = None,
|
|
56
|
+
cap_drop: list[str] | None = None,
|
|
57
|
+
sysctls: dict[str, str] | None = None,
|
|
58
58
|
) -> None: ...
|
|
59
59
|
|
|
60
60
|
class Mount(dict[str, Incomplete]):
|
|
@@ -67,7 +67,7 @@ class Mount(dict[str, Incomplete]):
|
|
|
67
67
|
consistency: Literal["default", "consistent", "cached", "delegated"] | None = None,
|
|
68
68
|
propagation: str | None = None,
|
|
69
69
|
no_copy: bool = False,
|
|
70
|
-
labels: dict[
|
|
70
|
+
labels: dict[str, str] | None = None,
|
|
71
71
|
driver_config: DriverConfig | None = None,
|
|
72
72
|
tmpfs_size: int | str | None = None,
|
|
73
73
|
tmpfs_mode: int | None = None,
|
|
@@ -75,6 +75,10 @@ class Mount(dict[str, Incomplete]):
|
|
|
75
75
|
@classmethod
|
|
76
76
|
def parse_mount_string(cls, string: str) -> Mount: ...
|
|
77
77
|
|
|
78
|
+
class _ResourceDict(TypedDict):
|
|
79
|
+
Kind: str
|
|
80
|
+
Value: int
|
|
81
|
+
|
|
78
82
|
class Resources(dict[str, Incomplete]):
|
|
79
83
|
def __init__(
|
|
80
84
|
self,
|
|
@@ -82,7 +86,9 @@ class Resources(dict[str, Incomplete]):
|
|
|
82
86
|
mem_limit: int | None = None,
|
|
83
87
|
cpu_reservation: int | None = None,
|
|
84
88
|
mem_reservation: int | None = None,
|
|
85
|
-
generic_resources:
|
|
89
|
+
generic_resources: (
|
|
90
|
+
dict[str, int | str] | list[dict[Literal["DiscreteResourceSpec", "NamedResourceSpec"], _ResourceDict]] | None
|
|
91
|
+
) = None,
|
|
86
92
|
) -> None: ...
|
|
87
93
|
|
|
88
94
|
class UpdateConfig(dict[str, Incomplete]):
|
|
@@ -110,7 +116,7 @@ class RestartPolicy(dict[str, Incomplete]):
|
|
|
110
116
|
) -> None: ...
|
|
111
117
|
|
|
112
118
|
class DriverConfig(dict[str, Incomplete]):
|
|
113
|
-
def __init__(self, name: str, options: dict[
|
|
119
|
+
def __init__(self, name: str, options: dict[str, str] | None = None) -> None: ...
|
|
114
120
|
|
|
115
121
|
class EndpointSpec(dict[str, Incomplete]):
|
|
116
122
|
def __init__(
|
|
@@ -185,4 +191,4 @@ class Privileges(dict[str, Incomplete]):
|
|
|
185
191
|
) -> None: ...
|
|
186
192
|
|
|
187
193
|
class NetworkAttachmentConfig(dict[str, Incomplete]):
|
|
188
|
-
def __init__(self, target: str, aliases: list[str] | None = None, options: dict[str,
|
|
194
|
+
def __init__(self, target: str, aliases: list[str] | None = None, options: dict[str, str] | None = None) -> None: ...
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from _typeshed import Incomplete
|
|
2
1
|
from typing import Any
|
|
3
2
|
|
|
4
3
|
from .services import DriverConfig
|
|
@@ -17,7 +16,7 @@ class SwarmSpec(dict[str, Any]):
|
|
|
17
16
|
node_cert_expiry: int | None = None,
|
|
18
17
|
external_cas: list[SwarmExternalCA] | None = None,
|
|
19
18
|
name: str | None = None,
|
|
20
|
-
labels: dict[str,
|
|
19
|
+
labels: dict[str, str] | None = None,
|
|
21
20
|
signing_ca_cert: str | None = None,
|
|
22
21
|
signing_ca_key: str | None = None,
|
|
23
22
|
ca_force_rotate: int | None = None,
|
|
@@ -27,9 +26,5 @@ class SwarmSpec(dict[str, Any]):
|
|
|
27
26
|
|
|
28
27
|
class SwarmExternalCA(dict[str, Any]):
|
|
29
28
|
def __init__(
|
|
30
|
-
self,
|
|
31
|
-
url: str,
|
|
32
|
-
protocol: str | None = None,
|
|
33
|
-
options: dict[Incomplete, Incomplete] | None = None,
|
|
34
|
-
ca_cert: str | None = None,
|
|
29
|
+
self, url: str, protocol: str | None = None, options: dict[str, str] | None = None, ca_cert: str | None = None
|
|
35
30
|
) -> None: ...
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
from _typeshed import Incomplete
|
|
2
1
|
from collections.abc import Callable
|
|
2
|
+
from typing import TypeVar
|
|
3
|
+
from typing_extensions import ParamSpec
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
_P = ParamSpec("_P")
|
|
6
|
+
_R = TypeVar("_R")
|
|
7
|
+
|
|
8
|
+
def check_resource(resource_name: str) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
|
|
9
|
+
def minimum_version(version: str) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
|
|
10
|
+
def update_headers(f: Callable[_P, _R]) -> Callable[_P, _R]: ...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from _typeshed import FileDescriptorOrPath,
|
|
2
|
+
from _typeshed import FileDescriptorOrPath, ReadableBuffer
|
|
3
3
|
from collections.abc import Iterable, Mapping
|
|
4
4
|
from shlex import _ShlexInstream
|
|
5
5
|
from typing import Literal, NamedTuple, NoReturn, TypedDict, TypeVar, overload, type_check_only
|
|
@@ -38,7 +38,7 @@ def convert_port_bindings(
|
|
|
38
38
|
@overload
|
|
39
39
|
def convert_volume_binds(binds: list[_T]) -> list[_T]: ...
|
|
40
40
|
@overload
|
|
41
|
-
def convert_volume_binds(binds: Mapping[str | bytes,
|
|
41
|
+
def convert_volume_binds(binds: Mapping[str | bytes, bytes | str | dict[str, bytes | str]]) -> list[str]: ...
|
|
42
42
|
@overload
|
|
43
43
|
def convert_tmpfs_mounts(tmpfs: dict[_K, _V]) -> dict[_K, _V]: ...
|
|
44
44
|
@overload
|
|
@@ -56,8 +56,8 @@ def parse_host(
|
|
|
56
56
|
) -> Literal["http+unix:///var/run/docker.sock"]: ...
|
|
57
57
|
@overload
|
|
58
58
|
def parse_host(addr: str | None, is_win32: bool = False, tls: bool = False) -> str | bytes: ...
|
|
59
|
-
def parse_devices(devices: Iterable[str | dict[str,
|
|
60
|
-
def kwargs_from_env(environment: Mapping[str,
|
|
59
|
+
def parse_devices(devices: Iterable[str | dict[str, str]]) -> list[dict[str, str]]: ...
|
|
60
|
+
def kwargs_from_env(environment: Mapping[str, str] | None = None) -> _EnvKWArgs: ...
|
|
61
61
|
def convert_filters(filters) -> str: ...
|
|
62
62
|
def datetime_to_timestamp(dt: datetime.datetime) -> int: ...
|
|
63
63
|
def parse_bytes(s: float | str) -> float: ...
|
|
@@ -89,7 +89,7 @@ class Node:
|
|
|
89
89
|
@overload
|
|
90
90
|
def next_node(
|
|
91
91
|
self, condition: type[_N], include_self: bool = False, descend: bool = True, siblings: bool = False, ascend: bool = False
|
|
92
|
-
) -> _N: ...
|
|
92
|
+
) -> _N | None: ...
|
|
93
93
|
@overload
|
|
94
94
|
def next_node(
|
|
95
95
|
self,
|
|
@@ -98,7 +98,7 @@ class Node:
|
|
|
98
98
|
descend: bool = True,
|
|
99
99
|
siblings: bool = False,
|
|
100
100
|
ascend: bool = False,
|
|
101
|
-
) -> Node: ...
|
|
101
|
+
) -> Node | None: ...
|
|
102
102
|
def validate(self, recursive: bool = True) -> None: ...
|
|
103
103
|
def validate_position(self) -> None: ...
|
|
104
104
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = "0.
|
|
1
|
+
version = "0.4.*"
|
|
2
2
|
upstream_repository = "https://github.com/peterjc/flake8-rst-docstrings"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = "1.
|
|
1
|
+
version = "1.17.*"
|
|
2
2
|
upstream_repository = "https://github.com/asottile/flake8-typing-imports"
|
|
@@ -76,13 +76,10 @@ def secure_channel(
|
|
|
76
76
|
) -> Channel: ...
|
|
77
77
|
|
|
78
78
|
_Interceptor: TypeAlias = (
|
|
79
|
-
UnaryUnaryClientInterceptor
|
|
80
|
-
| UnaryStreamClientInterceptor[_TRequest, _TResponse]
|
|
81
|
-
| StreamUnaryClientInterceptor[_TRequest, _TResponse]
|
|
82
|
-
| StreamStreamClientInterceptor[_TRequest, _TResponse]
|
|
79
|
+
UnaryUnaryClientInterceptor | UnaryStreamClientInterceptor | StreamUnaryClientInterceptor | StreamStreamClientInterceptor
|
|
83
80
|
)
|
|
84
81
|
|
|
85
|
-
def intercept_channel(channel: Channel, *interceptors: _Interceptor
|
|
82
|
+
def intercept_channel(channel: Channel, *interceptors: _Interceptor) -> Channel: ...
|
|
86
83
|
|
|
87
84
|
# Create Client Credentials:
|
|
88
85
|
|
|
@@ -108,8 +105,8 @@ def composite_channel_credentials(
|
|
|
108
105
|
|
|
109
106
|
def server(
|
|
110
107
|
thread_pool: futures.ThreadPoolExecutor,
|
|
111
|
-
handlers: list[GenericRpcHandler
|
|
112
|
-
interceptors: list[ServerInterceptor
|
|
108
|
+
handlers: list[GenericRpcHandler] | None = None,
|
|
109
|
+
interceptors: list[ServerInterceptor] | None = None,
|
|
113
110
|
options: _Options | None = None,
|
|
114
111
|
maximum_concurrent_rpcs: int | None = None,
|
|
115
112
|
compression: Compression | None = None,
|
|
@@ -173,7 +170,7 @@ def stream_stream_rpc_method_handler(
|
|
|
173
170
|
) -> RpcMethodHandler[_TRequest, _TResponse]: ...
|
|
174
171
|
def method_handlers_generic_handler(
|
|
175
172
|
service: str, method_handlers: dict[str, RpcMethodHandler[Any, Any]]
|
|
176
|
-
) -> GenericRpcHandler
|
|
173
|
+
) -> GenericRpcHandler: ...
|
|
177
174
|
|
|
178
175
|
# Channel Ready Future:
|
|
179
176
|
|
|
@@ -264,7 +261,7 @@ class Channel(abc.ABC):
|
|
|
264
261
|
|
|
265
262
|
class Server(abc.ABC):
|
|
266
263
|
@abc.abstractmethod
|
|
267
|
-
def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler
|
|
264
|
+
def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler]) -> None: ...
|
|
268
265
|
|
|
269
266
|
# Returns an integer port on which server will accept RPC requests.
|
|
270
267
|
@abc.abstractmethod
|
|
@@ -378,25 +375,13 @@ class ClientCallDetails(abc.ABC):
|
|
|
378
375
|
@type_check_only
|
|
379
376
|
class _CallFuture(Call, Future[_TResponse], metaclass=abc.ABCMeta): ...
|
|
380
377
|
|
|
381
|
-
class UnaryUnaryClientInterceptor(abc.ABC
|
|
378
|
+
class UnaryUnaryClientInterceptor(abc.ABC):
|
|
379
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
380
|
+
# and the types must satisfy the no-op implementation of
|
|
381
|
+
# `return continuation(client_call_details, request)`.
|
|
382
382
|
@abc.abstractmethod
|
|
383
383
|
def intercept_unary_unary(
|
|
384
384
|
self,
|
|
385
|
-
# FIXME: decode these cryptic runes to confirm the typing mystery of
|
|
386
|
-
# this callable's signature that was left for us by past civilisations:
|
|
387
|
-
#
|
|
388
|
-
# continuation - A function that proceeds with the invocation by
|
|
389
|
-
# executing the next interceptor in chain or invoking the actual RPC
|
|
390
|
-
# on the underlying Channel. It is the interceptor's responsibility
|
|
391
|
-
# to call it if it decides to move the RPC forward. The interceptor
|
|
392
|
-
# can use response_future = continuation(client_call_details,
|
|
393
|
-
# request) to continue with the RPC. continuation returns an object
|
|
394
|
-
# that is both a Call for the RPC and a Future. In the event of RPC
|
|
395
|
-
# completion, the return Call-Future's result value will be the
|
|
396
|
-
# response message of the RPC. Should the event terminate with non-OK
|
|
397
|
-
# status, the returned Call-Future's exception value will be an
|
|
398
|
-
# RpcError.
|
|
399
|
-
#
|
|
400
385
|
continuation: Callable[[ClientCallDetails, _TRequest], _CallFuture[_TResponse]],
|
|
401
386
|
client_call_details: ClientCallDetails,
|
|
402
387
|
request: _TRequest,
|
|
@@ -407,7 +392,10 @@ class _CallIterator(Call, Generic[_TResponse], metaclass=abc.ABCMeta):
|
|
|
407
392
|
def __iter__(self) -> Iterator[_TResponse]: ...
|
|
408
393
|
def __next__(self) -> _TResponse: ...
|
|
409
394
|
|
|
410
|
-
class UnaryStreamClientInterceptor(abc.ABC
|
|
395
|
+
class UnaryStreamClientInterceptor(abc.ABC):
|
|
396
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
397
|
+
# and the types must satisfy the no-op implementation of
|
|
398
|
+
# `return continuation(client_call_details, request)`.
|
|
411
399
|
@abc.abstractmethod
|
|
412
400
|
def intercept_unary_stream(
|
|
413
401
|
self,
|
|
@@ -416,20 +404,26 @@ class UnaryStreamClientInterceptor(abc.ABC, Generic[_TRequest, _TResponse]):
|
|
|
416
404
|
request: _TRequest,
|
|
417
405
|
) -> _CallIterator[_TResponse]: ...
|
|
418
406
|
|
|
419
|
-
class StreamUnaryClientInterceptor(abc.ABC
|
|
407
|
+
class StreamUnaryClientInterceptor(abc.ABC):
|
|
408
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
409
|
+
# and the types must satisfy the no-op implementation of
|
|
410
|
+
# `return continuation(client_call_details, request_iterator)`.
|
|
420
411
|
@abc.abstractmethod
|
|
421
412
|
def intercept_stream_unary(
|
|
422
413
|
self,
|
|
423
|
-
continuation: Callable[[ClientCallDetails, _TRequest], _CallFuture[_TResponse]],
|
|
414
|
+
continuation: Callable[[ClientCallDetails, Iterator[_TRequest]], _CallFuture[_TResponse]],
|
|
424
415
|
client_call_details: ClientCallDetails,
|
|
425
416
|
request_iterator: Iterator[_TRequest],
|
|
426
417
|
) -> _CallFuture[_TResponse]: ...
|
|
427
418
|
|
|
428
|
-
class StreamStreamClientInterceptor(abc.ABC
|
|
419
|
+
class StreamStreamClientInterceptor(abc.ABC):
|
|
420
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
421
|
+
# and the types must satisfy the no-op implementation of
|
|
422
|
+
# `return continuation(client_call_details, request_iterator)`.
|
|
429
423
|
@abc.abstractmethod
|
|
430
424
|
def intercept_stream_stream(
|
|
431
425
|
self,
|
|
432
|
-
continuation: Callable[[ClientCallDetails, _TRequest], _CallIterator[_TResponse]],
|
|
426
|
+
continuation: Callable[[ClientCallDetails, Iterator[_TRequest]], _CallIterator[_TResponse]],
|
|
433
427
|
client_call_details: ClientCallDetails,
|
|
434
428
|
request_iterator: Iterator[_TRequest],
|
|
435
429
|
) -> _CallIterator[_TResponse]: ...
|
|
@@ -493,17 +487,21 @@ class HandlerCallDetails(abc.ABC):
|
|
|
493
487
|
method: str
|
|
494
488
|
invocation_metadata: _Metadata
|
|
495
489
|
|
|
496
|
-
class GenericRpcHandler(abc.ABC
|
|
490
|
+
class GenericRpcHandler(abc.ABC):
|
|
491
|
+
# The return type depends on the handler call details.
|
|
497
492
|
@abc.abstractmethod
|
|
498
|
-
def service(self, handler_call_details: HandlerCallDetails) -> RpcMethodHandler[
|
|
493
|
+
def service(self, handler_call_details: HandlerCallDetails) -> RpcMethodHandler[Any, Any] | None: ...
|
|
499
494
|
|
|
500
|
-
class ServiceRpcHandler(GenericRpcHandler
|
|
495
|
+
class ServiceRpcHandler(GenericRpcHandler, metaclass=abc.ABCMeta):
|
|
501
496
|
@abc.abstractmethod
|
|
502
497
|
def service_name(self) -> str: ...
|
|
503
498
|
|
|
504
499
|
# Service-Side Interceptor:
|
|
505
500
|
|
|
506
|
-
class ServerInterceptor(abc.ABC
|
|
501
|
+
class ServerInterceptor(abc.ABC):
|
|
502
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
503
|
+
# and the types must satisfy the no-op implementation of
|
|
504
|
+
# `return continuation(handler_call_details)`.
|
|
507
505
|
@abc.abstractmethod
|
|
508
506
|
def intercept_service(
|
|
509
507
|
self,
|
|
@@ -45,8 +45,6 @@ class AioRpcError(RpcError):
|
|
|
45
45
|
|
|
46
46
|
# Create Client:
|
|
47
47
|
|
|
48
|
-
class ClientInterceptor(metaclass=abc.ABCMeta): ...
|
|
49
|
-
|
|
50
48
|
def insecure_channel(
|
|
51
49
|
target: str,
|
|
52
50
|
options: _Options | None = None,
|
|
@@ -65,8 +63,8 @@ def secure_channel(
|
|
|
65
63
|
|
|
66
64
|
def server(
|
|
67
65
|
migration_thread_pool: futures.Executor | None = None,
|
|
68
|
-
handlers: Sequence[GenericRpcHandler
|
|
69
|
-
interceptors: Sequence[ServerInterceptor
|
|
66
|
+
handlers: Sequence[GenericRpcHandler] | None = None,
|
|
67
|
+
interceptors: Sequence[ServerInterceptor] | None = None,
|
|
70
68
|
options: _Options | None = None,
|
|
71
69
|
maximum_concurrent_rpcs: int | None = None,
|
|
72
70
|
compression: Compression | None = None,
|
|
@@ -125,7 +123,7 @@ class Channel(abc.ABC):
|
|
|
125
123
|
|
|
126
124
|
class Server(metaclass=abc.ABCMeta):
|
|
127
125
|
@abc.abstractmethod
|
|
128
|
-
def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler
|
|
126
|
+
def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler]) -> None: ...
|
|
129
127
|
|
|
130
128
|
# Returns an integer port on which server will accept RPC requests.
|
|
131
129
|
@abc.abstractmethod
|
|
@@ -288,7 +286,7 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
|
|
|
288
286
|
def __await__(self) -> Generator[Incomplete, None, _TResponse]: ...
|
|
289
287
|
def __init__(
|
|
290
288
|
self,
|
|
291
|
-
interceptors: Sequence[UnaryUnaryClientInterceptor
|
|
289
|
+
interceptors: Sequence[UnaryUnaryClientInterceptor],
|
|
292
290
|
request: _TRequest,
|
|
293
291
|
timeout: float | None,
|
|
294
292
|
metadata: Metadata,
|
|
@@ -304,7 +302,7 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
|
|
|
304
302
|
# pylint: disable=too-many-arguments
|
|
305
303
|
async def _invoke(
|
|
306
304
|
self,
|
|
307
|
-
interceptors: Sequence[UnaryUnaryClientInterceptor
|
|
305
|
+
interceptors: Sequence[UnaryUnaryClientInterceptor],
|
|
308
306
|
method: bytes,
|
|
309
307
|
timeout: float | None,
|
|
310
308
|
metadata: Metadata | None,
|
|
@@ -316,46 +314,67 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
|
|
|
316
314
|
) -> UnaryUnaryCall[_TRequest, _TResponse]: ...
|
|
317
315
|
def time_remaining(self) -> float | None: ...
|
|
318
316
|
|
|
319
|
-
class
|
|
317
|
+
class ClientInterceptor(metaclass=abc.ABCMeta): ...
|
|
318
|
+
|
|
319
|
+
class UnaryUnaryClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
|
|
320
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
321
|
+
# and the types must satisfy the no-op implementation of
|
|
322
|
+
# `return await continuation(client_call_details, request)`.
|
|
320
323
|
@abc.abstractmethod
|
|
321
324
|
async def intercept_unary_unary(
|
|
322
325
|
self,
|
|
323
|
-
|
|
324
|
-
continuation: Callable[[ClientCallDetails, _TRequest], UnaryUnaryCall[_TRequest, _TResponse]],
|
|
326
|
+
continuation: Callable[[ClientCallDetails, _TRequest], Awaitable[UnaryUnaryCall[_TRequest, _TResponse]]],
|
|
325
327
|
client_call_details: ClientCallDetails,
|
|
326
328
|
request: _TRequest,
|
|
327
|
-
) -> _TResponse: ...
|
|
329
|
+
) -> _TResponse | UnaryUnaryCall[_TRequest, _TResponse]: ...
|
|
328
330
|
|
|
329
|
-
class UnaryStreamClientInterceptor(
|
|
331
|
+
class UnaryStreamClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
|
|
332
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
333
|
+
# and the types must satisfy the no-op implementation of
|
|
334
|
+
# `return await continuation(client_call_details, request)`.
|
|
330
335
|
@abc.abstractmethod
|
|
331
336
|
async def intercept_unary_stream(
|
|
332
337
|
self,
|
|
333
|
-
continuation: Callable[[ClientCallDetails, _TRequest], UnaryStreamCall[_TRequest, _TResponse]],
|
|
338
|
+
continuation: Callable[[ClientCallDetails, _TRequest], Awaitable[UnaryStreamCall[_TRequest, _TResponse]]],
|
|
334
339
|
client_call_details: ClientCallDetails,
|
|
335
340
|
request: _TRequest,
|
|
336
|
-
) ->
|
|
341
|
+
) -> AsyncIterator[_TResponse] | UnaryStreamCall[_TRequest, _TResponse]: ...
|
|
337
342
|
|
|
338
|
-
class StreamUnaryClientInterceptor(
|
|
343
|
+
class StreamUnaryClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
|
|
344
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
345
|
+
# and the types must satisfy the no-op implementation of
|
|
346
|
+
# `return await continuation(client_call_details, request_iterator)`.
|
|
339
347
|
@abc.abstractmethod
|
|
340
348
|
async def intercept_stream_unary(
|
|
341
349
|
self,
|
|
342
|
-
continuation: Callable[
|
|
350
|
+
continuation: Callable[
|
|
351
|
+
[ClientCallDetails, AsyncIterable[_TRequest] | Iterable[_TRequest]], Awaitable[StreamUnaryCall[_TRequest, _TResponse]]
|
|
352
|
+
],
|
|
343
353
|
client_call_details: ClientCallDetails,
|
|
344
354
|
request_iterator: AsyncIterable[_TRequest] | Iterable[_TRequest],
|
|
345
|
-
) ->
|
|
355
|
+
) -> _TResponse | StreamUnaryCall[_TRequest, _TResponse]: ...
|
|
346
356
|
|
|
347
|
-
class StreamStreamClientInterceptor(
|
|
357
|
+
class StreamStreamClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
|
|
358
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
359
|
+
# and the types must satisfy the no-op implementation of
|
|
360
|
+
# `return await continuation(client_call_details, request_iterator)`.
|
|
348
361
|
@abc.abstractmethod
|
|
349
362
|
async def intercept_stream_stream(
|
|
350
363
|
self,
|
|
351
|
-
continuation: Callable[
|
|
364
|
+
continuation: Callable[
|
|
365
|
+
[ClientCallDetails, AsyncIterable[_TRequest] | Iterable[_TRequest]],
|
|
366
|
+
Awaitable[StreamStreamCall[_TRequest, _TResponse]],
|
|
367
|
+
],
|
|
352
368
|
client_call_details: ClientCallDetails,
|
|
353
369
|
request_iterator: AsyncIterable[_TRequest] | Iterable[_TRequest],
|
|
354
|
-
) ->
|
|
370
|
+
) -> AsyncIterator[_TResponse] | StreamStreamCall[_TRequest, _TResponse]: ...
|
|
355
371
|
|
|
356
372
|
# Server-Side Interceptor:
|
|
357
373
|
|
|
358
|
-
class ServerInterceptor(
|
|
374
|
+
class ServerInterceptor(metaclass=abc.ABCMeta):
|
|
375
|
+
# This method (not the class) is generic over _TRequest and _TResponse
|
|
376
|
+
# and the types must satisfy the no-op implementation of
|
|
377
|
+
# `return await continuation(handler_call_details)`.
|
|
359
378
|
@abc.abstractmethod
|
|
360
379
|
async def intercept_service(
|
|
361
380
|
self,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from argparse import ArgumentParser, Namespace
|
|
2
2
|
from typing import Any
|
|
3
|
-
from typing_extensions import override
|
|
4
3
|
|
|
5
4
|
from gunicorn.config import Config
|
|
6
5
|
from gunicorn.glogging import Logger as GLogger
|
|
@@ -30,7 +29,5 @@ class Application(BaseApplication):
|
|
|
30
29
|
def get_config_from_module_name(self, module_name: str) -> dict[str, Any]: ...
|
|
31
30
|
def load_config_from_module_name_or_filename(self, location: str) -> dict[str, Any]: ...
|
|
32
31
|
def load_config_from_file(self, filename: str) -> dict[str, Any]: ...
|
|
33
|
-
@override
|
|
34
32
|
def load_config(self) -> None: ...
|
|
35
|
-
@override
|
|
36
33
|
def run(self) -> None: ...
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from argparse import ArgumentParser, Namespace
|
|
2
|
-
from typing_extensions import override
|
|
3
2
|
|
|
4
3
|
from gunicorn.app.base import Application
|
|
5
4
|
|
|
@@ -8,13 +7,10 @@ from .._types import _WSGIAppType
|
|
|
8
7
|
class WSGIApplication(Application):
|
|
9
8
|
app_uri: str | None
|
|
10
9
|
|
|
11
|
-
@override
|
|
12
10
|
def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ...
|
|
13
|
-
@override
|
|
14
11
|
def load_config(self) -> None: ...
|
|
15
12
|
def load_wsgiapp(self) -> _WSGIAppType: ...
|
|
16
13
|
def load_pasteapp(self) -> _WSGIAppType: ...
|
|
17
|
-
@override
|
|
18
14
|
def load(self) -> _WSGIAppType: ...
|
|
19
15
|
|
|
20
16
|
def run(prog: str | None = None) -> None: ...
|
|
@@ -3,7 +3,7 @@ from _typeshed import ConvertibleToInt
|
|
|
3
3
|
from collections.abc import Callable, Container
|
|
4
4
|
from ssl import SSLContext, _SSLMethod
|
|
5
5
|
from typing import Annotated, Any, ClassVar, overload
|
|
6
|
-
from typing_extensions import TypeAlias
|
|
6
|
+
from typing_extensions import TypeAlias
|
|
7
7
|
|
|
8
8
|
from gunicorn.arbiter import Arbiter
|
|
9
9
|
from gunicorn.glogging import Logger as GLogger
|
|
@@ -90,7 +90,6 @@ class Config:
|
|
|
90
90
|
|
|
91
91
|
def __init__(self, usage: str | None = None, prog: str | None = None) -> None: ...
|
|
92
92
|
def __getattr__(self, name: str) -> Any: ...
|
|
93
|
-
@override
|
|
94
93
|
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
95
94
|
def set(self, name: str, value: _ConfigValueType) -> None: ...
|
|
96
95
|
def get_cmd_args_from_env(self) -> list[str]: ...
|
|
@@ -5,7 +5,7 @@ from datetime import timedelta
|
|
|
5
5
|
from logging.config import _DictConfigArgs
|
|
6
6
|
from socket import SocketKind
|
|
7
7
|
from typing import Annotated, Any, ClassVar, Literal, TypedDict, type_check_only
|
|
8
|
-
from typing_extensions import TypeAlias
|
|
8
|
+
from typing_extensions import TypeAlias
|
|
9
9
|
|
|
10
10
|
from gunicorn.http import Request
|
|
11
11
|
from gunicorn.http.wsgi import Response
|
|
@@ -52,7 +52,6 @@ def loggers() -> list[logging.Logger]: ...
|
|
|
52
52
|
|
|
53
53
|
class SafeAtoms(dict[str, Any]):
|
|
54
54
|
def __init__(self, atoms: dict[str, Any]) -> None: ...
|
|
55
|
-
@override
|
|
56
55
|
def __getitem__(self, k: str) -> str: ...
|
|
57
56
|
|
|
58
57
|
_SyslogAddressType: TypeAlias = (
|