mirror of
http://code.qt.io/yocto/meta-qt6.git
synced 2026-01-01 13:58:07 +00:00
webengine: add patch for python 3.11 build issue
yocto master branch updated python to 3.11, resulting
in webengine build error(s):
"File "/home/qt/work/build/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtwebengine/6.4.1-r0/git/src/3rdparty/chromium/tools/grit/grit/util.py", line 214, in ReadFile
with io.open(filename, mode, encoding=encoding) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'"
Add patch from chromium upstream.
Pick-to: 6.4 6.4.1 6.2
Change-Id: I6308d2acd17a74b20ad6651d59f34e7246dc96ef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
This commit is contained in:
parent
e950cff143
commit
676e6da41b
|
|
@ -36,6 +36,7 @@ SRC_URI += " \
|
|||
SRC_URI += " \
|
||||
file://chromium/0001-v8-qemu-wrapper.patch;patchdir=src/3rdparty \
|
||||
file://chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \
|
||||
file://chromium/0003-Fix-build-in-Python-3.11-invalid-mode-rU.patch;patchdir=src/3rdparty \
|
||||
"
|
||||
|
||||
SRCREV_FORMAT = "qtwebengine_qtwebengine-chromium"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
From a0cabac19789a4e88c86407970ea3b3d2929006b Mon Sep 17 00:00:00 2001
|
||||
From: Joanmarie Diggs <jdiggs@igalia.com>
|
||||
Date: Tue, 30 Aug 2022 06:00:13 +0000
|
||||
Subject: [PATCH] Fix build in Python 3.11 (invalid mode: 'rU')
|
||||
|
||||
In Python 3.11, 'U' ("universal newline") is no longer accepted in
|
||||
the file mode, having been deprecated in Python 3.3. The "universal
|
||||
newline" is used by default when a file is open in text mode.
|
||||
|
||||
This commit removes the 'U' from the two (non-third-party) places
|
||||
it is used.
|
||||
|
||||
Bug: 1357549
|
||||
Change-Id: I3305707858d8ba7a9f518656a9b97dc1702bbe94
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3859535
|
||||
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
|
||||
Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
|
||||
Reviewed-by: Nico Weber <thakis@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1040794}
|
||||
---
|
||||
chromium/PRESUBMIT_test_mocks.py | 2 +-
|
||||
chromium/tools/grit/grit/util.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chromium/PRESUBMIT_test_mocks.py b/chromium/PRESUBMIT_test_mocks.py
|
||||
index b7d1b482c5f..7304697b117 100644
|
||||
--- a/chromium/PRESUBMIT_test_mocks.py
|
||||
+++ b/chromium/PRESUBMIT_test_mocks.py
|
||||
@@ -128,7 +128,7 @@ class MockInputApi(object):
|
||||
def PresubmitLocalPath(self):
|
||||
return self.presubmit_local_path
|
||||
|
||||
- def ReadFile(self, filename, mode='rU'):
|
||||
+ def ReadFile(self, filename, mode='r'):
|
||||
if hasattr(filename, 'AbsoluteLocalPath'):
|
||||
filename = filename.AbsoluteLocalPath()
|
||||
for file_ in self.files:
|
||||
diff --git a/chromium/tools/grit/grit/util.py b/chromium/tools/grit/grit/util.py
|
||||
index 98433d154c0..98e770b8533 100644
|
||||
--- a/chromium/tools/grit/grit/util.py
|
||||
+++ b/chromium/tools/grit/grit/util.py
|
||||
@@ -209,7 +209,7 @@ def ReadFile(filename, encoding):
|
||||
mode = 'rb'
|
||||
encoding = None
|
||||
else:
|
||||
- mode = 'rU'
|
||||
+ mode = 'r'
|
||||
|
||||
with io.open(filename, mode, encoding=encoding) as f:
|
||||
return f.read()
|
||||
Loading…
Reference in New Issue
Block a user