patch to compile with OpenLDAP 2.0.7
Jeffrey C. Ollie
jeff at ollie.clive.ia.us
Fri Nov 17 16:56:25 CET 2000
On Fri, Nov 17, 2000 at 03:34:54PM +0100, David Leonard wrote:
> eg ufn_search_s() might be #ifdef'd out and some python program that wants
> to use it will get a NameError when it tries to use it. A better exception
> would be NotImplementedError.
I don't have a huge problem with that.
> A similar problem arises with 'constants'.. I'm not sure what to do here..
> make all undefined cosntants equal None?
No, as this will cause problems that are harder to debug as None may
be a valid parameter in some cases. If you let NameError exceptions
be raised you can immediately track down the offending reference. I
don't think that adding code to raise NotImplementedError in the case
of undefined constants buys you anything but code bloat.
> also there should be some nice way of reliably determining the
> underlying library's api version ... maybe _ldap.api_version...
> any suggestions on how that might be done nicely are welcome.
I'd suggest using LDAP_API_VERSION, LDAP_VENDOR_NAME, and
LDAP_VENDOR_VERSION. There are also some miscellaneous
P.S. Konstantin: I didn't receive a copy of your e-mail with the
patches, could you try sending it again?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
More information about the python-ldap