All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: TAKANO Mitsuhiro <takano32@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf build: Replace the deprecated FileType with a helper
Date: Wed, 25 Nov 2026 11:23:44 -0800	[thread overview]
Message-ID: <awc1wOQYO14k1R6j@google.com> (raw)
In-Reply-To: <20261125173315.2359128-1-takano32@gmail.com>


On Wed, Nov 25, 2026 at 05:33:15PM +0000, TAKANO Mitsuhiro wrote:
> pylint-tests and pylint-pmu-events hang off `all`, so with a pylint that
> reports W4904 the build fails on a tree nobody has changed.  Measured on
> 7.4-rc4 with Python 3.14.9 and pylint 4.0.5, both targets exit 2 and
> pylint reports:
> 
>   - W4904 deprecated-class, argparse.FileType: pmu-events/jevents.py:1494
>     and :1496, tests/shell/lib/perf_json_output_lint.py:23
> 
> FileType is deprecated in the class's own terms - the docstring in 3.14
> reads "Deprecated factory for creating file object types" - so the two
> jevents call sites and the one in the JSON output linter are replaced by
> a helper that opens the file, or hands back stdout or stdin for '-',
> which is what FileType did.  The reader names its encoding, as the rest
> of the Python in perf does.
> 
> Verification: pylint-tests and pylint-pmu-events exit 2 and 2 before this
> change and 0 and 0 after it.  The generated pmu-events tables are byte
> identical either side of the change, checked by running jevents.py for
> arm64 and x86 over the same input tree and comparing pmu-events.c and
> pmu-events-string.c.
> 
> Written with Hermes Agent, an LLM assistant; the author reviewed it and
> ran the build and the generator as described.
> 

I think we have a pending patch already.

https://lore.kernel.org/r/20261115003507.1872482-1-lalitmaganti@gmail.com

Thanks,
Namhyung


  parent reply	other threads:[~2026-11-25 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 17:33 [PATCH] perf build: Replace the deprecated FileType with a helper TAKANO Mitsuhiro
2026-11-25 17:36 ` sashiko-bot
2026-11-25 19:23 ` Namhyung Kim [this message]
2026-11-26 10:19   ` TAKANO Mitsuhiro

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=awc1wOQYO14k1R6j@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=takano32@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 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.