Samba and Python2

Stefan Metzmacher metze at samba.org
Thu Feb 14 07:59:41 UTC 2019


Am 14.02.19 um 05:13 schrieb Tim Beale via samba-technical:
> I've attached an updated patch-set to drop the py2 jobs from CI
> (.gitlab-ci.yml just got substantially reworked in master).
> 
> New CI link: https://gitlab.com/samba-team/devel/samba/pipelines/47451100
> 
> On 13/02/19 4:31 PM, Tim Beale via samba-technical wrote:
>> Hi,
>>
>> Just following up on this. How about something like the following? It
>> tries to merge what was discussed with what was already in the WHATSNEW.
>>
>> python3 support
>> ---------------
>> This is the first release of Samba which has full support for Python 3.
>> Samba 4.10 still has support for Python 2, however, Python 3 will be used by
>> default, i.e. 'configure' & 'make' will execute using python3.
>>
>> To build Samba with python2 you *must* set the 'PYTHON' environment variable
>> for both the 'configure' and 'make' steps, i.e.
>>    'PYTHON=python2 ./configure'
>>    'PYTHON=python2 make'
>> This will override the python3 default.
>>
>> Alternatively, it is possible to produce Samba Python bindings for both
>> Python 2 and Python 3. To do so, specify '--extra-python=/usr/bin/python2'
>> as part of the 'configure' command. Note that python3 will still be used as
>> the default in this case.
>>
>> Note that Samba 4.10 supports Python 3.4 onwards.
>>
>> Future Python support
>> ---------------------
>> Samba 4.10 will be the last release that comes with support for Python 2.
>> Unfortunately, the Samba Team doesn't have the resources to support both
>> Python 2 and Python 3 long-term.
>>
>> Samba 4.11 will not have any support for Python 2. This means if you use
>> Python 2 bindings it is time to migrate to Python 3 now.

I think we should make it clear that Python 2 and also any Python 3
version would be enough to build --without-python.

>> Also note that Samba 4.11 will only support Python 3.6 onwards.

I'd say '... will most likely only support ...'

We should actually try to keep 3.4+ (or at least 3.5+) as long as we
can. E.g. Ubuntu 16.04 uses 3.5.2 and I'm pretty sure it will be
security updates even if 3.5 is no longer supported upstream.
Debian jessie only has 3.4.2 and stretch 3.5.3.

If we really make use of new async/await in important code sections
we can discuss it again.

I think samba-nopython-py should not be different than samba-nopython.
Can't we just keep the magic '-py2' handling for that?

I think we should also add some basic tests to it, instead of just
compiling it.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190214/c16b6dd9/signature.sig>


More information about the samba-technical mailing list