Bug 217368 - run-minibrowser not compatible with python3
Summary: run-minibrowser not compatible with python3
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
Keywords: InRadar
Depends on:
Reported: 2020-10-06 01:37 PDT by Philippe Normand
Modified: 2020-10-06 11:43 PDT (History)
6 users (show)

See Also:

Patch (1.24 KB, patch)
2020-10-06 01:45 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (2.32 KB, patch)
2020-10-06 06:06 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2020-10-06 01:37:43 PDT
$ Tools/Scripts/run-minibrowser --gtk ""
Downloading setuptools-44.1.1...
Installing setuptools-44.1.1...
Installed setuptools-44.1.1!
Downloading toml-0.10.1...
Installing toml-0.10.1...
Installed toml-0.10.1!
Traceback (most recent call last):
  File "Tools/Scripts/run-minibrowser", line 30, in <module>
  File "/home/calvaris/gnome/WebKit/Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py", line 49, in main
    options, args = option_parser.parse_known_args(argv)
  File "/usr/lib/python3.8/argparse.py", line 1812, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.8/argparse.py", line 2021, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/usr/lib/python3.8/argparse.py", line 1977, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python3.8/argparse.py", line 1870, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/usr/lib/python3.8/argparse.py", line 2401, in _get_values
    value = self._get_value(action, arg_string)
  File "/usr/lib/python3.8/argparse.py", line 2434, in _get_value
    result = type_func(arg_string)
  File "/home/calvaris/gnome/WebKit/Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py", line 47, in <lambda>
    option_parser.add_argument('url', metavar='url', type=lambda s: unicode(s, 'utf8'), nargs='?',
NameError: name 'unicode' is not defined
Comment 1 Philippe Normand 2020-10-06 01:45:36 PDT
Created attachment 410619 [details]
Comment 2 Xabier Rodríguez Calvar 2020-10-06 04:10:37 PDT
With this patch I am still having trouble:

$ Tools/Scripts/run-minibrowser --gtk --debug "http://..."
usage: run-minibrowser [options] [url]
run-minibrowser: error: argument url: invalid <lambda> value: 'http://...'
Comment 3 Philippe Normand 2020-10-06 06:06:25 PDT
Created attachment 410629 [details]
Comment 4 Xabier Rodríguez Calvar 2020-10-06 07:30:13 PDT
This works
Comment 5 EWS 2020-10-06 11:42:48 PDT
Committed r268059: <https://trac.webkit.org/changeset/268059>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410629 [details].
Comment 6 Radar WebKit Bug Importer 2020-10-06 11:43:29 PDT