Bug 205911 - webkit-patch crashes when creating new bug with Python 3
Summary: webkit-patch crashes when creating new bug with Python 3
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:
 
Reported: 2020-01-08 01:24 PST by Paulo Matos
Modified: 2020-01-10 16:49 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.40 KB, patch)
2020-01-10 08:12 PST, 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 Paulo Matos 2020-01-08 01:24:48 PST
On a new machine running Gentoo Linux and with python at version 3.6.9, webkit-patch upload fails.

Here's an example:
Tools/Scripts/webkit-patch --verbose upload                            
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/__init__.py
RefactoringTool: No changes to /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/check_block.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/dammit.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/diagnose.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/element.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/formatter.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/testing.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/__init__.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_html5lib.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_htmlparser.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_lxml.py
RefactoringTool: No changes to /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/__init__.py
RefactoringTool: No changes to /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_builder_registry.py
RefactoringTool: No changes to /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_docs.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_html5lib.py
RefactoringTool: No changes to /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_htmlparser.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_lxml.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_soup.py
RefactoringTool: Refactored /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_tree.py
RefactoringTool: Files that were modified:
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/__init__.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/check_block.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/dammit.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/diagnose.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/element.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/formatter.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/testing.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/__init__.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_html5lib.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_htmlparser.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/builder/_lxml.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/__init__.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_builder_registry.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_docs.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_html5lib.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_htmlparser.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_lxml.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_soup.py
RefactoringTool: /home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/bs4/tests/test_tree.py
webkitpy.common.system.logutils: [DEBUG] Debug logging enabled.
webkitpy.common.system.executive: [DEBUG] "git rev-parse --is-inside-work-tree" took 0.01s
webkitpy.common.system.executive: [DEBUG] "git rev-parse --show-toplevel" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git rev-parse --is-inside-work-tree" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git config --get-all webkit.status-api-key" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git config --get-all svn-remote.svn.fetch" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git show-ref --quiet --verify refs/remotes/origin/master" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git merge-base refs/remotes/origin/master HEAD" took 0.00s
webkitpy.common.system.executive: [DEBUG] "git diff -r --name-status --no-renames --no-ext-diff --full-index 1ddfb94f45de5b63fa5c6da71826e006a290da79 -- ." took 0.13s
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en",
	LC_ALL = "",
	LC_MESSAGES = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Total errors found: 0 in 1 files
Please enter a bug number/bugzilla URL or a title for a new bug:
Race condition in run-jsc-stress-tests chdir
Are you sure you want to create a new bug? [y/N]: y
webkitpy.common.system.executive: [DEBUG] "git rev-parse --is-inside-work-tree" took 0.01s
webkitpy.common.system.executive: [DEBUG] "git config --get-all bugzilla.username" took 0.01s
webkitpy.common.system.executive: [DEBUG] "git config --get-all bugzilla.password" took 0.01s
bugs.webkit.org login: pmatos@igalia.com
Please enter password for encrypted keyring: 
webkitpy.common.net.bugzilla.bugzilla: [INFO] Logging in as pmatos@igalia.com...
webkitpy.common.net.bugzilla.bugzilla: [INFO] Creating bug with title "Race condition in run-jsc-stress-tests chdir"
Traceback (most recent call last):
  File "Tools/Scripts/webkit-patch", line 80, in <module>
    main()
  File "Tools/Scripts/webkit-patch", line 75, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/tool/steps/createbug.py", line 61, in run
    state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], blocked=blocks, component=self._options.component, cc=cc)
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 781, in create_bug
    bug_id = self._check_create_bug_response(response.read())
  File "/home/pmatos/dev/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 712, in _check_create_bug_response
    response_html)
  File "/usr/lib64/python3.6/re.py", line 182, in search
    return _compile(pattern, flags).search(string)
TypeError: cannot use a string pattern on a bytes-like object
Comment 1 Paulo Matos 2020-01-08 01:55:27 PST
Just found out the problem is the python version - I shouldn't be python3 here.
Comment 2 Jonathan Bedard 2020-01-09 10:57:42 PST
(In reply to Paulo Matos from comment #1)
> Just found out the problem is the python version - I shouldn't be python3
> here.

Except Python 3 should be working now, so this is a valid bug. Looks like something not covered by my unit tests or manual testing.
Comment 3 Jonathan Bedard 2020-01-09 10:58:35 PST
Reopening the bug, we do intend to fix this.
Comment 4 Jonathan Bedard 2020-01-10 08:12:21 PST
Created attachment 387337 [details]
Patch
Comment 5 WebKit Commit Bot 2020-01-10 16:48:29 PST
Comment on attachment 387337 [details]
Patch

Clearing flags on attachment: 387337

Committed r254382: <https://trac.webkit.org/changeset/254382>
Comment 6 WebKit Commit Bot 2020-01-10 16:48:30 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-01-10 16:49:15 PST
<rdar://problem/58495979>