Python 3.11 is removing a number of deprecated things, including various unittest methods: https://docs.python.org/3.11/whatsnew/3.11.html#removed / https://docs.python.org/3.10/library/unittest.html?highlight=unittest#deprecated-aliases Our challenge here is the rename of assertRegexpMatches to assertRegex and assertRaisesRegexp to assertRaisesRegex (both deprecated since Python 3.2), plus assertNotRegexpMatches to assertNotRegex (deprecated since Python 3.5), since none of the new names exist in Python 2.7.
I think that the only thing that needs Python 2.7 now is run-webkit-tests, which has mystery stability issues with Python 3. Everything else can and should be switched over at earliest opportunity.
(In reply to Alexey Proskuryakov from comment #1) > I think that the only thing that needs Python 2.7 now is run-webkit-tests, > which has mystery stability issues with Python 3. Everything else can and > should be switched over at earliest opportunity. webkit-patch still does, see bug 231591 (and there's at least another Apple-internal issue); I'm reluctant to break many tests on Python 2, especially when we're likely going to be able to drop it before Python 3.11 ships (in October 2022 or later). Partly filed this so we have some record that this needs done. That said, one option is to rename the functions and mark the tests that use them as xfail on Python 2?
<rdar://problem/84608525>
Created attachment 463705 [details] All warnings from Python 3.11.0 Many of these deprecations were pushed back to 3.12; see attached for all the warnings from running tests on 3.11.
(In reply to Sam Sneddon [:gsnedders] from comment #4) > Created attachment 463705 [details] > All warnings from Python 3.11.0 > > Many of these deprecations were pushed back to 3.12; see attached for all > the warnings from running tests on 3.11. Bug 260878 fixes many of these (or, rather, it fixes the subset where things are _removed_ in 3.12; other warnings survive).