remove U mode from tools/grit to support modern Python3

This commit is contained in:
Tom spot Callaway 2022-06-30 15:45:07 -04:00
parent b98b064928
commit 7de558c0a9
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff -up chromium-103.0.5060.53/tools/grit/grit/util.py.fix-python3 chromium-103.0.5060.53/tools/grit/grit/util.py
--- chromium-103.0.5060.53/tools/grit/grit/util.py.fix-python3 2022-06-30 19:38:05.483590098 +0000
+++ chromium-103.0.5060.53/tools/grit/grit/util.py 2022-06-30 19:38:14.024304827 +0000
@@ -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()

View File

@ -299,6 +299,9 @@ Patch64: chromium-91.0.4472.77-aarch64-cxxflags-addition.patch
# https://bugs.chromium.org/p/chromium/issues/detail?id=1192875
Patch65: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch
# Python3.9 or later no longer support the 'U' mode
Patch66: chromium-103.0.5060.53-python3-do-not-use-deprecated-mode-U.patch
# Fix missing cstring in remoting code
Patch67: chromium-98.0.4758.80-remoting-cstring.patch
# Apply fix_textrels hack for i686 (even without lld)
@ -1021,6 +1024,7 @@ udev.
%patch63 -p1 -b .gcc-cfi-fix
%patch64 -p1 -b .aarch64-cxxflags-addition
%patch65 -p1 -b .java-only-allowed
%patch66 -p1 -b .python3-do-not-use-deprecated-mode-U
%patch67 -p1 -b .remoting-cstring
%patch68 -p1 -b .i686-textrels
%patch79 -p1 -b .widevine-no-download