1
1
from _collections_abc import Generator , dict_keys
2
- from _typeshed import Self
2
+ from _typeshed import Incomplete , ReadableBuffer , Self
3
3
from types import TracebackType
4
- from typing import Any
5
4
from typing_extensions import Literal , TypeAlias
6
5
6
+ from pyasn1 .type .base import Asn1Item
7
+
7
8
from .pooling import ServerPool
8
9
from .server import Server
9
10
10
- SASL_AVAILABLE_MECHANISMS : Any
11
- CLIENT_STRATEGIES : Any
11
+ SASL_AVAILABLE_MECHANISMS : Incomplete
12
+ CLIENT_STRATEGIES : Incomplete
12
13
13
14
_ServerSequence : TypeAlias = (
14
- set [Server ] | list [Server ] | tuple [Server , ...] | Generator [Server , None , None ] | dict_keys [Server , Any ]
15
+ set [Server ] | list [Server ] | tuple [Server , ...] | Generator [Server , None , None ] | dict_keys [Server , Incomplete ]
15
16
)
16
17
17
18
class Connection :
18
- connection_lock : Any
19
+ connection_lock : Incomplete
19
20
last_error : str
20
- strategy_type : Any
21
- user : Any
22
- password : Any
23
- authentication : Any
24
- version : Any
25
- auto_referrals : Any
26
- request : Any
27
- response : Any | None
28
- result : Any
21
+ strategy_type : Incomplete
22
+ user : Incomplete
23
+ password : Incomplete
24
+ authentication : Incomplete
25
+ version : Incomplete
26
+ auto_referrals : Incomplete
27
+ request : Incomplete
28
+ response : Incomplete | None
29
+ result : Incomplete
29
30
bound : bool
30
31
listening : bool
31
32
closed : bool
32
- auto_bind : Any
33
- sasl_mechanism : Any
34
- sasl_credentials : Any
35
- socket : Any
33
+ auto_bind : Incomplete
34
+ sasl_mechanism : Incomplete
35
+ sasl_credentials : Incomplete
36
+ socket : Incomplete
36
37
tls_started : bool
37
38
sasl_in_progress : bool
38
- read_only : Any
39
- lazy : Any
40
- pool_name : Any
39
+ read_only : Incomplete
40
+ lazy : Incomplete
41
+ pool_name : Incomplete
41
42
pool_size : int | None
42
- cred_store : Any
43
- pool_lifetime : Any
44
- pool_keepalive : Any
43
+ cred_store : Incomplete
44
+ pool_lifetime : Incomplete
45
+ pool_keepalive : Incomplete
45
46
starting_tls : bool
46
- check_names : Any
47
- raise_exceptions : Any
48
- auto_range : Any
49
- extend : Any
50
- fast_decoder : Any
51
- receive_timeout : Any
52
- empty_attributes : Any
53
- use_referral_cache : Any
54
- auto_escape : Any
55
- auto_encode : Any
56
- source_address : Any
57
- source_port_list : Any
58
- server_pool : Any | None
59
- server : Any
60
- strategy : Any
61
- send : Any
62
- open : Any
63
- get_response : Any
64
- post_send_single_response : Any
65
- post_send_search : Any
47
+ check_names : Incomplete
48
+ raise_exceptions : Incomplete
49
+ auto_range : Incomplete
50
+ extend : Incomplete
51
+ fast_decoder : Incomplete
52
+ receive_timeout : Incomplete
53
+ empty_attributes : Incomplete
54
+ use_referral_cache : Incomplete
55
+ auto_escape : Incomplete
56
+ auto_encode : Incomplete
57
+ source_address : Incomplete
58
+ source_port_list : Incomplete
59
+ server_pool : Incomplete | None
60
+ server : Incomplete
61
+ strategy : Incomplete
62
+ send : Incomplete
63
+ open : Incomplete
64
+ get_response : Incomplete
65
+ post_send_single_response : Incomplete
66
+ post_send_search : Incomplete
66
67
def __init__ (
67
68
self ,
68
69
server : Server | str | _ServerSequence | ServerPool ,
@@ -86,7 +87,7 @@ class Connection:
86
87
auto_referrals : bool = ...,
87
88
auto_range : bool = ...,
88
89
sasl_mechanism : str | None = ...,
89
- sasl_credentials : Any | None = ...,
90
+ sasl_credentials : Incomplete | None = ...,
90
91
check_names : bool = ...,
91
92
collect_usage : bool = ...,
92
93
read_only : bool = ...,
@@ -95,17 +96,17 @@ class Connection:
95
96
pool_name : str | None = ...,
96
97
pool_size : int | None = ...,
97
98
pool_lifetime : int | None = ...,
98
- cred_store : Any | None = ...,
99
+ cred_store : Incomplete | None = ...,
99
100
fast_decoder : bool = ...,
100
- receive_timeout : Any | None = ...,
101
+ receive_timeout : Incomplete | None = ...,
101
102
return_empty_attributes : bool = ...,
102
103
use_referral_cache : bool = ...,
103
104
auto_escape : bool = ...,
104
105
auto_encode : bool = ...,
105
- pool_keepalive : Any | None = ...,
106
+ pool_keepalive : Incomplete | None = ...,
106
107
source_address : str | None = ...,
107
108
source_port : int | None = ...,
108
- source_port_list : Any | None = ...,
109
+ source_port_list : Incomplete | None = ...,
109
110
) -> None : ...
110
111
def repr_with_sensitive_data_stripped (self ): ...
111
112
@property
@@ -118,65 +119,71 @@ class Connection:
118
119
def __exit__ (
119
120
self , exc_type : type [BaseException ] | None , exc_val : BaseException | None , exc_tb : TracebackType | None
120
121
) -> Literal [False ] | None : ...
121
- def bind (self , read_server_info : bool = ..., controls : Any | None = ...): ...
122
+ def bind (self , read_server_info : bool = ..., controls : Incomplete | None = ...): ...
122
123
def rebind (
123
124
self ,
124
- user : Any | None = ...,
125
- password : Any | None = ...,
126
- authentication : Any | None = ...,
127
- sasl_mechanism : Any | None = ...,
128
- sasl_credentials : Any | None = ...,
125
+ user : Incomplete | None = ...,
126
+ password : Incomplete | None = ...,
127
+ authentication : Incomplete | None = ...,
128
+ sasl_mechanism : Incomplete | None = ...,
129
+ sasl_credentials : Incomplete | None = ...,
129
130
read_server_info : bool = ...,
130
- controls : Any | None = ...,
131
+ controls : Incomplete | None = ...,
131
132
): ...
132
- def unbind (self , controls : Any | None = ...): ...
133
+ def unbind (self , controls : Incomplete | None = ...): ...
133
134
def search (
134
135
self ,
135
136
search_base : str ,
136
137
search_filter : str ,
137
138
search_scope : Literal ["BASE" , "LEVEL" , "SUBTREE" ] = ...,
138
139
dereference_aliases : Literal ["NEVER" , "SEARCH" , "FINDING_BASE" , "ALWAYS" ] = ...,
139
- attributes : Any | None = ...,
140
+ attributes : Incomplete | None = ...,
140
141
size_limit : int = ...,
141
142
time_limit : int = ...,
142
143
types_only : bool = ...,
143
144
get_operational_attributes : bool = ...,
144
- controls : Any | None = ...,
145
+ controls : Incomplete | None = ...,
145
146
paged_size : int | None = ...,
146
147
paged_criticality : bool = ...,
147
148
paged_cookie : str | bytes | None = ...,
148
149
auto_escape : bool | None = ...,
149
150
): ...
150
- def compare (self , dn , attribute , value , controls : Any | None = ...): ...
151
- def add (self , dn , object_class : Any | None = ..., attributes : Any | None = ..., controls : Any | None = ...): ...
152
- def delete (self , dn , controls : Any | None = ...): ...
153
- def modify (self , dn , changes , controls : Any | None = ...): ...
151
+ def compare (self , dn , attribute , value , controls : Incomplete | None = ...): ...
152
+ def add (
153
+ self , dn , object_class : Incomplete | None = ..., attributes : Incomplete | None = ..., controls : Incomplete | None = ...
154
+ ): ...
155
+ def delete (self , dn , controls : Incomplete | None = ...): ...
156
+ def modify (self , dn , changes , controls : Incomplete | None = ...): ...
154
157
def modify_dn (
155
- self , dn , relative_dn , delete_old_dn : bool = ..., new_superior : Any | None = ..., controls : Any | None = ...
158
+ self , dn , relative_dn , delete_old_dn : bool = ..., new_superior : Incomplete | None = ..., controls : Incomplete | None = ...
156
159
): ...
157
- def abandon (self , message_id , controls : Any | None = ...): ...
160
+ def abandon (self , message_id , controls : Incomplete | None = ...): ...
158
161
def extended (
159
- self , request_name , request_value : Any | None = ..., controls : Any | None = ..., no_encode : Any | None = ...
162
+ self ,
163
+ request_name ,
164
+ request_value : Asn1Item | ReadableBuffer | None = ...,
165
+ controls : Incomplete | None = ...,
166
+ no_encode : bool | None = ...,
160
167
): ...
161
168
def start_tls (self , read_server_info : bool = ...): ...
162
169
def do_sasl_bind (self , controls ): ...
163
170
def do_ntlm_bind (self , controls ): ...
164
171
def refresh_server_info (self ) -> None : ...
165
172
def response_to_ldif (
166
173
self ,
167
- search_result : Any | None = ...,
174
+ search_result : Incomplete | None = ...,
168
175
all_base64 : bool = ...,
169
- line_separator : Any | None = ...,
170
- sort_order : Any | None = ...,
171
- stream : Any | None = ...,
176
+ line_separator : Incomplete | None = ...,
177
+ sort_order : Incomplete | None = ...,
178
+ stream : Incomplete | None = ...,
172
179
): ...
173
180
def response_to_json (
174
181
self ,
175
182
raw : bool = ...,
176
- search_result : Any | None = ...,
183
+ search_result : Incomplete | None = ...,
177
184
indent : int = ...,
178
185
sort : bool = ...,
179
- stream : Any | None = ...,
186
+ stream : Incomplete | None = ...,
180
187
checked_attributes : bool = ...,
181
188
include_empty : bool = ...,
182
189
): ...
0 commit comments