From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
James Hilliard <james.hilliard1@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors
Date: Thu, 6 Jun 2024 11:46:48 +0200 [thread overview]
Message-ID: <ZmGFiPF5Ceosd7NF@landeda> (raw)
In-Reply-To: <20231025205233.1925727-1-kadir.c.yilmaz@gmail.com>
Kadir, All,
Thank you for your patch; sorry to chime in so late...
+James, who added the package in the first place
On 2023-10-25 22:52 +0200, Kadir Yilmaz spake thusly:
> qt5webengine fails to build due to changes introduced in python3.11:
[--SNIP--]
> diff --git a/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
> new file mode 100644
> index 0000000000..44c8337f80
> --- /dev/null
> +++ b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
> @@ -0,0 +1,72 @@
> +From 82c9b1d3f4383cd8059690bd34c9d7fa86398b78 Mon Sep 17 00:00:00 2001
> +From: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
> +Date: Sat, 21 Oct 2023 22:45:03 +0200
> +Subject: [PATCH] Fix build tools to run with python3.11
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Upstream: N/A buildroot uses python3.11 which apparently is not yet
> +supported by upstream
Even then, the documentation for python since 3.6 [0] and until 3.10 [1]
also states:
(?aiLmsux)
[...] Flags should be used first in the expression string.
So, in python 3.11 they just are now enforcing the rule, while
previously the construct was (silently?) accepted.
You should still try and send that patch upstream.
[0] https://docs.python.org/3.6/library/re.html
[1] https://docs.python.org/3.10/library/re.html
Regards,
Yann E. MORIN.
> +- re error: global flags not at the start
> +
> + https://docs.python.org/3/library/re.html#re-syntax
> + (?aiLmsux)
> + ....
> + Changed in version 3.11: This construction can only be used at the
> + start of the expression
> +
> +- ValueError: invalid mode: 'rU'
> +
> + open(), io.open(), codecs.open() and fileinput.FileInput no longer
> + accept 'U' (“universal newline”) in the file mode. In Python 3,
> + “universal newline” mode is used by default whenever a file is
> + opened in text mode, and the 'U' flag has been deprecated since
> + Python 3.3. The newline parameter to these functions controls how
> + universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
> +
> +Signed-off-by: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
> +---
> + chromium/tools/grit/grit/util.py | 2 +-
> + chromium/tools/metrics/ukm/ukm_model.py | 4 ++--
> + 2 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/chromium/tools/grit/grit/util.py b/chromium/tools/grit/grit/util.py
> +index 528d766ad6b..6e8cdb0ebfa 100644
> +--- a/chromium/tools/grit/grit/util.py
> ++++ b/chromium/tools/grit/grit/util.py
> +@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
> + mode = 'rb'
> + encoding = None
> + else:
> +- mode = 'rU'
> ++ mode = 'r'
> +
> + with io.open(abs(filename), mode, encoding=encoding) as f:
> + return f.read()
> +diff --git a/chromium/tools/metrics/ukm/ukm_model.py b/chromium/tools/metrics/ukm/ukm_model.py
> +index ec24dd57360..57decab3ccc 100644
> +--- a/chromium/tools/metrics/ukm/ukm_model.py
> ++++ b/chromium/tools/metrics/ukm/ukm_model.py
> +@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType(
> + _STATISTICS_TYPE = models.ObjectNodeType(
> + 'statistics',
> + attributes=[
> +- ('export', str, r'^(?i)(|true|false)$'),
> ++ ('export', str, r'(?i)^(|true|false)$'),
> + ],
> + children=[
> + models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
> +@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType(
> + 'event',
> + attributes=[
> + ('name', str, r'^[A-Za-z0-9.]+$'),
> +- ('singular', str, r'^(?i)(|true|false)$'),
> ++ ('singular', str, r'(?i)^(|true|false)$'),
> + ],
> + alphabetization=[
> + (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
> +--
> +2.25.1
> +
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-06-06 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 20:52 [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors Kadir Yilmaz
2024-06-06 9:46 ` Yann E. MORIN [this message]
2024-07-15 10:18 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZmGFiPF5Ceosd7NF@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=james.hilliard1@gmail.com \
--cc=kadir.c.yilmaz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox