We probably want to split these out into individual issues, but given I don't think we're doing this any time soon I'll leave that for when someone starts on this:
Note that even after updating all of this we'll still rely on Python 2 as we have hundreds of helper files for tests.
See gh-10128 for wptrunner
I see that some of these sdists do not have tests included.
It will be much easier for packagers to do tests on Python 3 if the sdist for each has the tests included.
The PyPI packages are in general not actively maintained (although speserve is sometimes updated) and aren't actually used by any wpt infrastructure or by browser vendors who import this stuff (afaik).
I ran into them because http://pypi.org/project/mozfile is using wptserve in its test rig.
You can tick manifest, as its tests pass on py3.
https://build.opensuse.org/package/show/home:jayvdb:wpt/python-wptmanifest
test_manifest_to_json is failing a lot, mostly because the test case generation is too slow. I've disabled that test on all platforms atm.
test_manifest_idempotent is also failing most of the time on arm arch, for the same reason.
I note that http://pypi.org/project/manifest/ was pre-alpha, and now redundant, and the author would probably be willing to release the name to wpt project.
mod_pywebsocket on PyPI (0.79) has Python 2 only code in it, and upstream master. https://github.com/google/pywebsocket/issues/153 . Note they also have test failures on Python 2. https://github.com/google/pywebsocket/issues/154 And I see the local copy here is heavily modified, so getting those changes merged upstream could be quite a bit of work. And when I try running the test suite with the locally modified version of mod_pywebsocket, it halts so I have commented out the tests atm https://build.opensuse.org/package/show/home:jayvdb:wpt/python-mod_pywebsocket , and the test suite for wptserve also halts in test_stash. https://build.opensuse.org/package/show/home:jayvdb:wpt/python-wptserve
mod_pywebsocket is used by serve.py, which is needed by at least wptserve for testing, so fixing mod_pywebsocket is a high priority, otherwise we cant run the tests properly.
I spotted the Moving to Python 3 thread on webkit-dev. Key quote:
Now that the Catalina developer seeds are available, it is official that the new Mac developer tools come with Python 3.
There was discussion on the thread about running on older versions of macOS that don't have Python 3, and if WPT's Python code is used in any way in WebKit that concern can translate.
But in any case, sounds like we could soon start thinking about using Python 3 on macOS as well. Even today we could install Python 3 on Azure Pipelines of course, but the hard question is whether we keep it working with Python 2.
@youennf @rniwa is there any impact of WPT's Python code on WebKit? Would it be good for WebKit is WPT supports Python 3, or does it not matter?
@youennf @rniwa is there any impact of WPT's Python code on WebKit? Would it be good for WebKit is WPT supports Python 3, or does it not matter?
As things stand, we won't be able to run imported tests if WPT tests relied upon Python3 since older versions of macOS on which we still run regression (layout) tests do not support Python3 by default.
Does that include only wptserve and the "CGI" .py files that are written as part of tests, or do you also rely on other parts of WPT to work using Python 2?
You can tick manifest, as its tests pass on py3.
Alas, it… doesn't actually work. :flushed: There's a huge diff between manifests generated by Python 2 and Python 3.
There's a huge diff between manifests generated by Python 2 and Python 3.
Interesting! It sounds like there should be some regression tests which compares the generated results to expected results generated from python2.
@jayvdb Yeah, we should, just never got around to writing one because it's so far from passing (and it never has). Can't regress something that never worked. :)
CC @ericlaw1979; help is welcome.
wpt serve runs fine in Python 3 on Windows when I tested JSDOM with it.
Most helpful comment
Alas, it… doesn't actually work. :flushed: There's a huge diff between manifests generated by Python 2 and Python 3.