Dropping Python2 (except buildtime)

Andrew Bartlett abartlet at samba.org
Mon Mar 11 04:22:05 UTC 2019

On Mon, 2019-03-11 at 00:03 -0400, Nico Kadel-Garcia wrote:
> On Sun, Mar 10, 2019 at 8:10 PM Andrew Bartlett via samba-technical
> <samba-technical at lists.samba.org> wrote:
> > G'Day,
> > 
> > Just a quick note to say that I have a merge request in to finally drop
> > our python2 support, beyond the build process.  (We already stopped
> > testing it a month or so ago).
> > 
> > This also removes --extra-python and will make it easier for whatever
> > changes need to be made for our python helper library names etc to be
> > made, as we will then always be in py3 mode.
> > 
> > If there is any reason this shouldn't go in please let me know soon, as
> > I would like to push it soon after 4.10.0 is released as the tests.py
> > changes keep needing rebase work.
> One reason is RHEL 7. The .spec files of various RPM based systems
> rely on a "%python_provides" macro, one which does not operate
> properly even with the EPEL published python34 or python36 modules.
> It's vaguely possible to manually replace those "%python_provides"
> macros for RHEL 7 compilation.
> I don't want to suggest that this discard of python 2 never be
> completed. I'm merely saying that there is a price in that even I
> would find it to be extra work to port 4.10 to RHEL 7 if this is
> completed. And you did ask if there is *any* reason.

Thanks.  We are aware of the RHEL6 and RHEL7 issues, but can't support
Python2 any longer, the fiction that one codebase can run the two
languages is very leaky.  

For example this:
can't be backported to Samba 4.10 as-is, because the python2 print()
doesn't have a flush argument.  And the rest of the deliberate
diversion in string handling very much makes it 'write one, debug

We already published the policy in the WHATSNEW (citing developer
resource constraints), pulled the testing of py2 from master, what
remains now is the active removal of support.

That said, you would be correct to notice this is the pivitol patch. 
>From here any idea of returning to python2 support would become much

Also, remember we still support a pure file-server build with Python
2.6, just no bindings or AD DC.

Thanks for the feedback!

Andrew Bartlett 

Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list