[PATCHES] Build pytalloc for two Python versions at once, port to py3

Petr Viktorin pviktori at redhat.com
Fri Mar 13 07:32:14 MDT 2015

On 03/13/2015 04:08 AM, Andrew Bartlett wrote:
> On Thu, 2015-03-12 at 12:08 +0100, Petr Viktorin wrote:
>> I've started looking at tdb and ldb; you can see the WIP patches here:
>> https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?h=py3compat-34ad28d&id=d479cbfe08b143f65c674a005f2acc9257a30a47
>> https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?h=py3compat-34ad28d&id=34ad28d225771541e3a294bf3782be0839575148
>> I'm not yet interested in a review of these patches, just note that they
>> don't really add a mess of #defines.
> On these, this is what I don't like, and we need to be smarter about:
> - self.assertEquals(["789"], list(rm["bla"]))
> + self.assertEquals([b"789"], list(rm["bla"]))
> I don't want to see these b things everywhere, because we will be
> chasing our tail for the whole duration of the port if one isn't added
> somewhere.

Yes, I'm aware of this issue. There's a balance between convenience and 
being explicit, but I'd like to leave that to the next round of 
discussions. Or do you think the solution to this will affect porting 
pytalloc, or the buildsystem changes?

Please view these WIP patches just as my idea of what the C code in the 
modules should look like.

Petr Viktorin

More information about the samba-technical mailing list