[python3-ldap] Python 0.9.7 released!

python3ldap python3ldap at gmail.com
Fri Dec 19 22:42:04 CET 2014


Hello,
I've released the 0.9.7 release of python3-ldap. Now the library has
full dual IP stack capability. You can chose to use IPv4 or IPv6 and
failback to the other protocol if the server is unreachable.

The library gets the ip addresses from the dns server and follows the
mode specified in the "mode" parameter of the Server object:
IP_SYSTEM_DEFAULT IP_V4_ONLY IP_V6_ONLY IP_V4_PREFERRED
IP_V6_PREFERRED

With IP_SYSTEM_DEFAULT it follow the default of the os, while with
IP_V4_ONLY or IP_V6_ONLY it tries onòly the IPs returned by the DNS
server for the specified protocol. If you specify IP_V4_PREFERRED or
IP_V6_PREFERRED it start with the request protocol and fail back to
the other one if no connection is available.

The ADDRESS_INFO_REFRESH_TIME config parameter in ldap3 namespace
specifies the number of seconds before refreshing the addresses from
dns. It defaults to 300 (5 minutes).

I prefer this solution over RFC6555 because it let the developer
decide how connection must be made. RFC 6555 is good to provide an
automatic path from ipv4 to ipv6.and can eventually be implemented
later in the library as an additional "mode".

I've also revised the "reusable" strategy, resolving some deadlocks
happening when reading the schema from different servers.

Let me know if the "mode" is working, because I have limited access to
IPV6 servers.

Also, as requested in this mailing list I've shortened some CONSTANTS
used in the Server and Connection objects definition. The former
parameters are still valid and will not be deprecated.

I've also revised the "reusable" strategy. It should be faster now and
should avoid race conditions that randomly appears.


The full changelog for 0.9.7:

CHANGELOG
=========
* 0.9.7 2014.12.17
    - Fixed bug for auto_range used in paged search
    - Added dual IP stack mode parameter in Server object, values are:
IP_SYSTEM_DEFAULT, IP_V4_ONLY, IP_V4_PREFERRED, IP_V6_ONLY,
IP_V6_PREFERRED
    - Added read_server_info parameter to bind() and start_tls() to
avoid multiple schema and info read operations with auto_bind
    - Redesigned Reusable (pooled) strategy
    - Added LDAPResponseTimeoutError exception raised when
get_response() doesn't receive any response in the allowed timeout
period
    - Added shortened authentication parameters in ldap3 namespace:
ANONYMOUS, SIMPLE, SASL
    - Added shortened scope parameters in ldap3 namespace: BASE, LEVEL, SUBTREE
    - Added shortened get_info parameters in ldap3 namespace: NONE,
DSA, SCHEMA, ALL
    - Added shortened alias dereferencing parameters in ldap3
namespace: DEREF_NONE, DEREF_SEARCH, DEREF_BASE, DEREF_ALWAYS
    - Added shortened connection strategy parameters in ldap3
namespace: SYNC, ASYNC, LDIF, RESTARTABLE, REUSABLE
    - Added shortened pooling strategy parameters in ldap3 namespace:
FIRST, ROUND_ROBIN, RANDOM
    - Added reentrant lock to avoid race conditions in the Connection object
    - When run in Python 2.7.9 uses SSLContext
    - Tested against Python 2.7.9, PyPy 2.4.0 and PyPy3 2.4.0
    - setuptools updated to 8.2.1

Bye, Giovanni


More information about the python3-ldap mailing list