This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Convert all Python scripts to Python 3
- From: Alistair Francis <alistair23 at gmail dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Tue, 4 Feb 2020 16:19:17 -0800
- Subject: Re: [PATCH] Convert all Python scripts to Python 3
- References: <20200131170322.25332-1-alistair.francis@wdc.com> <CAKCAbMgh7YrF7FJO38mKAnyhG+Jy_M+g7KQtuGG1Cyj0_LFQpw@mail.gmail.com> <CAKmqyKNe-eJpBOPpQqsy7OX8Yh0h6pwYt_Nc8Zx59M=ZzEvAUg@mail.gmail.com> <CAKCAbMiWER78VRdsr_hz0HToXdPN9VOC2KCX1g-x2zqEY+h-Cg@mail.gmail.com>
On Tue, Feb 4, 2020 at 10:48 AM Zack Weinberg <zackw@panix.com> wrote:
>
> On Fri, Jan 31, 2020 at 6:51 PM Alistair Francis <alistair23@gmail.com> wrote:
> > On Fri, Jan 31, 2020 at 9:29 AM Zack Weinberg <zackw@panix.com> wrote:
> > > I think this change needs manual explicit testing that all of the
> > > scripts do in fact work with Python 3 (and not just any Python 3, but
> > > specifically version 3.4, since that's the oldest version that
> >
> > I don't have a way to test all of the scripts, especially with Python 3.4.
> >
> > My original patch just updated math/gen-libm-test.py as I have tested
> > that with Python 3 (although not 3.4). I don't know if I will be able
> > to explicitly test all of the scripts with Python3 (definitely not
> > with 3.4, where do you even get that?). The painful part with Python
> > testing is you actually need to run the code, not just run the script
> > once.
> >
> > With Python2 EOL and the assumption that everyone is already using
> > Python3 anyway (and calling this scripts with $(PYTHON)) I was hoping
> > this would be enough.
>
> I may have misunderstood the situation. I thought we were allowing
> use of either Python 2 or 3 for these scripts, but on further
> investigation, it looks more like we were already requiring them to be
> run with v3. If so, your proposed change does not need testing,
> because they must already work with v3. Joseph, you've been
> spearheading a lot of the use of Python - can you confirm that Python
> 3 is already being used for all these scripts?
That was my understanding as well.
>
> > I also have no way to test a setup with Python 2.
>
> The simplest way to test with a Python 2-only environment (or a
> 3.4-only environment) would probably be to use 'schroot'
> (https://wiki.debian.org/Schroot) together with appropriately old
> versions of Debian. I don't know off the top of my head what those
> versions are.
>
> > On Arch "python" is Python3
>
> That is a bug in Arch. The bare command name "python" and the #! path
> /usr/bin/python need to be permanently reserved for Python 2. As long
> as "python3" is also available, we don't actually care, but we should
> actively refuse to support an environment where there is no "python3"
> command.
Ah ok. I agree that we can throw and error if there is no "python3".
Alistair
>
> zw