[llvm-dev] Python 2 compatibility for utility scripts
Philip Reames via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 17 17:36:42 PST 2019
On 12/17/19 10:33 AM, Nico Weber via llvm-dev wrote:
> On Tue, Dec 17, 2019 at 1:15 PM James Y Knight <jyknight at google.com
> <mailto:jyknight at google.com>> wrote:
>
>
>
> On Tue, Dec 17, 2019 at 12:55 PM Nico Weber <thakis at chromium.org
> <mailto:thakis at chromium.org>> wrote:
>
> On Tue, Dec 17, 2019 at 12:41 PM James Y Knight
> <jyknight at google.com <mailto:jyknight at google.com>> wrote:
>
> It sounds like you ran into a bug in the test
> infrastructure's code to determine if python3 is
> supported. Fixing that might be harder, but it only needs
> to be fixed once no matter how much more python3
> development there will be.
>
>
> No, it was in some local.lit.cfg.
>
>
> I see that now. Sure, in that case I suggest to fix whatever the
> issue is /and move/ it to common code, so that the "python3"
> feature is correctly detected and available to any test.
>
> Right now, most of our scripts were originally written for
> python 2, so certainly it's easy for them to support
> python 2. But, it was a lot of work by various people to
> port them all to additionally work in python 3. And, in
> the future (or maybe even now), people will be generally
> be writing python3 scripts by default rather than python2.
> Certainly they ought to.
>
> I just don't think it's worthwhile to require all new such
> scripts to continue to be written bilingually, unless
> doing that extra work helps to serve users.
>
> I'm not at all worried about a hypothetical case where we
> want to ship a script that was written for python3 only.
> Firstly, because that usually doesn't happen. But if it
> does, we can port it then, or else we might just decide
> it's fine for it to be python3 only.
>
>
> You don't see any advantage to having a consistent language
> level across the project? (See also the flang vs c++17
> discussion.)
>
>
> In this particular situatoin, correct. For these auxilliary
> scripts which are not released or used to build/test released
> components, I see no advantage to requiring these to support
> python2, anymore.
>
>
> Well, I disagree :)
>
> I'm curious what others think.
Don't really care, but I have a mild preference for accepting patches to
keep python2 working. I wouldn't *require* scripts to work with
python2, but I see no reason not to land patches if someone wants to put
in the work.
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191217/ea0c082c/attachment.html>
More information about the llvm-dev
mailing list