[python-ldap] Patch: ldap.syncrepl UUID constructors use bytes (Python 3 compatbility)

Karl Kornel akkornel at stanford.edu
Sun Nov 19 20:43:46 EST 2017


Hi Michael, good evening!

I have tested with the latest code from CVS.  The Lib/ldap/syncrepl.py I have is CVS revision 1.12.

Although I did get issues related to pyasn1, I did not get any bytes-related issues.  So, I think this looks good!

I’m sure that the pyldap maintainers will also appreciate not having to maintain an extra Python 3 modification, so thank you for that as well!

~ Karl

On 11/18/17, 6:25 AM, "Michael Ströder" <michael at stroeder.com> wrote:

    Karl,
    
    Michael Ströder wrote:
    > Karl Kornel wrote:
    >> The problem is this: In Python 3, the UUID class constructor’s “bytes” input requires
    >> that you provide a bytes object.
    >> [..]
    >> This patch also works on test code I have in development
    >> (https://github.com/akkornel/syncrepl), running on Python 2.7 with python-ldap 2.4.38.
    >> But, I understand that you might not want to accept this until the t_syncrepl.py is
    >> more complete.
    > 
    > Thanks for your submission.
    > 
    > AFAIK the built-in function bytes() was introduced in Python 2.6. So unfortunately this
    > raises a question about back-ward compability to older Python versions.
    
    Now that python-ldap 2.5.x requires Python 2.7 I've committed your patch
    to HEAD. Please test.
    
    Ciao, Michael.
    
    



More information about the python-ldap mailing list