GoogleChromeLabs / pywebsocket3

BSD 3-Clause "New" or "Revised" License
44 stars 32 forks source link

Drop Python 2 support #29

Open foolip opened 3 years ago

foolip commented 3 years ago

pywebsocket3 depends on six, and while it's very unlikely to be the last indirect six dependency in https://github.com/web-platform-tests/wpt/issues/28776, perhaps can be dropped?

Is pywebsocket3 used outside of WPT, or can it just go with Python 3.6+ like WPT?

ricea commented 3 years ago

It's still used in at least Chrome's web_tests and WebKit's layout tests. I don't think we can drop Python 2 support just yet, but we might be close.

An option might be to pin Python 2 support at a particular version, and remove it from later versions, but I'd prefer not to do that as it could backfire badly.

I'm going to keep this open as a task to do when the known downstreams are ready.

foolip commented 3 years ago

Are we still using Python 2 in Chromium CI? For WebKit, @gsnedders was OK with dropping py2 support for WPT itself on Feb 1 this year, which happened, but maybe pywebsocket3 is also used in contexts outside of WPT in Chromium/WebKit CI?

@jgraham do you know if this is used in Gecko outside of WPT?

ricea commented 3 years ago

Yes, pywebsocket3 is still run under Python 2 for the tests located in https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/websocket/. From my skimming of the code, it looks like all of run_web_tests.py apart from wptserve run under Python 2 still. I think it should be possible to switch only pywebsocket3 over using a similar technique, however the last time I tried this I was not successful.

foolip commented 3 years ago

I see, so this isn't a quick fix then. But now there's an issue that can grow old before finally being resolved :)

jgraham commented 3 years ago

We seem to have another vendored copy for mochitests, which are apparently still running under Py2 in CI. But that is supposed to change soon and we could upgrade that copy seperately from the copy in wpt which we're using with Py3 exclusively.