From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Quentin Schulz" <quentin.schulz@cherry.de>,
<docs@lists.yoctoproject.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [docs] [yocto-docs PATCH] set_versions.py: use backward-compatible python argument in run
Date: Thu, 19 Dec 2024 09:19:53 +0100 [thread overview]
Message-ID: <D6FJ3QKY56CY.2M1SWSRBEEP8A@bootlin.com> (raw)
In-Reply-To: <c1320e21-8f72-4140-ba73-46c907b95cee@cherry.de>
Hi Quentin,
On Wed Dec 18, 2024 at 2:39 PM CET, Quentin Schulz wrote:
> Hi Antonin,
>
> On 12/18/24 9:19 AM, Antonin Godard wrote:
>> Hi Quentin,
>>
>> On Tue Dec 17, 2024 at 12:05 PM CET, Quentin Schulz wrote:
>>> Hi Antonin,
>>>
>>> On 12/17/24 11:35 AM, Antonin Godard via lists.yoctoproject.org wrote:
>>>> Some workers on the autobuilder reported the following error:
>>>>
>>>> File "./set_versions.py", line 102, in <module>
>>>> subprocess.run(["git", "show", "yocto-%s" % release_series[activereleases[0]]], capture_output=True, check=True)
>>>> File "/usr/lib64/python3.6/subprocess.py", line 423, in run
>>>> with Popen(*popenargs, **kwargs) as process:
>>>> TypeError: __init__() got an unexpected keyword argument 'capture_output'
>>>>
>>>> See https://valkyrie.yoctoproject.org/#/builders/34/builds/86.
>>>>
>>>> This is because capture_output was introduced in Python 3.7, and some of
>>>> the support distributions are still on Python 3.6. Since capture_output
>>>> is essentially just setting stdout and stderr to PIPE
>>>> (https://github.com/python/cpython/blob/3.13/Lib/subprocess.py#L547), do
>>>> it manually here to be compatible with older python versions.
>>>>
>>>> This is also the case for the "text" parameter, introduced in 3.7 to
>>>> alias the universal_newlines parameter. Use "universal_newlines" to be
>>>> backward-compatible.
>>>>
>>>> [ YOCTO #15687 ]
>>>>
>>>
>>> Do we really want to open that can of worms?
>>>
>>> https://docs.yoctoproject.org/ref-manual/system-requirements.html#required-git-tar-python-make-and-gcc-versions
>>> clearly states the minimal supported Python version is 3.8.0 so maybe we
>>> should just stop building the docs on those distros that are still on
>>> old Python? I'm actually surprised building YP on AlmaLinux 8 works
>>> then, is it because of uninative?
>>
>> We still support 3.6 on Kirkstone. The docs build uses a buildtools tarball to
>
> I see, so the patch should be merged at least for the branches which do
> still support 3.6. For the others, not necessarily. The script isn't
> that big and is not that complex (in terms of Python code, the logic....
> is another story :) ) so maybe it's fine. Your decision as maintainer.
> The diff looks sound to me (and I used it for building on openSUSE
> within containers), so I guess:
Unfortunately I think it's not that simple - the autobuilder
checks out the set_versions.py script from master for every branch it builds
(see the run-docs-build script on the yocto-autobuilder-helper repo).
I think merging this for every branch is fine though.
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
> Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # openSUSE Leap
> 15.4-15.6
Thank you!
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2024-12-19 8:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 10:35 [yocto-docs PATCH] set_versions.py: use backward-compatible python argument in run Antonin Godard
2024-12-17 11:05 ` [docs] " Quentin Schulz
2024-12-18 8:19 ` Antonin Godard
2024-12-18 13:39 ` Quentin Schulz
2024-12-19 8:19 ` Antonin Godard [this message]
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=D6FJ3QKY56CY.2M1SWSRBEEP8A@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=quentin.schulz@cherry.de \
--cc=thomas.petazzoni@bootlin.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