RESOLVED FIXED 71494
Remove deprecated free functions in port.factory
https://bugs.webkit.org/show_bug.cgi?id=71494
Summary Remove deprecated free functions in port.factory
Eric Seidel (no email)
Reported 2011-11-03 11:53:04 PDT
Remove deprecated free functions in port.factory
Attachments
Patch (81.70 KB, patch)
2011-11-03 12:18 PDT, Eric Seidel (no email)
no flags
Patch for landing (81.91 KB, patch)
2011-11-03 12:45 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2011-11-03 12:18:06 PDT
Adam Barth
Comment 2 2011-11-03 12:31:47 PDT
Comment on attachment 113540 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113540&action=review Seems fine. I'm slightly worried this is going to cause tests to fail on Windows because of the branch in engage_windows_hacks. > Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py:104 > + if sys.platform != "win32": > + return This isn't actually as bad as it seems. We feature-detect whether the hacks are needed. If they're not needed, we won't do anything. should we add a static boolean for whether we've tried to engage the hacks before? We shouldn't need to try to engage them twice. > Tools/Scripts/webkitpy/layout_tests/port/test.py:278 > + def _set_default_overriding_none(self, dictionary, key, default): > + # dict.setdefault almost works, but won't actually override None values, which we want. > + if not dictionary.get(key): > + dictionary[key] = default > + return dictionary[key] This code looks duplicated. > Tools/Scripts/webkitpy/layout_tests/port/win.py:62 > + # No sense in trying to detect our windows version on non-windows platforms, unless we're unittesting. > + if sys.platform != 'cygwin' and not run_on_non_windows_platforms: Lame.
Eric Seidel (no email)
Comment 3 2011-11-03 12:44:22 PDT
(In reply to comment #2) > (From update of attachment 113540 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=113540&action=review > > Seems fine. I'm slightly worried this is going to cause tests to fail on Windows because of the branch in engage_windows_hacks. > > > Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py:104 > > + if sys.platform != "win32": > > + return > > This isn't actually as bad as it seems. We feature-detect whether the hacks are needed. If they're not needed, we won't do anything. Well, we still execute a command, which is what was showing up in the unittests which instantiate a CrWinPort and have a logging executive. > should we add a static boolean for whether we've tried to engage the hacks before? We shouldn't need to try to engage them twice. Yes, we should. Probably a separate change. > > Tools/Scripts/webkitpy/layout_tests/port/test.py:278 > > + def _set_default_overriding_none(self, dictionary, key, default): > > + # dict.setdefault almost works, but won't actually override None values, which we want. > > + if not dictionary.get(key): > > + dictionary[key] = default > > + return dictionary[key] > > This code looks duplicated. It is. Not sure where to put it. > > Tools/Scripts/webkitpy/layout_tests/port/win.py:62 > > + # No sense in trying to detect our windows version on non-windows platforms, unless we're unittesting. > > + if sys.platform != 'cygwin' and not run_on_non_windows_platforms: > > Lame. Yeah, it is kinda lame. Again, just trying to avoid running a command we don't need when we have a logging executive.
Eric Seidel (no email)
Comment 4 2011-11-03 12:45:36 PDT
Created attachment 113542 [details] Patch for landing
WebKit Review Bot
Comment 5 2011-11-03 13:26:03 PDT
Comment on attachment 113542 [details] Patch for landing Clearing flags on attachment: 113542 Committed r99233: <http://trac.webkit.org/changeset/99233>
WebKit Review Bot
Comment 6 2011-11-03 13:26:14 PDT
All reviewed patches have been landed. Closing bug.
Tony Chang
Comment 7 2011-11-03 13:40:51 PDT
This patch regressed not needing python-irclib to run new-run-webkit-tests. Previously, you could run new-run-webkit-tests without having the autoinstall need to download python-irclib. Is it possible to get that behavior back?
Adam Barth
Comment 8 2011-11-03 15:52:10 PDT
Very likely. Is there a way we can test that property to make sure we don't regress it again?
Eric Seidel (no email)
Comment 9 2011-11-03 16:06:43 PDT
Yes, it's very easy to add that behavior back.
Tony Chang
Comment 10 2011-11-03 16:28:34 PDT
(In reply to comment #8) > Very likely. Is there a way we can test that property to make sure we don't regress it again? Probably. Feel free to file a bug against me to write a test for it.
Csaba Osztrogonác
Comment 11 2011-11-04 00:39:47 PDT
It broke a webkitpy test on all port: ERROR: test_get_host_port_object (webkitpy.to_be_moved.rebaseline_chromium_webkit_tests_unittest.TestGetHostPortObject) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py", line 181, in test_get_host_port_object self.assert_result(False, False, False) File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py", line 171, in assert_result port_obj = rebaseline_chromium_webkit_tests.get_host_port_object(port_factory, options) File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py", line 815, in get_host_port_object port_obj = port_factory.get(None, options) TypeError: get() takes exactly 2 arguments (3 given) Could you check it, please?
Eric Seidel (no email)
Comment 12 2011-11-04 01:02:07 PDT
Certainly, one sec.
Eric Seidel (no email)
Comment 13 2011-11-04 02:20:11 PDT
(In reply to comment #11) > It broke a webkitpy test on all port: > > ERROR: test_get_host_port_object (webkitpy.to_be_moved.rebaseline_chromium_webkit_tests_unittest.TestGetHostPortObject) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py", line 181, in test_get_host_port_object > self.assert_result(False, False, False) > File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py", line 171, in assert_result > port_obj = rebaseline_chromium_webkit_tests.get_host_port_object(port_factory, options) > File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py", line 815, in get_host_port_object > port_obj = port_factory.get(None, options) > TypeError: get() takes exactly 2 arguments (3 given) > > Could you check it, please? Sorry. Fixed.
Eric Seidel (no email)
Comment 14 2011-11-04 02:20:23 PDT
Eric Seidel (no email)
Comment 15 2011-11-04 02:23:15 PDT
(In reply to comment #9) > Yes, it's very easy to add that behavior back. Filed bug 71549.
Eric Seidel (no email)
Comment 16 2011-11-04 17:27:47 PDT
Note You need to log in before you can comment on or make changes to this bug.