[PATCHES] Port ldb to Python 3

Andrew Bartlett abartlet at samba.org
Sun Aug 16 22:12:29 UTC 2015


On Wed, 2015-08-12 at 22:53 +0200, Stefan Metzmacher wrote:
> Hi Petr,
> 
> > > > > > 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.
> > > > 
> > > > Well, having this in first made it possible to work on the 
> > > > porting
> > > > patches. It doesn't break things, because you still need to 
> > > > configure
> > > > with --extrapython=python3 to enable this.
> > > > 
> > > > You can reorder the patches and apply this at the end; it 
> > > > doesn't
> > > > conflict with the others.
> > > > 
> > > > > Other than that I'm happy with the changes.
> > > > 
> > > > Thanks for reviewing!
> > > 
> > > 
> > > Hello,
> > > Anything I can do to help push this forward?
> > 
> > Not really, and I do appreciate your patience.  I've just not had a
> > chance to look over it in detail yet.
> 
> I've reviewed most of the patches see
> https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/
> master3-python
> 
> I have just a couple of questions.
> 
> This one needs to be squashed
> https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=985f384e1
> fe3d998c032eb17f01d991ea33fdbfb
> into
> https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=b8aaa4a02
> 0d6d36972fdf6fb33d762b9321699a7
> otherwise the build with --picky-developer fails.
> 
> I've added some TODO's here:
> https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=5e00a20e5
> 5baa3f83d69bf0dc9280527a3af7ae1
> 
> As I'm trying to use --extra-python=/usr/bin/python3 on ubuntu 14.04
> 
> I've got the following when trying to bump the ldb version.
> 
> https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=0604992f1
> a185557102881e4837bef291696053e
> 
> A pyldb-util.cpython-34m-1.1.22.sigs is generated, the question would
> how can we have just
> one pyldb-util-1.1.22.sigs that is checked for both versions or we 
> need
> a python2 and a python3 file. But that should not depend an the exact
> python3 version.

I was wondering why do we check the ABI on this at all, and for those
following along, the issue is that as well as being used as the
python/C interface (called from python), pyauth and pydsdb call 
pyldb_Object_AsDn().  It is this ABI that we need to lock down on the C
side with the ABI checker.

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150817/775ed908/signature.sig>


More information about the samba-technical mailing list