From 91c5de9b5462a7c66cf342232d0022af052eeb8d Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Mon, 24 Oct 2022 18:02:39 -0500 Subject: [PATCH] firefox [testing]: python 3.11 compatibility --- testing/firefox/checksums | 1 + testing/firefox/patches/python-3.11.patch | 30 +++++++++++++++++++++++ testing/firefox/sources | 1 + 3 files changed, 32 insertions(+) create mode 100644 testing/firefox/patches/python-3.11.patch diff --git a/testing/firefox/checksums b/testing/firefox/checksums index 44097e56..095ae475 100644 --- a/testing/firefox/checksums +++ b/testing/firefox/checksums @@ -3,3 +3,4 @@ 42d489e60eae7d2807ef109a4eb1dd3d0e52e8ea9a8a19074495453e588f0625 4a232e3aa3973894a58c126b9e901c924d4e1ca3e00c4fc82d08de4b880183a9 ed51ce8a6730c489ea9dda354f02c579fb3632925096a0260bfae7a6b82ceace +5b0aad43012e4c175a6dde70b006fa9f07c4b0d70e9632414f16ac55d5243be4 diff --git a/testing/firefox/patches/python-3.11.patch b/testing/firefox/patches/python-3.11.patch new file mode 100644 index 00000000..97ac3cef --- /dev/null +++ b/testing/firefox/patches/python-3.11.patch @@ -0,0 +1,30 @@ +# https://src.fedoraproject.org/rpms/firefox/c/4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e?branch=4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e + +diff -up firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py +--- firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 2022-06-23 09:10:31.000000000 +0200 ++++ firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py 2022-07-15 16:18:52.048351493 +0200 +@@ -1572,13 +1572,13 @@ class IDLParser(object): + t_ignore = " \t" + + def t_multilinecomment(self, t): +- r"/\*(?s).*?\*/" ++ r"/\*(?s:.)*?\*/" + t.lexer.lineno += t.value.count("\n") + if t.value.startswith("/**"): + self._doccomments.append(t.value) + + def t_singlelinecomment(self, t): +- r"(?m)//.*?$" ++ r"(?m://.*?$)" + + def t_IID(self, t): + return t +@@ -1591,7 +1591,7 @@ class IDLParser(object): + return t + + def t_LCDATA(self, t): +- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P.*?\n?)%\}[ ]*(C\+\+)?" ++ r"(?s:%\{[ ]*C\+\+[ ]*\n(?P.*?\n?)%\}[ ]*(C\+\+)?)" + t.type = "CDATA" + t.value = t.lexer.lexmatch.group("cdata") + t.lexer.lineno += t.value.count("\n") diff --git a/testing/firefox/sources b/testing/firefox/sources index 7fb84ab1..a832276f 100644 --- a/testing/firefox/sources +++ b/testing/firefox/sources @@ -3,3 +3,4 @@ patches/fix-linux-header.patch patches/no-dbus.patch patches/no-fribidi.patch patches/no-perl.patch +patches/python-3.11.patch