RESOLVED FIXED Bug 201955
Python 3: Add support to auto-importer
https://bugs.webkit.org/show_bug.cgi?id=201955
Summary Python 3: Add support to auto-importer
Jonathan Bedard
Reported 2019-09-18 17:00:18 PDT
This may actually be a good time to re-write said auto-importer for Python 3.
Attachments
Patch (12.10 KB, patch)
2019-10-02 13:15 PDT, Jonathan Bedard
no flags
Patch (12.08 KB, patch)
2019-10-03 13:31 PDT, Jonathan Bedard
no flags
Patch for landing (12.24 KB, patch)
2019-10-08 11:24 PDT, Jonathan Bedard
no flags
Patch for landing (12.30 KB, patch)
2019-10-08 13:36 PDT, Jonathan Bedard
no flags
Patch (12.53 KB, patch)
2019-10-08 14:41 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2019-09-18 17:04:00 PDT
Jonathan Bedard
Comment 2 2019-10-02 13:15:48 PDT
Dean Johnson
Comment 3 2019-10-03 13:16:39 PDT
Comment on attachment 380051 [details] Patch LGTM overall. Unofficial r+.
Aakash Jain
Comment 4 2019-10-03 13:26:27 PDT
Comment on attachment 380051 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380051&action=review > Tools/Scripts/webkitpy/thirdparty/__init__.py:88 > + def find_module(self, fullname, path=None): where are we using 'path' variable?
Jonathan Bedard
Comment 5 2019-10-03 13:31:56 PDT
Jonathan Bedard
Comment 6 2019-10-03 13:32:46 PDT
(In reply to Jonathan Bedard from comment #5) > Created attachment 380157 [details] > Patch Using the proper Octal format as per https://python-future.org/compatible_idioms.html?highlight=octal.
Jonathan Bedard
Comment 7 2019-10-03 13:34:54 PDT
(In reply to Aakash Jain from comment #4) > Comment on attachment 380051 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=380051&action=review > > > Tools/Scripts/webkitpy/thirdparty/__init__.py:88 > > + def find_module(self, fullname, path=None): > > where are we using 'path' variable? We're not, it's just that this protocol has been defined in Python 3. <https://www.python.org/dev/peps/pep-0302/>, we should adhere to it
WebKit Commit Bot
Comment 8 2019-10-08 11:07:41 PDT
Comment on attachment 380157 [details] Patch Rejecting attachment 380157 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 380157, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Traceback (most recent call last): File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 84, in <module> main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 79, in main WebKitPatch(os.path.abspath(__file__)).main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main result = command.check_arguments_and_execute(options, args, self) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute return self.execute(options, args, tool) or 0 File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 180, in execute patches = self._fetch_list_of_patches_to_process(options, args, tool) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 224, in _fetch_list_of_patches_to_process patch = tool.bugs.fetch_attachment(patch_id, throw_on_access_error=True) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 552, in fetch_attachment bug_id = self.bug_id_for_attachment_id(attachment_id, throw_on_access_error) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in bug_id_for_attachment_id return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py", line 58, in run return request() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in <lambda> return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 533, in get_bug_id_for_attachment_id self.authenticate() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 577, in authenticate self.browser.select_form(name="login") File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_mechanize.py", line 620, in select_form global_form = self._factory.global_form File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 313, in global_form self.forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 320, in forms self._current_forms, self._current_global_form = self._get_forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 335, in _get_forms if self.root is None: File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 300, in root transport_encoding=transport_encoding) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 191, in content_parser from html5lib import parse ImportError: No module named html5lib Full output: https://webkit-queues.webkit.org/results/13106985
Jonathan Bedard
Comment 9 2019-10-08 11:24:18 PDT
Created attachment 380446 [details] Patch for landing
WebKit Commit Bot
Comment 10 2019-10-08 12:27:02 PDT
Comment on attachment 380446 [details] Patch for landing Rejecting attachment 380446 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 380446, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Traceback (most recent call last): File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 84, in <module> main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 79, in main WebKitPatch(os.path.abspath(__file__)).main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main result = command.check_arguments_and_execute(options, args, self) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute return self.execute(options, args, tool) or 0 File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 180, in execute patches = self._fetch_list_of_patches_to_process(options, args, tool) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 224, in _fetch_list_of_patches_to_process patch = tool.bugs.fetch_attachment(patch_id, throw_on_access_error=True) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 552, in fetch_attachment bug_id = self.bug_id_for_attachment_id(attachment_id, throw_on_access_error) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in bug_id_for_attachment_id return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py", line 58, in run return request() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in <lambda> return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 533, in get_bug_id_for_attachment_id self.authenticate() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 577, in authenticate self.browser.select_form(name="login") File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_mechanize.py", line 620, in select_form global_form = self._factory.global_form File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 313, in global_form self.forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 320, in forms self._current_forms, self._current_global_form = self._get_forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 335, in _get_forms if self.root is None: File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 300, in root transport_encoding=transport_encoding) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 191, in content_parser from html5lib import parse ImportError: No module named html5lib Full output: https://webkit-queues.webkit.org/results/13107168
Jonathan Bedard
Comment 11 2019-10-08 13:36:22 PDT
Created attachment 380458 [details] Patch for landing
WebKit Commit Bot
Comment 12 2019-10-08 14:24:01 PDT
Comment on attachment 380458 [details] Patch for landing Rejecting attachment 380458 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 380458, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Traceback (most recent call last): File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 84, in <module> main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 79, in main WebKitPatch(os.path.abspath(__file__)).main() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main result = command.check_arguments_and_execute(options, args, self) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute return self.execute(options, args, tool) or 0 File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 180, in execute patches = self._fetch_list_of_patches_to_process(options, args, tool) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 224, in _fetch_list_of_patches_to_process patch = tool.bugs.fetch_attachment(patch_id, throw_on_access_error=True) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 552, in fetch_attachment bug_id = self.bug_id_for_attachment_id(attachment_id, throw_on_access_error) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in bug_id_for_attachment_id return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py", line 58, in run return request() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 530, in <lambda> return NetworkTransaction().run(lambda: self.get_bug_id_for_attachment_id(attachment_id, throw_on_access_error)) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 533, in get_bug_id_for_attachment_id self.authenticate() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 577, in authenticate self.browser.select_form(name="login") File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_mechanize.py", line 620, in select_form global_form = self._factory.global_form File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 313, in global_form self.forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 320, in forms self._current_forms, self._current_global_form = self._get_forms() File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 335, in _get_forms if self.root is None: File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 300, in root transport_encoding=transport_encoding) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_html.py", line 191, in content_parser from html5lib import parse File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/html5lib/__init__.py", line 25, in <module> from .html5parser import HTMLParser, parse, parseFragment File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/html5lib/html5parser.py", line 7, in <module> from . import _inputstream File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/html5lib/_inputstream.py", line 9, in <module> import webencodings ImportError: No module named webencodings Full output: https://webkit-queues.webkit.org/results/13107573
Jonathan Bedard
Comment 13 2019-10-08 14:41:05 PDT
WebKit Commit Bot
Comment 14 2019-10-08 15:30:28 PDT
Comment on attachment 380466 [details] Patch Clearing flags on attachment: 380466 Committed r250869: <https://trac.webkit.org/changeset/250869>
WebKit Commit Bot
Comment 15 2019-10-08 15:30:29 PDT
All reviewed patches have been landed. Closing bug.
Fujii Hironori
Comment 16 2019-10-10 20:55:44 PDT
Filed: Bug 202839 – [WinCairo] auto-installing raises exception "Inner message: global name 'urllib2' is not defined" since r250869
Note You need to log in before you can comment on or make changes to this bug.