From: "Böszörményi Zoltán" <zboszor@gmail.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: openembedded-core@lists.openembedded.org,
Bartosz Golaszewski <brgl@kernel.org>,
Trevor Gamblin <tgamblin@baylibre.com>,
Alexander Kanavin <alex.kanavin@gmail.com>
Subject: Re: [OE-core] [RFC][PATCH 00/14] Support Python freethreading
Date: Wed, 25 Mar 2026 14:51:06 +0100 [thread overview]
Message-ID: <2646923f-34d6-4cb5-9e9a-ac8ec789c359@gmail.com> (raw)
In-Reply-To: <CADkTA4MOXYq1xQaGgGnREmgQUTQaEDTskv1aWRyM9zqiXxAuJA@mail.gmail.com>
2026. 03. 25. 14:17 keltezéssel, Bruce Ashfield írta:
>
>
> On Wed, Mar 25, 2026 at 9:13 AM Böszörményi Zoltán <zboszor@gmail.com> wrote:
>
> 2026. 03. 25. 14:01 keltezéssel, Bruce Ashfield írta:
> >
> >
> > On Wed, Mar 25, 2026 at 7:31 AM Zoltan Boszormenyi via lists.openembedded.org
> <http://lists.openembedded.org>
> > <http://lists.openembedded.org> <zboszor=gmail.com@lists.openembedded.org> wrote:
> >
> > This patchset allows turning on Python freethreading by using
> > a new DISTRO_FEATURES setting:
> >
> > DISTRO_FEATURES += "python_freethreading"
> >
> > and optionally:
> >
> > DISTRO_FEATURES_NATIVE += "python_freethreading"
> >
> > The change to python3-dir.bbclass is crucial, as all python module
> > build helper classes rely on it.
> >
> > I also added native variants of some settings because another
> > series against meta-openembedded is needed to complete this one.
> > In that, the change to the fontforge recipe relies on the native
> > setting for setting BUILD_LDFLAGS.
> >
> >
> > Looking at those other patches in the series, they don't seem to
> > be conditional on the distro feature.
> >
> > Are those changes valid for a build with and without freethreading ?
>
> Yes!
>
> The main change is in python3-dir.bbclass, and the recipe tweaks
> are just adaptations to the fact that only ${PYTHON_DIR} is needed,
> not ${PYTHON_DIR}${PYTHON_ABI} from that point.
>
> I was thinking that the introductory mail stressed this enough.
>
>
> Obviously not :)
Obviously. :)
> I didn't get that impression at all from reading the introductory
> message or looking at the patches themselves.
>
> You have the overview knowledge of the feature, why it is
> useful, how it impacts existing recipes, how the migration would
> work, what is the compatibility, etc.
I think the Python 3.14 release notes has enough details.
See also https://www.phoronix.com/news/Python-3.14
With the two series I sent, only a single recipe is left (cmpi-bindings)
in openembedded-core and meta-openembedded that uses
the PYTHON_ABI setting explicitly.
Migration (of python scripts) should not be a problem.
If it worked with 3.14 as is, it works with freethreading enabled.
Compatibility is poor for a lot of modules, that clearly spell this out
in their pyproject.toml or PKG-INFO:
"Programming Language :: Python :: Free Threading :: 1 - Unstable"
or something not quite production level support.
It's still experimental for 3rd party modules, despite being officially
supported for the interpreter and built-in modules in 3.14.
This is the reason this was an RFC series.
Anyway, the reason I was experimenting with this was that
with heavily threaded python code, an import storm can cause
a crash in 3.12.11 or the manually updated 3.13.12 in Yocto 5.3 in
importlib._bootstrap according to the backtrace.
I would like to see if Python 3.14 (with and without freethreading)
fixes such crashes.
> The patch reader doesn't, so that all needs to be clearly
> supplied.
Maybe next time for v2 after I have a complete image
successfully built with freethreading enabled.
>
> Bruce
>
>
>
> FWIW, less than 30 recipes was spelling the latter out in
> openembedded-core and meta-openembedded combined.
>
> > That's the type of information, along with the benefits of enabling
> > this would be information expected in a 0/N introductory patch.
> >
> > Cheers,
> >
> > Bruce
> >
> >
> > All of the changes included here were successfully build tested,
> > except for the gdb-cross-canadian change. That one failed, but
> > it's included for completeness.
> >
> > Quite a few of python modules were build tested for native and
> > target builds, including python3-pytorch from my meta-python-ai
> > with reduced RDEPENDS because e.g. python3-onnx there failed
> > to build with freethreading enabled.
> >
> > All in all, this series at least allows to get things going.
> > Though maybe not for Yocto 6.0, as it's quite late.
> >
> > Best regards,
> > Zoltán Böszörményi
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#233874):
> > https://lists.openembedded.org/g/openembedded-core/message/233874
> > Mute This Topic: https://lists.openembedded.org/mt/118499141/1050810
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> <mailto:openembedded-core%2Bowner@lists.openembedded.org>
> > <mailto:openembedded-core%2Bowner@lists.openembedded.org
> <mailto:openembedded-core%252Bowner@lists.openembedded.org>>
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
> > [bruce.ashfield@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
> >
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
next prev parent reply other threads:[~2026-03-25 13:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 11:24 [RFC][PATCH 00/14] Support Python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 01/14] python3-dir.bbclass: Support python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 02/14] python3: Adapt recipe to freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 03/14] python3native.bbclass: Fix settings Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 04/14] python_pyo3.bbclass: Pass ABI flag and PYTHON_MAINVERSION Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 05/14] clang: Use PYTHON_MAINVERSION for python module versioning Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 06/14] gdb, gdb-cross-canadian: Fix settings for python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 07/14] boost: " Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 08/14] lttng-tools: Simplify setting PYTHON_INCLUDE Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 09/14] lttng-ust: " Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 10/14] libcap-ng-python: Use PYTHON_DIR for FILES Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 11/14] hwlatdetect: Use PYTHON_DIR to support python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 12/14] rpm: Support Python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 13/14] xcb-proto: " Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 14/14] libxcb: " Zoltán Böszörményi
2026-03-25 12:58 ` [RFC][PATCH 00/14] " Alexander Kanavin
2026-03-25 13:08 ` Böszörményi Zoltán
2026-03-25 13:01 ` [OE-core] " Bruce Ashfield
2026-03-25 13:13 ` Böszörményi Zoltán
2026-03-25 13:17 ` Bruce Ashfield
2026-03-25 13:51 ` Böszörményi Zoltán [this message]
2026-03-25 14:17 ` Bruce Ashfield
2026-03-26 5:29 ` Böszörményi Zoltán
[not found] ` <18A04D0ADBD32036.57592@lists.openembedded.org>
2026-03-26 5:41 ` Böszörményi Zoltán
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=2646923f-34d6-4cb5-9e9a-ac8ec789c359@gmail.com \
--to=zboszor@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=brgl@kernel.org \
--cc=bruce.ashfield@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=tgamblin@baylibre.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