[PATCHES] Port pytalloc to Python 3

Petr Viktorin pviktori at redhat.com
Fri Nov 28 11:13:42 MST 2014


On 11/28/2014 06:29 PM, Jelmer Vernooij wrote:
> Hi Petr,
>
> On Thu, Nov 27, 2014 at 03:47:30PM +0100, Petr Viktorin wrote:
>> I've seen a discussion on this list from May 2013 [0] with some kind of
>> consensus that porting Samba is inevitable, and would be hard, but there was
>> no rush. Some posts there cite a wiki page [1] that used to warn against
>> moving prematurely, but now it says:
>>> Python 2.x is legacy, Python 3.x is the present and future of the language
> Thanks for working on this!
>
> I think supporting Python2 and Python3 simultaneously makes sense at least for
> our standalone libraries (talloc, ldb, tdb).
>
> Maintaining support for two versions of Python at the same time
> is painful and very costly. If we switch to Python3, we should drop
> Python2 shortly afterwards if not at the same time.
>
> With my Debian/Ubuntu hat on, dropping Python2 support is fine. What do other
> people think? Python3 was released in 2008, so surely it's made its way into
> most distributions at this point..
>
> A migration would also need to be coordinated with OpenChange, who
> have code that uses our Python bindings (all in Python2).

-1
There are more projects that use the bindings, and they will need time 
to be ported. Some have other dependencies that aren't there yet. I know 
FreeIPA uses the bindings, and porting that definitely won't happen 
overnight.

You mention that Samba supports Python 2.6+. Is that documented 
somewhere? (I could swear I read 2.4 somewhere, which sure made the 
porting look a lot more intimidating. My error there.)

Is the maintentance cost really that high? If you target 2.6+ and 3.3+, 
the differences on the Python side are small enough that very many 
libraries are nowadays single-source compatible with both 2.6+ and 3.2+. 
I don't have extensive frontline experience with C extensions, but 
#ifdefs and macros should make it bearable.

> If we're going to migrate some infrastructure over, we should make sure
> that we set up python3 on at least some build farm machines and possibly
> sn-devel so that python3 support doesn't regress.

Thank you for having a look at the patches! I'm not on this project 
full-time, but I will get to your comments next week.

-- 
Petr³



More information about the samba-technical mailing list