RESOLVED FIXED 204227
Python 3: Add support in webkitpy.layout_tests.views
https://bugs.webkit.org/show_bug.cgi?id=204227
Summary Python 3: Add support in webkitpy.layout_tests.views
Jonathan Bedard
Reported 2019-11-15 08:53:36 PST
Add Python 3 support to layout test logging.
Attachments
Patch (19.48 KB, patch)
2019-11-15 14:26 PST, Jonathan Bedard
no flags
Jonathan Bedard
Comment 1 2019-11-15 14:26:36 PST
Dean Johnson
Comment 2 2019-11-18 11:42:21 PST
Comment on attachment 383650 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383650&action=review LGTM overall w/ a question. Unofficial r+. > Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py:169 > + printer._meter.number_of_columns = lambda: sys.maxsize Does this exist in both py2 and py3?
Jonathan Bedard
Comment 3 2019-11-18 11:48:51 PST
(In reply to Dean Johnson from comment #2) > Comment on attachment 383650 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=383650&action=review > > LGTM overall w/ a question. Unofficial r+. > > > Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py:169 > > + printer._meter.number_of_columns = lambda: sys.maxsize > > Does this exist in both py2 and py3? Yes. maxint doesn't exist in Python 3, maxsize is 9223372036854775807 in both Python 2 and Python 3, maxint is also 9223372036854775807 in Python 2.
Aakash Jain
Comment 4 2019-11-18 11:51:14 PST
Comment on attachment 383650 [details] Patch Does it passing webkitpy ews indicates that these updated tests were run through EWS (for Python 2)?
Jonathan Bedard
Comment 5 2019-11-18 11:55:12 PST
(In reply to Aakash Jain from comment #4) > Comment on attachment 383650 [details] > Patch > > Does it passing webkitpy ews indicates that these updated tests were run > through EWS (for Python 2)? Yes! And actually, the new tests are pretty similar to the old ones. The big difference is that we were essentially introspecting buflist on the StringIO object so avoid concatenating unicode and non-unicode strings. In most cases, we could safely join the StringIO buffers (and we can always join them in Python 3) so with a few notable unicode exceptions, that's what the new unit tests are doing. Some added comfort here, we passed api and layout tests which are also leveraging Python 2 webkitpy code.
WebKit Commit Bot
Comment 6 2019-11-18 12:53:56 PST
The commit-queue encountered the following flaky tests while processing attachment 383650 [details]: imported/w3c/web-platform-tests/svg/import/struct-dom-06-b-manual.svg bug 204312 (author: sabouhallawa@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 7 2019-11-18 12:54:48 PST
Comment on attachment 383650 [details] Patch Clearing flags on attachment: 383650 Committed r252560: <https://trac.webkit.org/changeset/252560>
WebKit Commit Bot
Comment 8 2019-11-18 12:54:49 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2019-11-18 12:55:30 PST
Note You need to log in before you can comment on or make changes to this bug.