Bug 201955 - Python 3: Add support to auto-importer
Summary: Python 3: Add support to auto-importer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks: 202830
  Show dependency treegraph
 
Reported: 2019-09-18 17:00 PDT by Jonathan Bedard
Modified: 2019-12-16 11:27 PST (History)
7 users (show)

See Also:


Attachments
Patch (12.10 KB, patch)
2019-10-02 13:15 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (12.08 KB, patch)
2019-10-03 13:31 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (12.24 KB, patch)
2019-10-08 11:24 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (12.30 KB, patch)
2019-10-08 13:36 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (12.53 KB, patch)
2019-10-08 14:41 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2019-09-18 17:00:18 PDT
This may actually be a good time to re-write said auto-importer for Python 3.
Comment 1 Radar WebKit Bug Importer 2019-09-18 17:04:00 PDT
<rdar://problem/55499874>
Comment 2 Jonathan Bedard 2019-10-02 13:15:48 PDT
Created attachment 380051 [details]
Patch
Comment 3 Dean Johnson 2019-10-03 13:16:39 PDT
Comment on attachment 380051 [details]
Patch

LGTM overall. Unofficial r+.
Comment 4 Aakash Jain 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?
Comment 5 Jonathan Bedard 2019-10-03 13:31:56 PDT
Created attachment 380157 [details]
Patch
Comment 6 Jonathan Bedard 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.
Comment 7 Jonathan Bedard 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
Comment 8 WebKit Commit Bot 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
Comment 9 Jonathan Bedard 2019-10-08 11:24:18 PDT
Created attachment 380446 [details]
Patch for landing
Comment 10 WebKit Commit Bot 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
Comment 11 Jonathan Bedard 2019-10-08 13:36:22 PDT
Created attachment 380458 [details]
Patch for landing
Comment 12 WebKit Commit Bot 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
Comment 13 Jonathan Bedard 2019-10-08 14:41:05 PDT
Created attachment 380466 [details]
Patch
Comment 14 WebKit Commit Bot 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>
Comment 15 WebKit Commit Bot 2019-10-08 15:30:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Fujii Hironori 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