[PATCHES] Port pytalloc to Python 3
jelmer at samba.org
Fri Nov 28 11:36:05 MST 2014
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  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  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).
> 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
> 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.)
Originally we supported just 2.4, but that requirement has since changed to
> 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.
Yes, that has been my experience in other projects with a much smaller codebase.
Maintaining a codebase that supports both 2 and 3 is a pain. Every single
change you make can break the other Python, and we'll need convenience wrappers
to support functionality that has different invocations on both.
We'll need to run our testsuite with both Python2 and Python3 to prevent
regressions; that doubles the resources it needs.
We're already strained on developer resources as is in Samba, so I'm reluctant
to make Samba development more time-consuming.
More information about the samba-technical