Summary: | [GTK] Make Tools/gtkdoc/ python3 compatible | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tomas Popela <tpopela> | ||||
Component: | WebKitGTK | Assignee: | Tomas Popela <tpopela> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-noreply, cgarcia, ews-watchlist | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Tomas Popela
2019-03-06 06:39:17 PST
Another error hit in Tools/gtkdoc/gtkdoc.py: Traceback (most recent call last): File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 257, in <module> build_gtkdoc_for_wkgtk(arguments) File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 219, in build_gtkdoc_for_wkgtk saw_warnings = generate_documentation(webkitdom_generator) File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 161, in generate_documentation return generate_doc(generator, arguments.skip_html) File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 148, in generate_doc generator.generate(not skip_html) File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/gtkdoc.py", line 154, in generate self._run_gtkdoc_fixxref() File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/gtkdoc.py", line 383, in _run_gtkdoc_fixxref self._run_command(args, cwd=self.output_dir, ignore_warnings=True) File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/gtkdoc.py", line 203, in _run_command sys.stdout.write(stdout.encode("utf-8")) TypeError: write() argument must be str, not bytes Created attachment 363871 [details]
Patch
Attachment 363871 [details] did not pass style-queue:
ERROR: Tools/gtkdoc/gtkdoc.py:205: [GTKDoc._run_command] Instance of 'file' has no 'buffer' member [pylint/E1101] [5]
Total errors found: 1 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 363871 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363871&action=review > Tools/gtkdoc/generate-gtkdoc:120 > + if sys.version_info < (3, 2): > + config = SafeConfigParser(); > + else: > + config = configparser.ConfigParser() Could we do something like: from ConfigParser import SafeConfigParser as ConfigParser and from configparser import ConfigParser and then we don't need to check version here again? (In reply to Carlos Garcia Campos from comment #4) > Comment on attachment 363871 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=363871&action=review > > > Tools/gtkdoc/generate-gtkdoc:120 > > + if sys.version_info < (3, 2): > > + config = SafeConfigParser(); > > + else: > > + config = configparser.ConfigParser() > > Could we do something like: > > from ConfigParser import SafeConfigParser as ConfigParser > > and > > from configparser import ConfigParser > > and then we don't need to check version here again? Good catch Carlos! Committed r242637: <https://trac.webkit.org/changeset/242637> |