update-webkitgtk-flatpak fails if running with python2 > $ ./Tools/Scripts/update-webkitgtk-flatpak > Can't load file /tmp/tmpSabstY: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/update-webkitgtk-flatpak", line 28, in <module> > WebkitFlatpak.load_from_args(["--gtk", "--update"] + sys.argv[1:]).run() > File "./Tools/flatpak/flatpakutils.py", line 693, in run > if not self.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="https://dl.flathub.org/repo/flathub.flatpakrepo")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpSabstY', '--if-not-exists']' returned non-zero exit status 1 Request Error happens to retrieve "https://dl.flathub.org/repo/flathub.flatpakrepo". I attached the content of /tmp/tmpSabstY. Python3 can retrieve the content.
Created attachment 344071 [details] Request Error
I tested with listening http://localhost:10003 . urllib.urlretrieve sends an invalid request. Python 2.7 urllib.urlretrieve > GET http://localhost:10003 HTTP/1.0 > Host: localhost:10003 > User-Agent: Python-urllib/1.17 > Accept: */* Python 3 urllib.request.urlretrieve > GET / HTTP/1.1 > Accept-Encoding: identity > Host: localhost:10003 > User-Agent: Python-urllib/3.6 > Connection: close Python 2.7 urllib2.urlopen > GET / HTTP/1.1 > Accept-Encoding: identity > Host: localhost:10003 > Connection: close > User-Agent: Python-urllib/2.7
IMO we should change this script to always use python3 and move on. Scripts not used by Apple do not need to be compatible with python2.
(In reply to Michael Catanzaro from comment #3) > IMO we should change this script to always use python3 and move on. Scripts > not used by Apple do not need to be compatible with python2. I agree that this is a perfectly valid solution in this case.
Umm, run-webdriver-tests also emits the error message: > $ ./Tools/Scripts/run-webdriver-tests > Can't load file /tmp/tmpgWqSc3: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/run-webdriver-tests", line 73, in <module> > flatpakutils.run_in_sandbox_if_available(sys.argv) > File "./Tools/flatpak/flatpakutils.py", line 818, in run_in_sandbox_if_available > if not flatpak_runner.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="https://dl.flathub.org/repo/flathub.flatpakrepo")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpgWqSc3', '--if-not-exists']' returned non-zero exit status 1
(In reply to Fujii Hironori from comment #5) > Umm, run-webdriver-tests also emits the error message: May bad. this is no problem. This script seems only for GTK and WPE ports.
Umm, run-webkit-tests also emits the error message: > $ ./Tools/Scripts/run-webkit-tests > Can't load file /tmp/tmpmf7yMP: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/run-webkit-tests", line 39, in <module> > flatpakutils.run_in_sandbox_if_available(sys.argv) > File "./Tools/flatpak/flatpakutils.py", line 818, in run_in_sandbox_if_available > if not flatpak_runner.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="https://dl.flathub.org/repo/flathub.flatpakrepo")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpmf7yMP', '--if-not-exists']' returned non-zero exit status 1
Created attachment 344174 [details] Patch
Comment on attachment 344174 [details] Patch Attachment 344174 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8423836 New failing tests: http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html http/tests/security/canvas-remote-read-remote-video-redirect.html http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
Created attachment 344185 [details] Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 344174 [details] Patch Clearing flags on attachment: 344174 Committed r233494: <https://trac.webkit.org/changeset/233494>
All reviewed patches have been landed. Closing bug.