* [PATCH] blktrace: ask for python3 specifically
@ 2022-11-03 18:33 Sakib Sajal
2022-11-03 19:00 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 12+ messages in thread
From: Sakib Sajal @ 2022-11-03 18:33 UTC (permalink / raw)
To: openembedded-core
python2 has been deprecated, use python3 instead
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
...plot.py-ask-for-python3-specifically.patch | 35 +++++++++++++++++++
meta/recipes-kernel/blktrace/blktrace_git.bb | 5 ++-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-kernel/blktrace/blktrace/0001-bno_plot.py-btt_plot.py-ask-for-python3-specifically.patch
diff --git a/meta/recipes-kernel/blktrace/blktrace/0001-bno_plot.py-btt_plot.py-ask-for-python3-specifically.patch b/meta/recipes-kernel/blktrace/blktrace/0001-bno_plot.py-btt_plot.py-ask-for-python3-specifically.patch
new file mode 100644
index 0000000000..42412678f7
--- /dev/null
+++ b/meta/recipes-kernel/blktrace/blktrace/0001-bno_plot.py-btt_plot.py-ask-for-python3-specifically.patch
@@ -0,0 +1,35 @@
+From c6776fb9c990830357e71a0e75805e7ce25877cc Mon Sep 17 00:00:00 2001
+From: Sakib Sajal <sakib.sajal@windriver.com>
+Date: Thu, 3 Nov 2022 12:29:59 -0400
+Subject: [PATCH] bno_plot.py, btt_plot.py: ask for python3 specifically
+
+python2 has been deprecated, use python3 instead
+
+Upstream-Status: Inappropriate (OE-specific)
+
+Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
+---
+ btt/bno_plot.py | 2 +-
+ btt/btt_plot.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/btt/bno_plot.py b/btt/bno_plot.py
+index 3aa4e19..d7d7159 100644
+--- a/btt/bno_plot.py
++++ b/btt/bno_plot.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ #
+ # btt blkno plotting interface
+ #
+diff --git a/btt/btt_plot.py b/btt/btt_plot.py
+index 40bc71f..8620d31 100755
+--- a/btt/btt_plot.py
++++ b/btt/btt_plot.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ #
+ # btt_plot.py: Generate matplotlib plots for BTT generate data files
+ #
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb
index bba5e04504..c278e066c7 100644
--- a/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -9,12 +9,15 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "libaio"
+RDEPENDS:${PN} = "python3"
SRCREV = "366d30b9cdb20345c5d064af850d686da79b89eb"
PV = "1.3.0+git${SRCPV}"
-SRC_URI = "git://git.kernel.dk/blktrace.git;branch=master"
+SRC_URI = "git://git.kernel.dk/blktrace.git;branch=master \
+ file://0001-bno_plot.py-btt_plot.py-ask-for-python3-specifically.patch \
+ "
S = "${WORKDIR}/git"
--
2.33.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-03 18:33 [PATCH] blktrace: ask for python3 specifically Sakib Sajal
@ 2022-11-03 19:00 ` Alexander Kanavin
2022-11-16 22:01 ` Sajal, Sakib
0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2022-11-03 19:00 UTC (permalink / raw)
To: Sakib Sajal; +Cc: openembedded-core
On Thu, 3 Nov 2022 at 19:34, Sakib Sajal <sakib.sajal@windriver.com> wrote:
>
> python2 has been deprecated, use python3 instead
>
> +Upstream-Status: Inappropriate (OE-specific)
This is not inappropriate, or oe-specific, please send the patch upstream first.
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-03 19:00 ` [OE-core] " Alexander Kanavin
@ 2022-11-16 22:01 ` Sajal, Sakib
2022-11-17 7:43 ` Alexander Kanavin
0 siblings, 1 reply; 12+ messages in thread
From: Sajal, Sakib @ 2022-11-16 22:01 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core@lists.openembedded.org
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
________________________________
From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: November 3, 2022 3:00 PM
To: Sajal, Sakib <Sakib.Sajal@windriver.com>
Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
On Thu, 3 Nov 2022 at 19:34, Sakib Sajal <sakib.sajal@windriver.com> wrote:
>>
>> python2 has been deprecated, use python3 instead
>>
>> +Upstream-Status: Inappropriate (OE-specific)
>
>This is not inappropriate, or oe-specific, please send the patch upstream first.
>
>Alex
I have already sent a patch to upstream blktrace which was rejected:
https://www.spinics.net/lists/linux-btrace/msg01364.html
In summary, upstream maintainers see the following on their distro:
axboe@m1max ~> which python
/usr/bin/python
axboe@m1max ~> /usr/bin/python --version
Python 3.10.7
axboe@m1max ~> env python
Python 3.10.7 (main, Sep 8 2022, 14:34:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
while on yocto:
root@qemux86-64:~# which python
root@qemux86-64:~# which python3
/usr/bin/python3
root@qemux86-64:~# /usr/bin/python3 --version
Python 3.11.0
root@qemux86-64:~# env python
env: can't execute 'python': No such file or directory
root@qemux86-64:~# env python3
Python 3.11.0 (main, Oct 24 2022, 17:48:40) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
python symlink to python3 is not required by python development community and is a choice left for distributions to make. If you look at oe-core, most, if not all, packages are changing the shebang to python3:
oe-core.git$ grep -r "env python3" | wc -l
166
Regards,
Sakib
Re: [PATCH] bno_plot.py: Ask for python3 specifically — Linux Btrace<https://www.spinics.net/lists/linux-btrace/msg01364.html>
Linux Btrace: Re: [PATCH] bno_plot.py: Ask for python3 specifically
www.spinics.net
[-- Attachment #2: Type: text/html, Size: 8089 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-16 22:01 ` Sajal, Sakib
@ 2022-11-17 7:43 ` Alexander Kanavin
2022-11-17 14:49 ` Markus Volk
0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2022-11-17 7:43 UTC (permalink / raw)
To: Sajal, Sakib; +Cc: openembedded-core@lists.openembedded.org
[-- Attachment #1: Type: text/plain, Size: 2502 bytes --]
Yes, they kinda have a point. Referring to latest python as python3 forever
is silly. Unfortunately we have all those users with legacy proprietary
python2 things, and they feel like they still 'own' python (without a
number).
I'd suggest you resend the patch with 'Upstream-Status: Denied [link to
upstream response]'.
Alex
On Wed, 16 Nov 2022 at 23:01, Sajal, Sakib <Sakib.Sajal@windriver.com>
wrote:
>
>
> ------------------------------
> *From:* Alexander Kanavin <alex.kanavin@gmail.com>
> *Sent:* November 3, 2022 3:00 PM
> *To:* Sajal, Sakib <Sakib.Sajal@windriver.com>
> *Cc:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org>
> *Subject:* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
>
>
> On Thu, 3 Nov 2022 at 19:34, Sakib Sajal <sakib.sajal@windriver.com>
> wrote:
> >>
> >> python2 has been deprecated, use python3 instead
> >>
> >> +Upstream-Status: Inappropriate (OE-specific)
> >
> >This is not inappropriate, or oe-specific, please send the patch upstream
> first.
> >
> >Alex
>
> I have already sent a patch to upstream blktrace which was rejected:
> https://www.spinics.net/lists/linux-btrace/msg01364.html
>
> In summary, upstream maintainers see the following on their distro:
>
> axboe@m1max ~> which python
> /usr/bin/python
> axboe@m1max ~> /usr/bin/python --version
> Python 3.10.7
> axboe@m1max ~> env python
> Python 3.10.7 (main, Sep 8 2022, 14:34:29) [GCC 12.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >*>>*
>
> while on yocto:
> root@qemux86-64:~# which python
> root@qemux86-64:~# which python3
> /usr/bin/python3
> root@qemux86-64:~# /usr/bin/python3 --version
> Python 3.11.0
> root@qemux86-64:~# env python
> env: can't execute 'python': No such file or directory
> root@qemux86-64:~# env python3
> Python 3.11.0 (main, Oct 24 2022, 17:48:40) [GCC 12.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
>
> python symlink to python3 is not required by python development community
> and is a choice left for distributions to make. If you look at oe-core,
> most, if not all, packages are changing the shebang to python3:
> oe-core.git$ grep -r "env python3" | wc -l
> 166
>
> Regards,
> Sakib
> Re: [PATCH] bno_plot.py: Ask for python3 specifically — Linux Btrace
> <https://www.spinics.net/lists/linux-btrace/msg01364.html>
> Linux Btrace: Re: [PATCH] bno_plot.py: Ask for python3 specifically
> www.spinics.net
>
>
[-- Attachment #2: Type: text/html, Size: 7638 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-17 7:43 ` Alexander Kanavin
@ 2022-11-17 14:49 ` Markus Volk
2022-11-17 15:49 ` Alexander Kanavin
0 siblings, 1 reply; 12+ messages in thread
From: Markus Volk @ 2022-11-17 14:49 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sajal, Sakib, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Am Do, 17. Nov 2022 um 08:43:15 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> Yes, they kinda have a point. Referring to latest python as python3
> forever is silly. Unfortunately we have all those users with legacy
> proprietary python2 things, and they feel like they still 'own'
> python (without a number).
To avoid patching dozens of scripts, i use this bbappend for python3
until the time comes to make it the default:
do_install:append:class-target() {
ln -sf ${bindir}/python3 ${D}${bindir}/python
}
FILES:${PN}:class-target += "${bindir}/python"
[-- Attachment #2: Type: text/html, Size: 826 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-17 14:49 ` Markus Volk
@ 2022-11-17 15:49 ` Alexander Kanavin
2022-11-17 16:09 ` Markus Volk
2022-11-18 12:20 ` Markus Volk
0 siblings, 2 replies; 12+ messages in thread
From: Alexander Kanavin @ 2022-11-17 15:49 UTC (permalink / raw)
To: Markus Volk; +Cc: Sajal, Sakib, openembedded-core
I am tempted to turn this into a patch :-) But imagine all the
complaints this is going to receive. You won't be able to tell people
that this is good for the future: their stuff worked and now it
doesn't is all they care about.
Alex
On Thu, 17 Nov 2022 at 15:49, Markus Volk <f_l_k@t-online.de> wrote:
>
> Am Do, 17. Nov 2022 um 08:43:15 +0100 schrieb Alexander Kanavin <alex.kanavin@gmail.com>:
>
> Yes, they kinda have a point. Referring to latest python as python3 forever is silly. Unfortunately we have all those users with legacy proprietary python2 things, and they feel like they still 'own' python (without a number).
>
>
> To avoid patching dozens of scripts, i use this bbappend for python3 until the time comes to make it the default:
>
>
> do_install:append:class-target() {
> ln -sf ${bindir}/python3 ${D}${bindir}/python
> }
>
> FILES:${PN}:class-target += "${bindir}/python"
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-17 15:49 ` Alexander Kanavin
@ 2022-11-17 16:09 ` Markus Volk
2022-11-18 12:20 ` Markus Volk
1 sibling, 0 replies; 12+ messages in thread
From: Markus Volk @ 2022-11-17 16:09 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sajal, Sakib, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
Am Do, 17. Nov 2022 um 16:49:01 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> But imagine all the
> complaints this is going to receive.
I also did not dare to create this patch
[-- Attachment #2: Type: text/html, Size: 360 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-17 15:49 ` Alexander Kanavin
2022-11-17 16:09 ` Markus Volk
@ 2022-11-18 12:20 ` Markus Volk
2022-11-18 12:36 ` Alexander Kanavin
1 sibling, 1 reply; 12+ messages in thread
From: Markus Volk @ 2022-11-18 12:20 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sajal, Sakib, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
Am Do, 17. Nov 2022 um 16:49:01 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> I am tempted to turn this into a patch :-) But imagine all the
> complaints this is going to receive.
Maybe it would be possible to use a DISTRO_FEATURE 'python2' and make
the creation of the python3 symlink dependent on it? This way users who
need python2 could restore the previous behavior and you still wouldn't
have to patch the scripts, which somehow feels wrong and would add a
lot of oe-specific patches.
[-- Attachment #2: Type: text/html, Size: 673 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-18 12:20 ` Markus Volk
@ 2022-11-18 12:36 ` Alexander Kanavin
2022-11-18 13:20 ` Markus Volk
0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2022-11-18 12:36 UTC (permalink / raw)
To: Markus Volk; +Cc: Sajal, Sakib, openembedded-core
On Fri, 18 Nov 2022 at 13:21, Markus Volk <f_l_k@t-online.de> wrote:
> I am tempted to turn this into a patch :-) But imagine all the complaints this is going to receive.
>
>
> Maybe it would be possible to use a DISTRO_FEATURE 'python2' and make the creation of the python3 symlink dependent on it? This way users who need python2 could restore the previous behavior and you still wouldn't have to patch the scripts, which somehow feels wrong and would add a lot of oe-specific patches.
I thought of it too. But consider this: it would require that any
script that refers to python (without a number) would be compatible
with both 2 and 3, or there would be cryptic failures. We can't
possibly make that promise.
I'd rather force everyone to patch their 2.x scripts to ask for
python2. Just worried about my nerve cells when people will come and
shout at me for daring to suggest that.
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-18 12:36 ` Alexander Kanavin
@ 2022-11-18 13:20 ` Markus Volk
2022-11-19 17:37 ` Alexander Kanavin
0 siblings, 1 reply; 12+ messages in thread
From: Markus Volk @ 2022-11-18 13:20 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sajal, Sakib, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Am Fr, 18. Nov 2022 um 13:36:17 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> I'd rather force everyone to patch their 2.x scripts to ask for
> python2.
Should anybody still promise Python2 support?
I know, reality is still different, but since it is meanwhile
unsupported, my idea would rather be to put the pressure on the
possibly still failing scripts to get them fixed for python3.
[-- Attachment #2: Type: text/html, Size: 609 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-18 13:20 ` Markus Volk
@ 2022-11-19 17:37 ` Alexander Kanavin
2022-11-20 17:55 ` Markus Volk
0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2022-11-19 17:37 UTC (permalink / raw)
To: Markus Volk; +Cc: Sajal, Sakib, openembedded-core
On Fri, 18 Nov 2022 at 14:21, Markus Volk <f_l_k@t-online.de> wrote:
> I'd rather force everyone to patch their 2.x scripts to ask for python2.
>
>
> Should anybody still promise Python2 support?
> I know, reality is still different, but since it is meanwhile unsupported, my idea would rather be to put the pressure on the possibly still failing scripts to get them fixed for python3.
Very well. Can you make a patch?
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH] blktrace: ask for python3 specifically
2022-11-19 17:37 ` Alexander Kanavin
@ 2022-11-20 17:55 ` Markus Volk
0 siblings, 0 replies; 12+ messages in thread
From: Markus Volk @ 2022-11-20 17:55 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sajal, Sakib, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
Am Sa, 19. Nov 2022 um 18:37:37 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> Very well. Can you make a patch?
I've sent a patch for this. It was tested with 'bitbake myimage -c
do_populate_sdk' only for x86_64. I guess this is arch independent
[-- Attachment #2: Type: text/html, Size: 429 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-11-20 17:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-03 18:33 [PATCH] blktrace: ask for python3 specifically Sakib Sajal
2022-11-03 19:00 ` [OE-core] " Alexander Kanavin
2022-11-16 22:01 ` Sajal, Sakib
2022-11-17 7:43 ` Alexander Kanavin
2022-11-17 14:49 ` Markus Volk
2022-11-17 15:49 ` Alexander Kanavin
2022-11-17 16:09 ` Markus Volk
2022-11-18 12:20 ` Markus Volk
2022-11-18 12:36 ` Alexander Kanavin
2022-11-18 13:20 ` Markus Volk
2022-11-19 17:37 ` Alexander Kanavin
2022-11-20 17:55 ` Markus Volk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox