2.4.0 patches need review

Rich Megginson rich.megginson at gmail.com
Tue Mar 1 21:03:19 CET 2011


On 02/21/2011 02:29 PM, Michael Ströder wrote:
> HI!
>
> I've committed a larger patch contributed by Rich Megginson fixing SF#2829057
> [1] and adding generic support LDAPv3 extended operations. Many thanks to him.
>
> I've done some tests for [1] by successfully using the LDAP persistent search
> control against eDirectory and OpenDJ (OpenDS fork) and receive/decode the
> response control. Also a case which does not seem to work with recent
> python-ldap 2.3.13.
>
> But I think this large patch needs much more review and some decision
> regarding the arguments passed to and results returned by method
> LDAPObject.result4().
I've tested with 389 - extops work fine - dereference control (per entry 
return control) works fine.

About the arguments and return values to result4 - with the current code 
I have to do something like this:

     rtype, rdata, rmsgid, decoded_serverctrls, extop_rspoid, 
extop_rspval = srv.result4(msgid, 0, -1, 1)

That is, I only want the decoded_serverctrls, but I have to add items 
for extop_rspoid and extop_rspval even though I don't want them, because 
result4 always returns a 6-tuple, regardless of what the caller wants.  
Maybe this is the convention, to have to provide all of the optional 
return values, to make it consistent that result4 always returns a 
6-tuple?  Because it would be pretty easy for result4 to look at its 
arguments and do something like:
if add_extop:
   return a 6-tuple
else:
   return a 4-tuple

> So I'd like to encourage all the list readers to checkout CVS HEAD and play
> with it.
>
> Ciao, Michael.
>
> [1]
> http://sourceforge.net/tracker/?func=detail&aid=2829057&group_id=2072&atid=352072
>
> 


More information about the python-ldap mailing list