Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all infra working on Python 3 #8820

Closed
11 tasks
gsnedders opened this issue Dec 30, 2017 · 16 comments
Closed
11 tasks

Get all infra working on Python 3 #8820

gsnedders opened this issue Dec 30, 2017 · 16 comments

Comments

@gsnedders
Copy link
Member

gsnedders commented Dec 30, 2017

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:

  • ci
  • gitignore
  • lint
  • manifest
  • runner
  • serve
  • sslutils
  • webdriver
  • wpt
  • wptrunner
  • wptserve

Note that even after updating all of this we'll still rely on Python 2 as we have hundreds of helper files for tests.

@jugglinmike
Copy link
Contributor

See gh-10128 for wptrunner

@jayvdb
Copy link

jayvdb commented Mar 27, 2019

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.

@jgraham
Copy link
Contributor

jgraham commented Mar 27, 2019

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).

@jayvdb
Copy link

jayvdb commented Mar 27, 2019

I ran into them because http://pypi.org/project/mozfile is using wptserve in its test rig.

@jayvdb
Copy link

jayvdb commented Mar 28, 2019

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. googlearchive/pywebsocket#153 . Note they also have test failures on Python 2. googlearchive/pywebsocket#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.

@foolip
Copy link
Member

foolip commented Sep 10, 2019

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?

@rniwa
Copy link
Contributor

rniwa commented Sep 10, 2019

@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.

@foolip
Copy link
Member

foolip commented Sep 10, 2019

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?

@gsnedders
Copy link
Member Author

You can tick manifest, as its tests pass on py3.

Alas, it… doesn't actually work. 😳 There's a huge diff between manifests generated by Python 2 and Python 3.

@Hexcles
Copy link
Member

Hexcles commented Sep 19, 2019

@jayvdb
Copy link

jayvdb commented Sep 19, 2019

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.

@gsnedders
Copy link
Member Author

@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. :)

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 5, 2019

CC @ericlaw1979; help is welcome.

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Mar 16, 2020

wpt serve runs fine in Python 3 on Windows when I tested JSDOM with it.

@foolip
Copy link
Member

foolip commented May 6, 2021

This is done, we are now Python 3 only!

@foolip foolip closed this as completed May 6, 2021
@foolip
Copy link
Member

foolip commented May 6, 2021

#28776 tracks some additional cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants