[PATCHES] Port pytalloc to Python 3

Alexander Bokovoy ab at samba.org
Fri Dec 5 03:54:30 MST 2014


On Fri, Dec 5, 2014 at 12:47 PM, Jelmer Vernooij <jelmer at samba.org> wrote:
> On Fri, Dec 05, 2014 at 12:10:42PM +0200, Alexander Bokovoy wrote:
>> On Fri, Dec 5, 2014 at 12:04 PM, Petr Viktorin <pviktori at redhat.com> wrote:
>> > On 12/05/2014 10:38 AM, Andrew Bartlett wrote:
>> >>
>> >> On Fri, 2014-12-05 at 10:08 +0100, Petr Viktorin wrote:
>> >>>
>> >>> On 11/28/2014 07:36 PM, Jelmer Vernooij wrote:
>> >>>>
>> >>>> On Fri, Nov 28, 2014 at 07:13:42PM +0100, Petr Viktorin wrote:
>> >>>>>
>> >>>>> 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.
>> >>>>
>> >>>> Which major projects are there, just beside OpenChange and FreeIPA?
>> >>>>
>> >>>> I do of course want to accomodate the projects that use our bindings, so
>> >>>> let's
>> >>>> see if we can come up with a plan that is satisfactory for both of us.
>> >>>> :)
>> >>>>
>> >>>> Is there any reason you couldn't just depend on a newer version of Samba
>> >>>> once
>> >>>> you migrate FreeIPA to Python3? Why is it essential for you Samba
>> >>>> support multiple
>> >>>> Python versions?
>> >>>
>> >>>
>> >>> Well, that would essentially force the FreeIPA team to maintain a fork
>> >>> of Samba until FreeIPA is ported. And porting FreeIPA's dependencies
>> >>> might take some time.
>> >>
>> >>
>> >> Why not leave Samba until later then, if this is a concern?
>> >>
>> >> Andrew Bartlett
>> >
>> >
>> > If you're asking why *I* don't hold off porting Samba, it's because Samba
>> > it's a part of the Fedora Live DVD, and the goal is to remove Python 2 from
>> > that completely. Porting FreeIPA can wait until later, when we try to tackle
>> > the entire distro.
>> >
>> >
>> > Speaking from my other (and very separate) role, as a FreeIPA developer:
>> > Python 3 is not a priority there, mainly because all the dependencies are
>> > not ported yet. Any of the dependencies could ask the same question – why
>> > not leave this one project until the end?
>> That's why it is sensible for an infrastructure components like
>> libtalloc and friends to support both Python2 and Python3.
>> If there could be a phaseout time like several releases, it would give
>> people at least a chance to allocate time to port over.
> For talloc, tdb and ldb it makes sense to support both python2 and
> python3. For Samba itself, the burden of maintaining support for both
> is much higher, and the benefits smaller.
Yes. However, talloc/tdb/ldb support for both Python2 and Python3
means there is need to improve our build system to support both Python
versions so this task is relevant.

As for migrating FreeIPA to Python3 if proper Samba bindings would
become Python3 only, this is something we can discuss when they would
become as such -- I don't see Samba migrating earlier than 4.3 which
means FreeIPA would have time next year realistically speaking.

-- 
/ Alexander Bokovoy


More information about the samba-technical mailing list