[PATCHES] Port ldb to Python 3

Stefan Metzmacher metze at samba.org
Thu Jul 30 09:08:44 UTC 2015


Hi Petr,

> Thank you Andrew and Stefan for reviewing the patches for tdb!
> 
> 
> These patches add support for Python 3 to the last of Samba's
> stand-alone libraries, ldb.
> 
> There are some general fixes (mainly refcounting) thrown in.

As you seem to understand the refcounting could you have a look at
https://bugzilla.samba.org/show_bug.cgi?id=7902 ?
We have a refcount problem in our pidl generated python bindings...

> Under Python 3, DNs, attribute names, filters, controls are always text
> (unicode) strings, encoded to/from UTF-8 for storage. Attribute values
> are byte strings.

Does that have any impact on all the other scripts we have e.g. samba-tool,
source4/dsdb/tests/python/* and others?

> When creating DNs and attribute values, both text and bytes are acepted.
> This allows creating messages from homogeneous dicts (where values and
> "dn" are all either text or bytes).
> 
> Similarly to the tdb bindings, LDB Messages and MessageElements have a
> .text attribute, which offers a text view on the contents: any value
> retrieved from it will be decoded using UTF-8. The wrapper is
> implemented in a new Python module.
> 
> 
> -- Petr Viktorin
> 
> From c65e8f315077a0a0fef3f9cf164850ce6d813951 Mon Sep 17 00:00:00 2001
> From: Petr Viktorin <pviktori at redhat.com>
> Date: Tue, 9 Jun 2015 10:31:22 +0200
> Subject: [PATCH 2/9] ldb: Build for two Python versions at once

Shouldn't that be the last patch? I guess this will only
work after all the other fixes.

Other than that I'm happy with the changes.

Thanks!
metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150730/5dc667b6/signature.sig>


More information about the samba-technical mailing list