mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] perf build: Fix pylint build failures
@ 2026-09-30 13:11 Leo Yan
  2026-09-30 13:11 ` [PATCH v2 1/4] perf build: Build the Python extension before pylint consumers Leo Yan
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Leo Yan @ 2026-09-30 13:11 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Aishwarya TCV
  Cc: linux-perf-users, linux-kernel, Arnaldo Carvalho de Melo, Leo Yan

Recent changes to perf's Python module, including enabling pylint by
default, exposed build failures in our CI. For example:

  tests/shell/lib/perf_brstack_max.py:8:0: E0401: Unable to import 'perf' (import-error)

This series builds the perf Python extension before running pylint on
its consumers without delaying C builds. It also prepends the output
Python directory to PYTHONPATH for out-of-tree builds.

The series also mutes the optparse deprecation warning from older pylint
versions. Python has reversed this deprecation, and newer pylint
versions no longer report it.

A final patch renames an exception variable in the PostgreSQL exporter
to fix pylint warning.

Tested on an x86 Intel Xeon(R) w7-3465X (28 cores, 56 threads), the
average real build time over three runs was 20.104s for v1 and 18.998s
for v2, about 1.1s (5.5%) faster.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v2:
- Run pylint after the Python extension without delaying C builds
  (Sashiko).
- Fix the PostgreSQL warning.
- Link to v1: https://lore.kernel.org/r/20260930-perf_fix_pylint_errors-v1-0-f72151d8b255@arm.com

---
Leo Yan (4):
      perf build: Build the Python extension before pylint consumers
      perf build: Add the output Python directory to pylint's PYTHONPATH
      perf test: Suppress optparse deprecation warning with older pylint
      perf python: Avoid shadowing exception name in PostgreSQL exporter

 tools/perf/Build                          |  4 +++-
 tools/perf/Makefile.perf                  | 17 ++++++++++++++++-
 tools/perf/python/export-to-postgresql.py |  4 ++--
 tools/perf/tests/Build                    |  4 +++-
 tools/perf/tests/shell/lib/attr.py        |  3 ++-
 5 files changed, 26 insertions(+), 6 deletions(-)
---
base-commit: 45d15e89a783a0a279b7a54f9018c230127380d7
change-id: 20260930-perf_fix_pylint_errors-3cef583b1e47

Best regards,
-- 
Leo Yan <leo.yan@arm.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-30 17:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 13:11 [PATCH v2 0/4] perf build: Fix pylint build failures Leo Yan
2026-09-30 13:11 ` [PATCH v2 1/4] perf build: Build the Python extension before pylint consumers Leo Yan
2026-09-30 17:44   ` Ian Rogers
2026-09-30 13:11 ` [PATCH v2 2/4] perf build: Add the output Python directory to pylint's PYTHONPATH Leo Yan
2026-09-30 17:45   ` Ian Rogers
2026-09-30 13:11 ` [PATCH v2 3/4] perf test: Suppress optparse deprecation warning with older pylint Leo Yan
2026-09-30 17:39   ` Ian Rogers
2026-09-30 13:11 ` [PATCH v2 4/4] perf python: Avoid shadowing exception name in PostgreSQL exporter Leo Yan
2026-09-30 17:46   ` Ian Rogers
2026-09-30 17:52 ` [PATCH v2 0/4] perf build: Fix pylint build failures Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®