[19756] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Python 3 for k5test.py

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sat Apr 28 15:40:57 2018

From: Greg Hudson <ghudson@mit.edu>
To: krbdev@mit.edu
Date: Sat, 28 Apr 2018 15:40:44 -0400
Message-ID: <x7dbme3p1ab.fsf@equal-rites.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

I am thinking now might be the right time to move to Python 2 to Python
3 for the Python test suite.  This is based on:

* Per https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes, Ubuntu 18.04
  doesn't install Python 2 by default, and implies that 20.04 won't
  include Python 2 in main.  (I would guess it might continue to be
  available in universe.)

* https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
  anticipates an update to PEP 394 recommending that /usr/bin/python be
  Python 3, and talks about maybe getting rid of Python 2 in a few
  years.

Right now the test suite requires Python 2.5, which was released roughly
three years before Python 3.0.  My thought is that if someone is
building MIT krb5 on a system too old to offer Python 3, they are
probably building multiple newer versions of software packages, and
adding Python 3 to that set isn't a huge burden.  Or they can just not
run the test suite.  But if someone has a need to build and modify krb5
1.17 on a post-2020 operating system which doesn't conveniently offer
Python 2, having to build Python 2 just for our test suite could be more
of a burden.  Of course that might also happen for 1.16 and prior, but
we can't reasonably do anything about that.

I prototyped the work required back in February, and it isn't a lot:
https://github.com/greghudson/krb5/commits/python3

If we don't make this change now, I will at least make configure.in look
for "python2" in the path in preference to "python", and to skip the
Python tests if the interpreter we do find has sys.hexversion >=
0x3000000.
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post