From: David L. <dav...@ds...> - 2000-11-17 14:46:13
|
Hi everyone. I'm in germany at the moment hey these patches look ok i have a medium concern, something that i've been guilty of and would like to see go away, and that is conditional existance of interfaces. 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. ie instead of writing #ifdef LDAP_API_THING ldap_ufn_search_s(PyObject blah, blah) { blah; } #endif it ought to be ldap_ufn_search_s(PyObject blah, blah) { #ifdef LDAP_API_THING blah; #else return Py_ErrObject(Py_NotImplementeError); #endif } A similar problem arises with 'constants'.. I'm not sure what to do here.. make all undefined cosntants equal None? 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. tschuss! d On Fri, 17 Nov 2000, Konstantin Chuguev typed thusly: > Hello Jeffrey and all. > > Attached are recent version of my patches, if you are interested. They > provide the following: > > * automatic recognition of OpenLDAP-1.2.x or OpenLDAP-2.0.x at compilation > time, building different sets of Python LDAP constants and error > exception objects for different OpenLDAP versions; > * special tuples for continuation references: (None, [list_of_URLs]). > Compare to normal entry tuples: (DN, {dict_of_attributes}). Both types > of tuples can be returned from search methods; > * new type of result type in the result method: SEARCH_REFERENCE. > * a few new ldap object attributes, among them: referrals - disables (0) > or enables (1) following referrals; is set to 1 after ldap object > initialisation; version (2 or 3) - sets LDAP protocol version (default > is 2). > > Any comments/suggestions/fixes are welcome. > > > Regards, > Konstantin. > > "Jeffrey C. Ollie" wrote: > > > On Thu, Nov 16, 2000 at 11:55:57PM +0100, Michael Ströder wrote: > > > "Jeffrey C. Ollie" wrote: > > > > > > > > I've gotten today's CVS version to compile against OpenLDAP 2.0.7. > > > > > > Ooops. Double efforts. I'm currently testing patches by Konstantin > > > (Cc:-ed) which also allow to retrieve search continuation references > > > (LDAPv3 referrals). > > > > > > He made some changes to attributes of LDAPObject. Especially setting > > > the options is different. > > > > I didn't know that anyone else was working on it... The list has been > > quiet for some time now. It looks like Konstantin's work goes beyond > > what I intended to accomplish. I wasn't looking to add any > > functionality, just to get python-ldap to compile and work. But I'd > > be happy to test out other patches and perhaps fix a bug or two. > > > > Jeff > > > > ------------------------------------------------------------------------ > > Part 1.2Type: application/pgp-signature > > -- > * * Konstantin Chuguev - Application Engineer > * * Francis House, 112 Hills Road > * Cambridge CB2 1PQ, United Kingdom > D A N T E WWW: http://www.dante.net > > > -- David Leonard Dav...@ds... DSTC Room:78-632 Ph:+61 7 336 58358 The University of Queensland http://www.dstc.edu.au/ QLD 4072 AUSTRALIA B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8 Cassette tapes have an almost unlimited capacity for data. - Commodore 64 Programmer's Reference Guide (1983) |