[python-ldap] Status of Python 3 support for python-ldap
pviktori at redhat.com
Tue Jul 28 16:06:01 CEST 2015
On 07/19/2015 01:12 PM, Michael Ströder wrote:
> David Riddle wrote:
>> I am a software developer at the University of Illinois. We make
>> extensive use of python-ldap in our python projects. We are looking to
>> start moving to Python 3, and we would like to know what the status of
>> Python 3 support is for python-ldap.
> I'm watching Python 3 activities with interest but have currently no spare
> time and no business to contribute.
> So personally I'd favor to see a complete rewrite for Python 3 because of
> these reasons:
> 0. People do have to touch their calling code when migrating it from Python 2
> to Python 3 anyway.
> 1. A clear contribution policy has to be defined and enforced to be able to
> solve the blurry licensing situation.
> 2. A rewrite would be a good chance to get better code-base for solving some
> of the long out-standing issues (e.g. response controls in LDAPError
> exception). Some of the current C code is a real mess hard to maintain.
> The ultimate goal should be to contribute an LDAP module into Python's
> standard lib which up to now was not possible because of licensing issues.
> Therefore I consider all the current quick-patch approaches to be the wrong
> approach. And especially it's hard to attract people to quickly contributed
> maintain code for years.
Unfortunately, I don't think anyone has the time to rewrite everything
from scratch. (And those who do tend to use a different API – see the
So I think porting python-ldap, and then improving it, is the way to go.
As for getting into the Python standard library, I don't think that's a
- Python is not likely to start depending on OpenLDAP libraries.
- New stdlib code is expected to have a pure-python implementation if
possible, so it can work on alternative interpreters (PyPy, Jython, ...)
- Python developers nowadays prefer having the "batteries" on PyPI,
unless needed by Python itself or its tests.
Recently there was some work on the Python3 porting front:
Raphaël's patches are now rebased on top of the current upstream
python-ldap, and work on it continues here:
A release is on PyPI: https://pypi.python.org/pypi/pyldap
I'd like to invite anyone interested in the Python3 port to join forces.
Any applicable improvements should be submitted back to python-ldap, and
any new functionality from python-ldap should be merged in. Hopefully,
this can all be merged back into python-ldap one day.
More information about the python-ldap