Skip to content
Snippets Groups Projects
Commit 0b3ec4bd authored by Christoph Moench-Tegeder's avatar Christoph Moench-Tegeder
Browse files

Mk/bsd.gecko.mk: release python limitation

upstream patch should allow building with newer pythons, while the
old python still works
parent d76e9bb3
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ MOZILLA_VER?= ${PORTVERSION} ...@@ -61,7 +61,7 @@ MOZILLA_VER?= ${PORTVERSION}
MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_BIN?= ${PORTNAME}-bin
MOZILLA_EXEC_NAME?=${MOZILLA} MOZILLA_EXEC_NAME?=${MOZILLA}
USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \
python:3.6-3.10,build desktop-file-utils python:3.6+,build desktop-file-utils
CPE_VENDOR?=mozilla CPE_VENDOR?=mozilla
USE_GL= gl USE_GL= gl
USE_GNOME= cairo gdkpixbuf2 gtk30 USE_GNOME= cairo gdkpixbuf2 gtk30
......
Bug 1799982 - Remove uses of inline flags from XPIDL regexps. r=xpcom-reviewers,kmag
Apparently the use of these is being turned into an error in Python 3.11.
Fortunately, our uses appears to be rather trivial.
For t_multilinecomment and t_LCDATA, I dropped the (?s) flag and just
replaced the one use of . with (\n|.). (?s) means DOTALL, which means
that dot includes any character, including a newline. Otherwise it means
dot includes any character except a newline.
I took the new t_singlelinecomment from IPDL's parser.py, so I assume
it is reasonable enough. t_multilinecomment is also now the same as
in IPDL.
Differential Revision: https://phabricator.services.mozilla.com/D161738
diff --git xpcom/idl-parser/xpidl/xpidl.py xpcom/idl-parser/xpidl/xpidl.py
--- xpcom/idl-parser/xpidl/xpidl.py
+++ xpcom/idl-parser/xpidl/xpidl.py
@@ -1634,36 +1634,36 @@ class IDLParser(object):
t_LSHIFT = r"<<"
t_RSHIFT = r">>"
literals = '"(){}[]<>,;:=|+-*'
t_ignore = " \t"
def t_multilinecomment(self, t):
- r"/\*(?s).*?\*/"
+ r"/\*(\n|.)*?\*/"
t.lexer.lineno += t.value.count("\n")
if t.value.startswith("/**"):
self._doccomments.append(t.value)
def t_singlelinecomment(self, t):
- r"(?m)//.*?$"
+ r"//[^\n]*"
def t_IID(self, t):
return t
t_IID.__doc__ = r"%(c)s{8}-%(c)s{4}-%(c)s{4}-%(c)s{4}-%(c)s{12}" % {"c": hexchar}
def t_IDENTIFIER(self, t):
r"(unsigned\ long\ long|unsigned\ short|unsigned\ long|long\ long)(?!_?[A-Za-z][A-Za-z_0-9])|_?[A-Za-z][A-Za-z_0-9]*" # NOQA: E501
t.type = self.keywords.get(t.value, "IDENTIFIER")
return t
def t_LCDATA(self, t):
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?"
+ r"%\{[ ]*C\+\+[ ]*\n(?P<cdata>(\n|.)*?\n?)%\}[ ]*(C\+\+)?"
t.type = "CDATA"
t.value = t.lexer.lexmatch.group("cdata")
t.lexer.lineno += t.value.count("\n")
return t
def t_INCLUDE(self, t):
r'\#include[ \t]+"[^"\n]+"'
inc, value, end = t.value.split('"')
Bug 1799982 - Remove uses of inline flags from XPIDL regexps. r=xpcom-reviewers,kmag
Apparently the use of these is being turned into an error in Python 3.11.
Fortunately, our uses appears to be rather trivial.
For t_multilinecomment and t_LCDATA, I dropped the (?s) flag and just
replaced the one use of . with (\n|.). (?s) means DOTALL, which means
that dot includes any character, including a newline. Otherwise it means
dot includes any character except a newline.
I took the new t_singlelinecomment from IPDL's parser.py, so I assume
it is reasonable enough. t_multilinecomment is also now the same as
in IPDL.
Differential Revision: https://phabricator.services.mozilla.com/D161738
diff --git xpcom/idl-parser/xpidl/xpidl.py xpcom/idl-parser/xpidl/xpidl.py
--- xpcom/idl-parser/xpidl/xpidl.py
+++ xpcom/idl-parser/xpidl/xpidl.py
@@ -1634,36 +1634,36 @@ class IDLParser(object):
t_LSHIFT = r"<<"
t_RSHIFT = r">>"
literals = '"(){}[]<>,;:=|+-*'
t_ignore = " \t"
def t_multilinecomment(self, t):
- r"/\*(?s).*?\*/"
+ r"/\*(\n|.)*?\*/"
t.lexer.lineno += t.value.count("\n")
if t.value.startswith("/**"):
self._doccomments.append(t.value)
def t_singlelinecomment(self, t):
- r"(?m)//.*?$"
+ r"//[^\n]*"
def t_IID(self, t):
return t
t_IID.__doc__ = r"%(c)s{8}-%(c)s{4}-%(c)s{4}-%(c)s{4}-%(c)s{12}" % {"c": hexchar}
def t_IDENTIFIER(self, t):
r"(unsigned\ long\ long|unsigned\ short|unsigned\ long|long\ long)(?!_?[A-Za-z][A-Za-z_0-9])|_?[A-Za-z][A-Za-z_0-9]*" # NOQA: E501
t.type = self.keywords.get(t.value, "IDENTIFIER")
return t
def t_LCDATA(self, t):
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?"
+ r"%\{[ ]*C\+\+[ ]*\n(?P<cdata>(\n|.)*?\n?)%\}[ ]*(C\+\+)?"
t.type = "CDATA"
t.value = t.lexer.lexmatch.group("cdata")
t.lexer.lineno += t.value.count("\n")
return t
def t_INCLUDE(self, t):
r'\#include[ \t]+"[^"\n]+"'
inc, value, end = t.value.split('"')
Bug 1799982 - Remove uses of inline flags from XPIDL regexps. r=xpcom-reviewers,kmag
Apparently the use of these is being turned into an error in Python 3.11.
Fortunately, our uses appears to be rather trivial.
For t_multilinecomment and t_LCDATA, I dropped the (?s) flag and just
replaced the one use of . with (\n|.). (?s) means DOTALL, which means
that dot includes any character, including a newline. Otherwise it means
dot includes any character except a newline.
I took the new t_singlelinecomment from IPDL's parser.py, so I assume
it is reasonable enough. t_multilinecomment is also now the same as
in IPDL.
Differential Revision: https://phabricator.services.mozilla.com/D161738
diff --git xpcom/idl-parser/xpidl/xpidl.py xpcom/idl-parser/xpidl/xpidl.py
--- xpcom/idl-parser/xpidl/xpidl.py
+++ xpcom/idl-parser/xpidl/xpidl.py
@@ -1634,36 +1634,36 @@ class IDLParser(object):
t_LSHIFT = r"<<"
t_RSHIFT = r">>"
literals = '"(){}[]<>,;:=|+-*'
t_ignore = " \t"
def t_multilinecomment(self, t):
- r"/\*(?s).*?\*/"
+ r"/\*(\n|.)*?\*/"
t.lexer.lineno += t.value.count("\n")
if t.value.startswith("/**"):
self._doccomments.append(t.value)
def t_singlelinecomment(self, t):
- r"(?m)//.*?$"
+ r"//[^\n]*"
def t_IID(self, t):
return t
t_IID.__doc__ = r"%(c)s{8}-%(c)s{4}-%(c)s{4}-%(c)s{4}-%(c)s{12}" % {"c": hexchar}
def t_IDENTIFIER(self, t):
r"(unsigned\ long\ long|unsigned\ short|unsigned\ long|long\ long)(?!_?[A-Za-z][A-Za-z_0-9])|_?[A-Za-z][A-Za-z_0-9]*" # NOQA: E501
t.type = self.keywords.get(t.value, "IDENTIFIER")
return t
def t_LCDATA(self, t):
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?"
+ r"%\{[ ]*C\+\+[ ]*\n(?P<cdata>(\n|.)*?\n?)%\}[ ]*(C\+\+)?"
t.type = "CDATA"
t.value = t.lexer.lexmatch.group("cdata")
t.lexer.lineno += t.value.count("\n")
return t
def t_INCLUDE(self, t):
r'\#include[ \t]+"[^"\n]+"'
inc, value, end = t.value.split('"')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment