[webkit-dev] Moving to Python 3

Maciej Stachowiak mjs at apple.com
Fri Jul 12 23:20:34 PDT 2019



> On Jul 12, 2019, at 3:23 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> 
> 
>> On Fri, Jul 12, 2019 at 1:04 PM Jonathan Bedard <jbedard at apple.com> wrote:
> 
>> 
>> > On Jul 12, 2019, at 12:49 PM, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
>> > 
>> > On Fri, Jul 12, 2019 at 2:18 PM, Jonathan Bedard <jbedard at apple.com> wrote:
>> >> The trouble I foresee us encountering with any scheme which attempts a conversion which retains both Python 2.7 and Python 3 compatibility is code like this:
>> > 
>> > Is python2 support required for a well-motivated transitional purpose?
>> > 
>> > I had previously proposed making all our scripts work with both python2 and python3 only because I thought Apple was going to require python2 indefinitely. Now that you're interested in this transition, there's probably no need to continue python2 support. Anyone building WebKit on older versions of macOS can reasonably be expected to manually install python3, right? And it's clear that you're prepared to do this for infrastructure/bots already.
>> 
>> We still need to figure out whether (and for how long) we intend to retain Python 2 support. Over the last few months, opinions on this have changed quite a bit, so I’m trying to determine what our path forward is going to be.
>> 
>> In my opinion, a few months after Catalina GMs, we no longer need to maintain Python 2 support, assuming that we provide adequate automation for installing Python 3 on pre-Catalina macOS (ie, Mojave, High Sierra) and are explicit about shebangs.
> 
> I don't think it's acceptable to require installation of Python 3 just to build & run tests on WebKit unless the installation itself is automated and compartmentalized to WebKit's development given how bad Python is with respect to having multiple versions of Python's and managing packages between them.
> 
> I frequently do WebKit development in older versions of macOS to diagnose old OS specific regressions, and having to install Python 3 each time I install an old OS is too much of a trouble.

It’s possible install a python without installing it on the system, and install modules and any needed additions, using virtualenv: https://virtualenv.pypa.io/en/stable/

This is the pro way to use python without caring about what happens to be on the system. 

 I suggest we proceed by gradually converting our scripts to use a Python 3 virtualenv. This will also spare us the need to install Python modules onto the system. The tricky part will be that webkitpy would have to work both ways until conversion is complete (or at the extreme I guess we could fork it).

> - R. Niwa
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20190712/7806dbbd/attachment-0004.html>


More information about the webkit-dev mailing list