[ldap3] Use Incomplete instead of Any (#15054)

This commit is contained in:
Semyon Moroz
2025-11-20 12:32:37 +04:00
committed by GitHub
parent 8aa4874f53
commit 5da111e6d6
40 changed files with 364 additions and 362 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
from typing import Any, Literal
from typing import Literal
from .abstract.attrDef import AttrDef as AttrDef
from .abstract.attribute import (
@@ -97,7 +97,7 @@ HASHED_SALTED_SHA384: Literal["SALTED_SHA384"]
HASHED_SALTED_SHA512: Literal["SALTED_SHA512"]
HASHED_SALTED_MD5: Literal["SALTED_MD5"]
NUMERIC_TYPES: tuple[type[Any], ...]
INTEGER_TYPES: tuple[type[Any], ...]
STRING_TYPES: tuple[type[Any], ...]
SEQUENCE_TYPES: tuple[type[Any], ...]
NUMERIC_TYPES: tuple[type, ...]
INTEGER_TYPES: tuple[type, ...]
STRING_TYPES: tuple[type, ...]
SEQUENCE_TYPES: tuple[type, ...]
+3 -3
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
STATUS_INIT: str
STATUS_VIRTUAL: str
@@ -11,5 +11,5 @@ STATUS_READY_FOR_DELETION: str
STATUS_READY_FOR_MOVING: str
STATUS_READY_FOR_RENAMING: str
STATUS_DELETED: str
STATUSES: Any
INITIAL_STATUSES: Any
STATUSES: Incomplete
INITIAL_STATUSES: Incomplete
+13 -13
View File
@@ -1,18 +1,18 @@
from typing import Any
from _typeshed import Incomplete
class AttrDef:
name: Any
key: Any
validate: Any
pre_query: Any
post_query: Any
default: Any
dereference_dn: Any
description: Any
mandatory: Any
single_value: Any
oid_info: Any
other_names: Any
name: Incomplete
key: Incomplete
validate: Incomplete
pre_query: Incomplete
post_query: Incomplete
default: Incomplete
dereference_dn: Incomplete
description: Incomplete
mandatory: Incomplete
single_value: Incomplete
oid_info: Incomplete
other_names: Incomplete
def __init__(
self,
name,
+9 -9
View File
@@ -1,14 +1,14 @@
from typing import Any
from _typeshed import Incomplete
class Attribute:
key: Any
definition: Any
values: Any
raw_values: Any
response: Any
entry: Any
cursor: Any
other_names: Any
key: Incomplete
definition: Incomplete
values: Incomplete
raw_values: Incomplete
response: Incomplete
entry: Incomplete
cursor: Incomplete
other_names: Incomplete
def __init__(self, attr_def, entry, cursor) -> None: ...
def __len__(self) -> int: ...
def __iter__(self): ...
+28 -27
View File
@@ -1,19 +1,20 @@
from typing import Any, NamedTuple
from _typeshed import Incomplete
from typing import NamedTuple
class Operation(NamedTuple):
request: Any
result: Any
response: Any
request: Incomplete
result: Incomplete
response: Incomplete
class Cursor:
connection: Any
get_operational_attributes: Any
definition: Any
attributes: Any
controls: Any
execution_time: Any
entries: Any
schema: Any
connection: Incomplete
get_operational_attributes: Incomplete
definition: Incomplete
attributes: Incomplete
controls: Incomplete
execution_time: Incomplete
entries: Incomplete
schema: Incomplete
def __init__(
self,
connection,
@@ -38,14 +39,14 @@ class Cursor:
def failed(self): ...
class Reader(Cursor):
entry_class: Any
attribute_class: Any
entry_initial_status: Any
sub_tree: Any
base: Any
dereference_aliases: Any
validated_query: Any
query_filter: Any
entry_class: Incomplete
attribute_class: Incomplete
entry_initial_status: Incomplete
sub_tree: Incomplete
base: Incomplete
dereference_aliases: Incomplete
validated_query: Incomplete
query_filter: Incomplete
def __init__(
self,
connection,
@@ -68,8 +69,8 @@ class Reader(Cursor):
@components_in_and.setter
def components_in_and(self, value) -> None: ...
def clear(self) -> None: ...
execution_time: Any
entries: Any
execution_time: Incomplete
entries: Incomplete
def reset(self) -> None: ...
def search(self, attributes=None): ...
def search_object(self, entry_dn=None, attributes=None): ...
@@ -78,14 +79,14 @@ class Reader(Cursor):
def search_paged(self, paged_size, paged_criticality: bool = True, generator: bool = True, attributes=None): ...
class Writer(Cursor):
entry_class: Any
attribute_class: Any
entry_initial_status: Any
entry_class: Incomplete
attribute_class: Incomplete
entry_initial_status: Incomplete
@staticmethod
def from_cursor(cursor, connection=None, object_def=None, custom_validator=None): ...
@staticmethod
def from_response(connection, object_def, response=None): ...
dereference_aliases: Any
dereference_aliases: Incomplete
def __init__(
self,
connection,
@@ -95,7 +96,7 @@ class Writer(Cursor):
controls=None,
auxiliary_class=None,
) -> None: ...
execution_time: Any
execution_time: Incomplete
def commit(self, refresh: bool = True): ...
def discard(self) -> None: ...
def new(self, dn): ...
+11 -11
View File
@@ -1,16 +1,16 @@
from typing import Any
from _typeshed import Incomplete
class EntryState:
dn: Any
status: Any
attributes: Any
raw_attributes: Any
response: Any
cursor: Any
origin: Any
read_time: Any
changes: Any
definition: Any
dn: Incomplete
status: Incomplete
attributes: Incomplete
raw_attributes: Incomplete
response: Incomplete
cursor: Incomplete
origin: Incomplete
read_time: Incomplete
changes: Incomplete
definition: Incomplete
def __init__(self, dn, cursor) -> None: ...
def set_status(self, status) -> None: ...
@property
+8 -8
View File
@@ -1,17 +1,17 @@
import socket
from typing import Any
from _typeshed import Incomplete
from typing_extensions import Self
class LDAPException(Exception): ...
class LDAPOperationResult(LDAPException):
def __new__(cls, result=None, description=None, dn=None, message=None, response_type=None, response=None) -> Self: ...
result: Any
description: Any
dn: Any
message: Any
type: Any
response: Any
result: Incomplete
description: Incomplete
dn: Incomplete
message: Incomplete
type: Incomplete
response: Incomplete
def __init__(self, result=None, description=None, dn=None, message=None, response_type=None, response=None) -> None: ...
class LDAPOperationsErrorResult(LDAPOperationResult): ...
@@ -63,7 +63,7 @@ class LDAPAssertionFailedResult(LDAPOperationResult): ...
class LDAPAuthorizationDeniedResult(LDAPOperationResult): ...
class LDAPESyncRefreshRequiredResult(LDAPOperationResult): ...
exception_table: Any
exception_table: Incomplete
class LDAPExceptionError(LDAPException): ...
class LDAPConfigurationError(LDAPExceptionError): ...
+15 -15
View File
@@ -1,19 +1,19 @@
from typing import Any
from _typeshed import Incomplete
POOLING_STRATEGIES: Any
POOLING_STRATEGIES: Incomplete
class ServerState:
server: Any
last_checked_time: Any
available: Any
server: Incomplete
last_checked_time: Incomplete
available: Incomplete
def __init__(self, server, last_checked_time, available) -> None: ...
class ServerPoolState:
server_states: Any
strategy: Any
server_pool: Any
server_states: Incomplete
strategy: Incomplete
server_pool: Incomplete
last_used_server: int
initialize_time: Any
initialize_time: Incomplete
def __init__(self, server_pool) -> None: ...
def refresh(self) -> None: ...
def get_current_server(self): ...
@@ -23,12 +23,12 @@ class ServerPoolState:
def __len__(self) -> int: ...
class ServerPool:
servers: Any
pool_states: Any
active: Any
exhaust: Any
single: Any
strategy: Any
servers: Incomplete
pool_states: Incomplete
active: Incomplete
exhaust: Incomplete
single: Incomplete
strategy: Incomplete
def __init__(
self, servers=None, pool_strategy="ROUND_ROBIN", active: bool = True, exhaust: bool = False, single_state: bool = True
) -> None: ...
+7 -7
View File
@@ -1,12 +1,12 @@
from typing import Any
from _typeshed import Incomplete
class ReverseDnsSetting:
OFF: Any
REQUIRE_RESOLVE_ALL_ADDRESSES: Any
REQUIRE_RESOLVE_IP_ADDRESSES_ONLY: Any
OPTIONAL_RESOLVE_ALL_ADDRESSES: Any
OPTIONAL_RESOLVE_IP_ADDRESSES_ONLY: Any
SUPPORTED_VALUES: Any
OFF: Incomplete
REQUIRE_RESOLVE_ALL_ADDRESSES: Incomplete
REQUIRE_RESOLVE_IP_ADDRESSES_ONLY: Incomplete
OPTIONAL_RESOLVE_ALL_ADDRESSES: Incomplete
OPTIONAL_RESOLVE_IP_ADDRESSES_ONLY: Incomplete
SUPPORTED_VALUES: Incomplete
def get_hostname_by_addr(addr, success_required: bool = True): ...
def is_ip_addr(addr): ...
+3 -3
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
RESULT_SUCCESS: int
RESULT_OPERATIONS_ERROR: int
@@ -52,5 +52,5 @@ RESULT_CANNOT_CANCEL: int
RESULT_ASSERTION_FAILED: int
RESULT_AUTHORIZATION_DENIED: int
RESULT_E_SYNC_REFRESH_REQUIRED: int
RESULT_CODES: Any
DO_NOT_RAISE_EXCEPTIONS: Any
RESULT_CODES: Incomplete
DO_NOT_RAISE_EXCEPTIONS: Incomplete
+15 -14
View File
@@ -1,22 +1,23 @@
from typing import Any, Literal
from _typeshed import Incomplete
from typing import Literal
unix_socket_available: bool
class Server:
ipc: bool
host: Any
port: Any
allowed_referral_hosts: Any
ssl: Any
tls: Any
name: Any
get_info: Any
dit_lock: Any
custom_formatter: Any
custom_validator: Any
current_address: Any
connect_timeout: Any
mode: Any
host: Incomplete
port: Incomplete
allowed_referral_hosts: Incomplete
ssl: Incomplete
tls: Incomplete
name: Incomplete
get_info: Incomplete
dit_lock: Incomplete
custom_formatter: Incomplete
custom_validator: Incomplete
current_address: Incomplete
connect_timeout: Incomplete
mode: Incomplete
def __init__(
self,
host: str,
+3 -3
View File
@@ -1,9 +1,9 @@
from _typeshed import Incomplete
from datetime import tzinfo
from typing import Any
class OffsetTzInfo(tzinfo):
offset: Any
name: Any
offset: Incomplete
name: Incomplete
def __init__(self, offset, name) -> None: ...
def utcoffset(self, dt): ...
def tzname(self, dt): ...
+13 -13
View File
@@ -1,20 +1,20 @@
from typing import Any
from _typeshed import Incomplete
use_ssl_context: bool
class Tls:
ssl_options: Any
validate: Any
ca_certs_file: Any
ca_certs_path: Any
ca_certs_data: Any
private_key_password: Any
version: Any
private_key_file: Any
certificate_file: Any
valid_names: Any
ciphers: Any
sni: Any
ssl_options: Incomplete
validate: Incomplete
ca_certs_file: Incomplete
ca_certs_path: Incomplete
ca_certs_data: Incomplete
private_key_password: Incomplete
version: Incomplete
private_key_file: Incomplete
certificate_file: Incomplete
valid_names: Incomplete
ciphers: Incomplete
sni: Incomplete
def __init__(
self,
local_private_key_file=None,
+6 -6
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
class ConnectionUsage:
open_sockets: int
@@ -26,11 +26,11 @@ class ConnectionUsage:
restartable_successes: int
servers_from_pool: int
def reset(self) -> None: ...
initial_connection_start_time: Any
open_socket_start_time: Any
connection_stop_time: Any
last_transmitted_time: Any
last_received_time: Any
initial_connection_start_time: Incomplete
open_socket_start_time: Incomplete
connection_stop_time: Incomplete
last_transmitted_time: Incomplete
last_received_time: Incomplete
def __init__(self) -> None: ...
def __iadd__(self, other): ...
def update_transmitted_message(self, message, length) -> None: ...
+4 -4
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
class ExtendedOperationContainer:
def __init__(self, connection) -> None: ...
@@ -91,7 +91,7 @@ class MicrosoftExtendedOperations(ExtendedOperationContainer):
): ...
class ExtendedOperationsRoot(ExtendedOperationContainer):
standard: Any
novell: Any
microsoft: Any
standard: Incomplete
novell: Incomplete
microsoft: Incomplete
def __init__(self, connection) -> None: ...
+12 -12
View File
@@ -1,17 +1,17 @@
from typing import Any
from _typeshed import Incomplete
class DirSync:
connection: Any
base: Any
filter: Any
attributes: Any
cookie: Any
object_security: Any
ancestors_first: Any
public_data_only: Any
incremental_values: Any
max_length: Any
hex_guid: Any
connection: Incomplete
base: Incomplete
filter: Incomplete
attributes: Incomplete
cookie: Incomplete
object_security: Incomplete
ancestors_first: Incomplete
public_data_only: Incomplete
incremental_values: Incomplete
max_length: Incomplete
hex_guid: Incomplete
more_results: bool
def __init__(
self,
@@ -1,12 +1,12 @@
from typing import Any
from _typeshed import Incomplete
class ADPersistentSearch:
connection: Any
message_id: Any
base: Any
scope: Any
attributes: Any
controls: Any
connection: Incomplete
message_id: Incomplete
base: Incomplete
scope: Incomplete
attributes: Incomplete
controls: Incomplete
filter: str
def __init__(self, connection, search_base, search_scope, attributes, streaming, callback) -> None: ...
def start(self) -> None: ...
@@ -1,18 +1,18 @@
from typing import Any
from _typeshed import Incomplete
class PersistentSearch:
connection: Any
changes_only: Any
notifications: Any
message_id: Any
base: Any
filter: Any
scope: Any
dereference_aliases: Any
attributes: Any
size_limit: Any
time_limit: Any
controls: Any
connection: Incomplete
changes_only: Incomplete
notifications: Incomplete
message_id: Incomplete
base: Incomplete
filter: Incomplete
scope: Incomplete
dereference_aliases: Incomplete
attributes: Incomplete
size_limit: Incomplete
time_limit: Incomplete
controls: Incomplete
def __init__(
self,
connection,
+2 -2
View File
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
change_table: Any
change_table: Incomplete
def modify_operation(dn, changes, auto_encode, schema=None, validator=None, check_names: bool = False): ...
def modify_request_to_dict(request): ...
+5 -5
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
ROOT: int
AND: int
@@ -17,10 +17,10 @@ SEARCH_MATCH_OR_CLOSE: int
SEARCH_MATCH_OR_CONTROL: int
class FilterNode:
tag: Any
parent: Any
assertion: Any
elements: Any
tag: Incomplete
parent: Incomplete
assertion: Incomplete
elements: Incomplete
def __init__(self, tag=None, assertion=None) -> None: ...
def __str__(self, pos: int = 0) -> str: ...
def __repr__(self, pos: int = 0) -> str: ...
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
def format_unicode(raw_value): ...
def format_integer(raw_value): ...
@@ -8,7 +8,7 @@ def format_uuid_le(raw_value): ...
def format_boolean(raw_value): ...
def format_ad_timestamp(raw_value): ...
time_format: Any
time_format: Incomplete
def format_time(raw_value): ...
def format_ad_timedelta(raw_value): ...
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
standard_formatter: Any
standard_formatter: Incomplete
def find_attribute_helpers(attr_type, name, custom_formatter): ...
def format_attribute_values(schema, name, values, custom_formatter): ...
+2 -2
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
OID_CONTROL: str
OID_EXTENSION: str
@@ -26,4 +26,4 @@ def decode_oids(sequence): ...
def decode_syntax(syntax): ...
def oid_to_string(oid): ...
Oids: Any
Oids: Incomplete
+2 -2
View File
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
conf_ldif_line_length: Any
conf_ldif_line_length: Incomplete
def safe_ldif_string(bytes_value): ...
def add_controls(controls, all_base64): ...
+59 -59
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
def constant_to_class_kind(value): ...
def constant_to_attribute_usage(value): ...
@@ -9,7 +9,7 @@ def extension_to_tuple(extension_string): ...
def list_to_string(list_object): ...
class BaseServerInfo:
raw: Any
raw: Incomplete
def __init__(self, raw_attributes) -> None: ...
@classmethod
def from_json(cls, json_definition, schema=None, custom_formatter=None): ...
@@ -19,43 +19,43 @@ class BaseServerInfo:
def to_json(self, indent: int = 4, sort: bool = True): ...
class DsaInfo(BaseServerInfo):
alt_servers: Any
naming_contexts: Any
supported_controls: Any
supported_extensions: Any
supported_features: Any
supported_ldap_versions: Any
supported_sasl_mechanisms: Any
vendor_name: Any
vendor_version: Any
schema_entry: Any
other: Any
alt_servers: Incomplete
naming_contexts: Incomplete
supported_controls: Incomplete
supported_extensions: Incomplete
supported_features: Incomplete
supported_ldap_versions: Incomplete
supported_sasl_mechanisms: Incomplete
vendor_name: Incomplete
vendor_version: Incomplete
schema_entry: Incomplete
other: Incomplete
def __init__(self, attributes, raw_attributes) -> None: ...
class SchemaInfo(BaseServerInfo):
schema_entry: Any
create_time_stamp: Any
modify_time_stamp: Any
attribute_types: Any
object_classes: Any
matching_rules: Any
matching_rule_uses: Any
dit_content_rules: Any
dit_structure_rules: Any
name_forms: Any
ldap_syntaxes: Any
other: Any
schema_entry: Incomplete
create_time_stamp: Incomplete
modify_time_stamp: Incomplete
attribute_types: Incomplete
object_classes: Incomplete
matching_rules: Incomplete
matching_rule_uses: Incomplete
dit_content_rules: Incomplete
dit_structure_rules: Incomplete
name_forms: Incomplete
ldap_syntaxes: Incomplete
other: Incomplete
def __init__(self, schema_entry, attributes, raw_attributes) -> None: ...
def is_valid(self): ...
class BaseObjectInfo:
oid: Any
name: Any
description: Any
obsolete: Any
extensions: Any
experimental: Any
raw_definition: Any
oid: Incomplete
name: Incomplete
description: Incomplete
obsolete: Incomplete
extensions: Incomplete
experimental: Incomplete
raw_definition: Incomplete
def __init__(
self, oid=None, name=None, description=None, obsolete: bool = False, extensions=None, experimental=None, definition=None
) -> None: ...
@@ -65,7 +65,7 @@ class BaseObjectInfo:
def from_definition(cls, definitions): ...
class MatchingRuleInfo(BaseObjectInfo):
syntax: Any
syntax: Incomplete
def __init__(
self,
oid=None,
@@ -79,7 +79,7 @@ class MatchingRuleInfo(BaseObjectInfo):
) -> None: ...
class MatchingRuleUseInfo(BaseObjectInfo):
apply_to: Any
apply_to: Incomplete
def __init__(
self,
oid=None,
@@ -93,10 +93,10 @@ class MatchingRuleUseInfo(BaseObjectInfo):
) -> None: ...
class ObjectClassInfo(BaseObjectInfo):
superior: Any
kind: Any
must_contain: Any
may_contain: Any
superior: Incomplete
kind: Incomplete
must_contain: Incomplete
may_contain: Incomplete
def __init__(
self,
oid=None,
@@ -113,18 +113,18 @@ class ObjectClassInfo(BaseObjectInfo):
) -> None: ...
class AttributeTypeInfo(BaseObjectInfo):
superior: Any
equality: Any
ordering: Any
substring: Any
syntax: Any
min_length: Any
single_value: Any
collective: Any
no_user_modification: Any
usage: Any
mandatory_in: Any
optional_in: Any
superior: Incomplete
equality: Incomplete
ordering: Incomplete
substring: Incomplete
syntax: Incomplete
min_length: Incomplete
single_value: Incomplete
collective: Incomplete
no_user_modification: Incomplete
usage: Incomplete
mandatory_in: Incomplete
optional_in: Incomplete
def __init__(
self,
oid=None,
@@ -150,10 +150,10 @@ class LdapSyntaxInfo(BaseObjectInfo):
def __init__(self, oid=None, description=None, extensions=None, experimental=None, definition=None) -> None: ...
class DitContentRuleInfo(BaseObjectInfo):
auxiliary_classes: Any
must_contain: Any
may_contain: Any
not_contains: Any
auxiliary_classes: Incomplete
must_contain: Incomplete
may_contain: Incomplete
not_contains: Incomplete
def __init__(
self,
oid=None,
@@ -170,8 +170,8 @@ class DitContentRuleInfo(BaseObjectInfo):
) -> None: ...
class DitStructureRuleInfo(BaseObjectInfo):
superior: Any
name_form: Any
superior: Incomplete
name_form: Incomplete
def __init__(
self,
oid=None,
@@ -186,9 +186,9 @@ class DitStructureRuleInfo(BaseObjectInfo):
) -> None: ...
class NameFormInfo(BaseObjectInfo):
object_class: Any
must_contain: Any
may_contain: Any
object_class: Incomplete
must_contain: Incomplete
may_contain: Incomplete
def __init__(
self,
oid=None,
+7 -7
View File
@@ -1,17 +1,17 @@
from typing import Any
from _typeshed import Incomplete
from ..strategy.asynchronous import AsyncStrategy
class AsyncStreamStrategy(AsyncStrategy):
can_stream: bool
line_separator: Any
line_separator: Incomplete
all_base64: bool
stream: Any
order: Any
persistent_search_message_id: Any
stream: Incomplete
order: Incomplete
persistent_search_message_id: Incomplete
streaming: bool
callback: Any
events: Any
callback: Incomplete
events: Incomplete
def __init__(self, ldap_connection) -> None: ...
def accumulate_stream(self, message_id, change) -> None: ...
def get_stream(self): ...
+6 -6
View File
@@ -1,12 +1,12 @@
from _typeshed import Incomplete
from threading import Thread
from typing import Any
from ..strategy.base import BaseStrategy
class AsyncStrategy(BaseStrategy):
class ReceiverSocketThread(Thread):
connection: Any
socket_size: Any
connection: Incomplete
socket_size: Incomplete
def __init__(self, ldap_connection) -> None: ...
def run(self) -> None: ...
@@ -14,9 +14,9 @@ class AsyncStrategy(BaseStrategy):
no_real_dsa: bool
pooled: bool
can_stream: bool
receiver: Any
async_lock: Any
event_lock: Any
receiver: Incomplete
async_lock: Incomplete
event_lock: Incomplete
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = True, read_server_info: bool = True) -> None: ...
def close(self) -> None: ...
+7 -7
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
unix_socket_available: bool
SESSION_TERMINATED_BY_SERVER: str
@@ -6,12 +6,12 @@ TRANSACTION_ERROR: str
RESPONSE_COMPLETE: str
class BaseStrategy:
connection: Any
sync: Any
no_real_dsa: Any
pooled: Any
can_stream: Any
referral_cache: Any
connection: Incomplete
sync: Incomplete
no_real_dsa: Incomplete
pooled: Incomplete
can_stream: Incomplete
referral_cache: Incomplete
thread_safe: bool
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = True, read_server_info: bool = True) -> None: ...
+4 -4
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
from .base import BaseStrategy
@@ -7,10 +7,10 @@ class LdifProducerStrategy(BaseStrategy):
no_real_dsa: bool
pooled: bool
can_stream: bool
line_separator: Any
line_separator: Incomplete
all_base64: bool
stream: Any
order: Any
stream: Incomplete
order: Incomplete
def __init__(self, ldap_connection) -> None: ...
def receiving(self) -> None: ...
def send(self, message_type, request, controls=None): ...
+2 -2
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
from .asynchronous import AsyncStrategy
from .mockBase import MockBaseStrategy
@@ -6,6 +6,6 @@ from .mockBase import MockBaseStrategy
class MockAsyncStrategy(MockBaseStrategy, AsyncStrategy):
def __init__(self, ldap_connection) -> None: ...
def post_send_search(self, payload): ...
bound: Any
bound: Incomplete
def post_send_single_response(self, payload): ...
def get_response(self, message_id, timeout=None, get_request: bool = False): ...
+9 -9
View File
@@ -1,25 +1,25 @@
from typing import Any
from _typeshed import Incomplete
SEARCH_CONTROLS: Any
SEARCH_CONTROLS: Incomplete
SERVER_ENCODING: str
def random_cookie(): ...
class PagedSearchSet:
size: Any
response: Any
cookie: Any
size: Incomplete
response: Incomplete
cookie: Incomplete
sent: int
done: bool
def __init__(self, response, size, criticality) -> None: ...
def next(self, size=None): ...
class MockBaseStrategy:
entries: Any
entries: Incomplete
no_real_dsa: bool
bound: Any
custom_validators: Any
operational_attributes: Any
bound: Incomplete
custom_validators: Incomplete
operational_attributes: Incomplete
def __init__(self) -> None: ...
def add_entry(self, dn, attributes, validate: bool = True): ...
def remove_entry(self, dn): ...
+2 -2
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
from .mockBase import MockBaseStrategy
from .sync import SyncStrategy
@@ -6,5 +6,5 @@ from .sync import SyncStrategy
class MockSyncStrategy(MockBaseStrategy, SyncStrategy):
def __init__(self, ldap_connection) -> None: ...
def post_send_search(self, payload): ...
bound: Any
bound: Incomplete
def post_send_single_response(self, payload): ...
+4 -4
View File
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
from .sync import SyncStrategy
@@ -7,9 +7,9 @@ class RestartableStrategy(SyncStrategy):
no_real_dsa: bool
pooled: bool
can_stream: bool
restartable_sleep_time: Any
restartable_tries: Any
exception_history: Any
restartable_sleep_time: Incomplete
restartable_tries: Incomplete
exception_history: Incomplete
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = False, read_server_info: bool = True) -> None: ...
def send(self, message_type, request, controls=None): ...
+20 -20
View File
@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from threading import Thread
from typing import Any
from .base import BaseStrategy
@@ -10,27 +10,27 @@ BOGUS_EXTENDED: int
BOGUS_ABANDON: int
class ReusableStrategy(BaseStrategy):
pools: Any
pools: Incomplete
def receiving(self) -> None: ...
def get_stream(self) -> None: ...
def set_stream(self, value) -> None: ...
class ConnectionPool:
def __new__(cls, connection): ...
name: Any
master_connection: Any
workers: Any
pool_size: Any
lifetime: Any
keepalive: Any
request_queue: Any
name: Incomplete
master_connection: Incomplete
workers: Incomplete
pool_size: Incomplete
lifetime: Incomplete
keepalive: Incomplete
request_queue: Incomplete
open_pool: bool
bind_pool: bool
tls_pool: bool
counter: int
terminated_usage: Any
terminated_usage: Incomplete
terminated: bool
pool_lock: Any
pool_lock: Incomplete
started: bool
def __init__(self, connection) -> None: ...
def get_info_from_server(self) -> None: ...
@@ -41,22 +41,22 @@ class ReusableStrategy(BaseStrategy):
class PooledConnectionThread(Thread):
daemon: bool
worker: Any
master_connection: Any
worker: Incomplete
master_connection: Incomplete
def __init__(self, worker, master_connection) -> None: ...
def run(self) -> None: ...
class PooledConnectionWorker:
master_connection: Any
request_queue: Any
master_connection: Incomplete
request_queue: Incomplete
running: bool
busy: bool
get_info_from_server: bool
connection: Any
creation_time: Any
connection: Incomplete
creation_time: Incomplete
task_counter: int
thread: Any
worker_lock: Any
thread: Incomplete
worker_lock: Incomplete
def __init__(self, connection, request_queue) -> None: ...
def new_connection(self) -> None: ...
@@ -64,7 +64,7 @@ class ReusableStrategy(BaseStrategy):
no_real_dsa: bool
pooled: bool
can_stream: bool
pool: Any
pool: Incomplete
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = True, read_server_info: bool = True) -> None: ...
def terminate(self) -> None: ...
+3 -3
View File
@@ -1,15 +1,15 @@
from typing import Any
from _typeshed import Incomplete
from ..strategy.base import BaseStrategy
LDAP_MESSAGE_TEMPLATE: Any
LDAP_MESSAGE_TEMPLATE: Incomplete
class SyncStrategy(BaseStrategy):
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
socket_size: Any
socket_size: Incomplete
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = True, read_server_info: bool = True) -> None: ...
def receiving(self): ...
+2 -2
View File
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
PARAMETERS: Any
PARAMETERS: Incomplete
def get_config_parameter(parameter): ...
def set_config_parameter(parameter, value) -> None: ...
+3 -3
View File
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
algorithms_table: Any
salted_table: Any
algorithms_table: Incomplete
salted_table: Incomplete
def hashed(algorithm, value, salt=None, raw: bool = False, encoding: str = "utf-8"): ...
+3 -3
View File
@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from logging import NullHandler as NullHandler
from typing import Any
OFF: int
ERROR: int
@@ -7,7 +7,7 @@ BASIC: int
PROTOCOL: int
NETWORK: int
EXTENDED: int
DETAIL_LEVELS: Any
DETAIL_LEVELS: Incomplete
def get_detail_level_name(level_name): ...
def log(detail, message, *args) -> None: ...
@@ -22,4 +22,4 @@ def set_library_log_detail_level(detail) -> None: ...
def get_library_log_detail_level(): ...
def format_ldap_message(message, prefix): ...
logger: Any
logger: Incomplete
+41 -41
View File
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete
oem_encoding: Any
oem_encoding: Incomplete
NTLM_SIGNATURE: bytes
NTLM_MESSAGE_TYPE_NTLM_NEGOTIATE: int
NTLM_MESSAGE_TYPE_NTLM_CHALLENGE: int
@@ -27,7 +27,7 @@ FLAG_NEGOTIATE_SIGN: int
FLAG_REQUEST_TARGET: int
FLAG_NEGOTIATE_OEM: int
FLAG_NEGOTIATE_UNICODE: int
FLAG_TYPES: Any
FLAG_TYPES: Incomplete
AV_END_OF_LIST: int
AV_NETBIOS_COMPUTER_NAME: int
AV_NETBIOS_DOMAIN_NAME: int
@@ -39,60 +39,60 @@ AV_TIMESTAMP: int
AV_SINGLE_HOST_DATA: int
AV_TARGET_NAME: int
AV_CHANNEL_BINDINGS: int
AV_TYPES: Any
AV_TYPES: Incomplete
AV_FLAG_CONSTRAINED: int
AV_FLAG_INTEGRITY: int
AV_FLAG_TARGET_SPN_UNTRUSTED: int
AV_FLAG_TYPES: Any
AV_FLAG_TYPES: Incomplete
def pack_windows_version(debug: bool = False): ...
def unpack_windows_version(version_message): ...
class NtlmClient:
client_config_flags: int
exported_session_key: Any
negotiated_flags: Any
user_name: Any
user_domain: Any
no_lm_response_ntlm_v1: Any
exported_session_key: Incomplete
negotiated_flags: Incomplete
user_name: Incomplete
user_domain: Incomplete
no_lm_response_ntlm_v1: Incomplete
client_blocked: bool
client_block_exceptions: Any
client_require_128_bit_encryption: Any
max_life_time: Any
client_signing_key: Any
client_sealing_key: Any
sequence_number: Any
server_sealing_key: Any
server_signing_key: Any
client_block_exceptions: Incomplete
client_require_128_bit_encryption: Incomplete
max_life_time: Incomplete
client_signing_key: Incomplete
client_sealing_key: Incomplete
sequence_number: Incomplete
server_sealing_key: Incomplete
server_signing_key: Incomplete
integrity: bool
replay_detect: bool
sequence_detect: bool
confidentiality: bool
datagram: bool
identity: bool
client_supplied_target_name: Any
client_channel_binding_unhashed: Any
unverified_target_name: Any
server_challenge: Any
server_target_name: Any
server_target_info: Any
server_version: Any
server_av_netbios_computer_name: Any
server_av_netbios_domain_name: Any
server_av_dns_computer_name: Any
server_av_dns_domain_name: Any
server_av_dns_forest_name: Any
server_av_target_name: Any
server_av_flags: Any
server_av_timestamp: Any
server_av_single_host_data: Any
server_av_channel_bindings: Any
server_av_flag_constrained: Any
server_av_flag_integrity: Any
server_av_flag_target_spn_untrusted: Any
current_encoding: Any
client_challenge: Any
server_target_info_raw: Any
client_supplied_target_name: Incomplete
client_channel_binding_unhashed: Incomplete
unverified_target_name: Incomplete
server_challenge: Incomplete
server_target_name: Incomplete
server_target_info: Incomplete
server_version: Incomplete
server_av_netbios_computer_name: Incomplete
server_av_netbios_domain_name: Incomplete
server_av_dns_computer_name: Incomplete
server_av_dns_domain_name: Incomplete
server_av_dns_forest_name: Incomplete
server_av_target_name: Incomplete
server_av_flags: Incomplete
server_av_timestamp: Incomplete
server_av_single_host_data: Incomplete
server_av_channel_bindings: Incomplete
server_av_flag_constrained: Incomplete
server_av_flag_integrity: Incomplete
server_av_flag_target_spn_untrusted: Incomplete
current_encoding: Incomplete
client_challenge: Incomplete
server_target_info_raw: Incomplete
def __init__(self, domain, user_name, password) -> None: ...
def get_client_flag(self, flag): ...
def get_negotiated_flag(self, flag): ...
+2 -2
View File
@@ -1,5 +1,5 @@
from typing import Any
from _typeshed import Incomplete
repr_encoding: Any
repr_encoding: Incomplete
def to_stdout_encoding(value): ...