From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Ian Rogers <irogers@google.com>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1] perf python: Fix ilist TreeNode string type drift
Date: Sat, 12 Sep 2026 17:19:52 -0300 [thread overview]
Message-ID: <aqWz6HTIzoMmnLP-@x2> (raw)
In-Reply-To: <20260910175151.A0C8F1F000FF@smtp.kernel.org>
On Thu, Sep 10, 2026 at 05:51:51PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The use of PEP 604 union type syntax `int | float` in function parameters breaks runtime compatibility with Python 3.9.
> --
Waiting for v2,
- Arnaldo
> commit 79e3c05b8663765b4c4ea91366e2819e32834d75
> Author: Ian Rogers <irogers@google.com>
> Subject: perf python: Fix ilist TreeNode string type drift
>
> This commit updates Tree type hints across the perf python ilist module to
> prevent mypy strictness mismatches. It also addresses minor stylistic issues
> reported by mypy, pylint, and Sashiko.
>
> > diff --git a/tools/perf/python/ilist.py b/tools/perf/python/ilist.py
> > --- a/tools/perf/python/ilist.py
> > +++ b/tools/perf/python/ilist.py
> [ ... ]
> > @@ -343,31 +343,34 @@ class IListApp(App):
> > if not self.selected or not self.evlist:
> > return
> >
> > - def update_count(cpu: int, count: int):
> > + def update_count(cpu: int, count: int | float):
>
> [Severity: Medium]
> Does this new type hint syntax break compatibility with Python 3.9?
>
> Evaluating the PEP 604 union type syntax int | float as a function parameter
> annotation in Python 3.9 (without from __future__ import annotations) raises
> a TypeError at runtime.
>
> Since Python 3.9 is the minimum supported version for kernel auxiliary
> scripts, this will crash the perf userspace tool immediately on startup when
> IListApp.on_mount() calls update_counts(), which defines the update_count
> inner function.
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260910174420.3002597-1-irogers@google.com?part=1
next prev parent reply other threads:[~2026-09-12 20:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 17:44 [PATCH v1] perf python: Fix ilist TreeNode string type drift Ian Rogers
2026-09-10 17:51 ` sashiko-bot
2026-09-12 20:19 ` Arnaldo Carvalho de Melo [this message]
2026-09-13 4:33 ` Ian Rogers
2026-09-10 21:15 ` [PATCH v2] " Ian Rogers
2026-09-10 21:18 ` sashiko-bot
2026-09-13 21:40 ` Arnaldo Carvalho de Melo
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=aqWz6HTIzoMmnLP-@x2 \
--to=acme@kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.