Skip to content

Commit cba9079

Browse files
author
stroeder
committed
better wording for ldap.initialize() arguments, added ref to ldap.initialize() from LDAPObject.__init__() occurences
1 parent 1e93f61 commit cba9079

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

Doc/ldap.rst

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. % $Id: ldap.rst,v 1.35 2017/08/16 11:34:47 stroeder Exp $
1+
.. % $Id: ldap.rst,v 1.36 2017/08/16 11:42:55 stroeder Exp $
22
33
********************************************
44
:py:mod:`ldap` LDAP library interface module
@@ -21,8 +21,8 @@ and errors appear as exceptions.
2121
`draft-ietf-ldapext-ldap-c-api <https://tools.ietf.org/html/draft-ietf-ldapext-ldap-c-api>`_
2222

2323

24-
This documentation is current for the Python LDAP module, version
25-
|release|. Source and binaries are available from
24+
This documentation is current for the Python LDAP module, version
25+
|release|. Source and binaries are available from
2626
https://www.python-ldap.org/.
2727

2828

@@ -35,14 +35,19 @@ This module defines the following functions:
3535
3636
Initializes a new connection object for accessing the given LDAP server,
3737
and return an LDAP object (see :ref:`ldap-objects`) used to perform operations
38-
on that server. Parameter *uri* has to be a valid LDAP URL.
38+
on that server.
39+
40+
The *uri* parameter may be a comma- or whitespace-separated list of URIs
41+
containing only the schema, the host, and the port fields. Note that
42+
when using multiple URIs you cannot determine to which URI your client
43+
gets connected.
3944

4045
Note that internally the OpenLDAP funtion
41-
`ldap_initialize(3) <https://www.openldap.org/software/man.cgi?query=ldap_init&sektion=3>`_
42-
is called which just initializes the LDAP connection struct in the C API
43-
- nothing else. Therefore the first call to an operation method (bind,
44-
search etc.) then really opens the connection (lazy connect). Before
45-
that nothing is sent on the wire. The error handling in the calling
46+
`ldap_initialize(3) <https://www.openldap.org/software/man.cgi?query=ldap_init&sektion=3>`_
47+
is called which just initializes the LDAP connection struct in the C API
48+
- nothing else. Therefore the first call to an operation method (bind,
49+
search etc.) then really opens the connection (lazy connect). Before
50+
that nothing is sent on the wire. The error handling in the calling
4651
application has to correctly handle this behaviour.
4752

4853
The optional arguments are for generating debug log information:
@@ -566,9 +571,10 @@ LDAPObject classes
566571
and closed when the LDAP object is deleted. Internally :py:class:`LDAPObject`
567572
is set to :py:class:`SimpleLDAPObject` by default.
568573

569-
570574
.. py:class:: SimpleLDAPObject(uri [, trace_level=0 [, trace_file=sys.stdout [, trace_stack_limit=5]]])
571575
576+
The arguments are same like for function :py:func:`initialize()`.
577+
572578
Instances of :py:class:`LDAPObject` are returned by :py:func:`initialize()`
573579
and :py:func:`open()` (deprecated). The connection is automatically unbound
574580
and closed when the LDAP object is deleted.
@@ -580,6 +586,8 @@ LDAPObject classes
580586
reconnects when using the synchronous request methods (see below). This class
581587
also implements the pickle protocol.
582588

589+
The first arguments are same like for function :py:func:`initialize()`.
590+
583591
For automatic reconnects it has additional arguments:
584592

585593
*retry_max* specifies the number of reconnect attempts before
@@ -745,7 +753,7 @@ and wait for and return with the server's result, or with
745753

746754
The *extreq* is an instance of class :py:class:`ldap.extop.ExtendedRequest`
747755
containing the parameters for the extended operation request.
748-
756+
749757
If argument *extop_resp_class* is set to a sub-class of
750758
:py:class:`ldap.extop.ExtendedResponse` this class is used to return an
751759
object of this class instead of a raw BER value in respvalue.
@@ -925,7 +933,7 @@ and wait for and return with the server's result, or with
925933
The additional arguments are:
926934

927935
*add_ctrls* (integer flag) specifies whether response controls are returned.
928-
936+
929937
add_intermediates (integer flag) specifies whether response controls of
930938
intermediate search results are returned.
931939

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy