From nobody Sun Dec 04 22:22:47 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NQLxq0skTz4jlRv; Sun, 4 Dec 2022 22:31:27 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from sprint-2.amdmi3.ru (sprint-2.amdmi3.ru [185.185.68.145]) by mx1.freebsd.org (Postfix) with ESMTP id 4NQLxp06Chz4Csy; Sun, 4 Dec 2022 22:31:25 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of amdmi3@amdmi3.ru has no SPF policy when checking 185.185.68.145) smtp.mailfrom=amdmi3@amdmi3.ru; dmarc=none Received: from amdmi3.ru (localhost [127.0.0.1]) by sprint-2.amdmi3.ru (Postfix) with SMTP id AE8651882DC; Mon, 5 Dec 2022 01:34:21 +0300 (MSK) Received: by amdmi3.ru (nbSMTP-1.00) for uid 1000 amdmi3@amdmi3.ru; Mon, 5 Dec 2022 01:34:21 +0300 (MSK) Date: Mon, 5 Dec 2022 01:22:47 +0300 From: Dmitry Marakasov To: Christoph Moench-Tegeder Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 0b3ec4bd7b7a - main - Mk/bsd.gecko.mk: release python limitation Message-ID: References: <202211162223.2AGMNOln076773@gitrepo.freebsd.org> List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202211162223.2AGMNOln076773@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.98 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.980]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MLMMJ_DEST(0.00)[dev-commits-ports-all@freebsd.org,dev-commits-ports-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[amdmi3]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[amdmi3.ru]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ASN(0.00)[asn:35278, ipnet:185.185.68.0/22, country:RU] X-Rspamd-Queue-Id: 4NQLxp06Chz4Csy X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N * Christoph Moench-Tegeder (cmt@FreeBSD.org) wrote: > The branch main has been updated by cmt: > > URL: https://cgit.FreeBSD.org/ports/commit/?id=0b3ec4bd7b7a21467fb1f0d2ee6e9699947b811d > > commit 0b3ec4bd7b7a21467fb1f0d2ee6e9699947b811d > Author: Christoph Moench-Tegeder > AuthorDate: 2022-11-16 22:21:55 +0000 > Commit: Christoph Moench-Tegeder > CommitDate: 2022-11-16 22:21:55 +0000 > > Mk/bsd.gecko.mk: release python limitation > > upstream patch should allow building with newer pythons, while the > old python still works This looks incomplete - thunderbird still does not build with python 3.11: ... Creating config.status Traceback (most recent call last): File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/configure.py", line 349, in sys.exit(main(sys.argv)) ^^^^^^^^^^^^^^ File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/configure.py", line 157, in main config_status(js_config, execute=False) File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/configure.py", line 281, in config_status partial_config.write_vars(sanitized_config) File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/backend/configenvironment.py", line 355, in write_vars self.substs._fill_group(substs) File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/backend/configenvironment.py", line 250, in _fill_group new_files.add(Path(self._write_file(k, v))) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/backend/configenvironment.py", line 232, in _write_file with FileAvoidWrite(filename) as fh: File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/util.py", line 353, in __exit__ self.close() File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/util.py", line 277, in close existing = _open(self.name, self.mode) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/work/usr/ports/mail/thunderbird/work/thunderbird-102.5.1/python/mozbuild/mozbuild/util.py", line 63, in _open return io.open(path, mode, encoding="utf-8", newline="\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid mode: 'rU' > Mk/bsd.gecko.mk | 2 +- > mail/thunderbird/files/patch-bug1799982 | 60 +++++++++++++++++++++++++++++++++ > www/firefox-esr/files/patch-bug1799982 | 60 +++++++++++++++++++++++++++++++++ > www/firefox/files/patch-bug1799982 | 60 +++++++++++++++++++++++++++++++++ > 4 files changed, 181 insertions(+), 1 deletion(-) > > diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk > index c0e9e999b3b5..4e2a77c5107c 100644 > --- a/Mk/bsd.gecko.mk > +++ b/Mk/bsd.gecko.mk > @@ -61,7 +61,7 @@ MOZILLA_VER?= ${PORTVERSION} > MOZILLA_BIN?= ${PORTNAME}-bin > MOZILLA_EXEC_NAME?=${MOZILLA} > 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 > USE_GL= gl > USE_GNOME= cairo gdkpixbuf2 gtk30 > diff --git a/mail/thunderbird/files/patch-bug1799982 b/mail/thunderbird/files/patch-bug1799982 > new file mode 100644 > index 000000000000..dac77d73390b > --- /dev/null > +++ b/mail/thunderbird/files/patch-bug1799982 > @@ -0,0 +1,60 @@ > +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.*?\n?)%\}[ ]*(C\+\+)?" > ++ r"%\{[ ]*C\+\+[ ]*\n(?P(\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('"') > + > diff --git a/www/firefox-esr/files/patch-bug1799982 b/www/firefox-esr/files/patch-bug1799982 > new file mode 100644 > index 000000000000..dac77d73390b > --- /dev/null > +++ b/www/firefox-esr/files/patch-bug1799982 > @@ -0,0 +1,60 @@ > +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.*?\n?)%\}[ ]*(C\+\+)?" > ++ r"%\{[ ]*C\+\+[ ]*\n(?P(\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('"') > + > diff --git a/www/firefox/files/patch-bug1799982 b/www/firefox/files/patch-bug1799982 > new file mode 100644 > index 000000000000..dac77d73390b > --- /dev/null > +++ b/www/firefox/files/patch-bug1799982 > @@ -0,0 +1,60 @@ > +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.*?\n?)%\}[ ]*(C\+\+)?" > ++ r"%\{[ ]*C\+\+[ ]*\n(?P(\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('"') > + > -- Dmitry Marakasov . amdmi3@amdmi3.ru ..: https://github.com/AMDmi3 https://amdmi3.ru/