[python-ldap] Are there still enough python 2.1 users for python-ldap classes to be old style?

Chris Dukes pakraticus+python-ldap at gmail.com
Fri Apr 1 22:33:26 CEST 2011

On Fri, Apr 01, 2011 at 10:03:11PM +0200, Michael Ströder wrote:
> Chris Dukes wrote:
> > I know per the FAQ python-ldap is tested with python 2.0 and up and
> > should work with python 1.5.  But given that python-ldap 2.4 requires
> > openldap 2.4, is there any point in the classes remaining old style?
> Funny, for various reasons (e.g. sets) I thought about the minimum required
> Python version and I've also re-read the FAQ today.
> > At first glance only
> > ldap/schema/models.py:class SchemaElement:
> > ldap/schema/subentry.py:class SubSchema:
> > ldap/__init__.py:class DummyLock:
> > ldap/async.py:class AsyncSearchHandler:
> > ldap/controls.py:class LDAPControl:
> > ldap/ldapobject.py:class SimpleLDAPObject:
> > ldap/resiter.py:class ResultProcessor:
> > ldap/sasl.py:class sasl:
> > dsml.py:class DSMLWriter:
> > ldapurl.py:class LDAPUrlExtension:
> > ldapurl.py:class LDAPUrl:
> > ldif.py:class LDIFWriter:
> > ldif.py:class LDIFParser:
> > 
> > would need to be updated to new style objects.
> What would be the benefits especially in python-ldap?
> I'm rather old-fashioned but willing to learn.

The benefits.


If i start with a class that inherits from ldap.async.LDAPWriter
and decide ldap.async.AsyncSearchHandler works better,
and LDAPWriter and AsyncSearchHandler are old style classes, I'll have
to change ever mention of LDAPWriter in my class to AsyncSearchHandler.
But if they are new style classes, I only have to change
class MyClass(LDAPWriter):
class MyClass(AsyncSearchHandler):

because i can use
instead of
having to explicitly specifying the superclass throughout.

And i apologize about the subtly different email address.
I've moved most of my mail handling from mutt to evolution.
Mutt will let me edit the From: line on the fly and automatically
set the From: line on replies based on who I'm replying to.
Evolution it appears I have to setup an account for each of them.

> Ciao, Michael.

Chris Dukes
Don't look a gift lion in the mouth.

More information about the python-ldap mailing list