lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd14726f-c33d-43d0-a023-d844c1fc1e4e@linaro.org>
Date: Tue, 1 Oct 2024 13:52:06 +0100
From: James Clark <james.clark@...aro.org>
To: Ian Rogers <irogers@...gle.com>, Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 Kan Liang <kan.liang@...ux.intel.com>, Xu Yang <xu.yang_2@....com>,
 Andi Kleen <ak@...ux.intel.com>, Zixian Cai <fzczx123@...il.com>,
 Paran Lee <p4ranlee@...il.com>, Ben Gainey <ben.gainey@....com>,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] perf python: Remove python 2 scripting support



On 18/09/2024 11:54 pm, Ian Rogers wrote:
> Python2 was deprecated 4 years ago, remove support and workarounds.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>   .../scripts/python/Perf-Trace-Util/Context.c  | 18 -----
>   tools/perf/util/python.c                      | 73 +++----------------
>   .../scripting-engines/trace-event-python.c    | 63 +---------------
>   3 files changed, 15 insertions(+), 139 deletions(-)
> 
> diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Context.c b/tools/perf/scripts/python/Perf-Trace-Util/Context.c
> index 3954bd1587ce..6d1c6be1d918 100644
> --- a/tools/perf/scripts/python/Perf-Trace-Util/Context.c
> +++ b/tools/perf/scripts/python/Perf-Trace-Util/Context.c
> @@ -23,16 +23,6 @@
>   #include "../../../util/srcline.h"
>   #include "../../../util/srccode.h"
>   
> -#if PY_MAJOR_VERSION < 3
> -#define _PyCapsule_GetPointer(arg1, arg2) \
> -  PyCObject_AsVoidPtr(arg1)
> -#define _PyBytes_FromStringAndSize(arg1, arg2) \
> -  PyString_FromStringAndSize((arg1), (arg2))
> -#define _PyUnicode_AsUTF8(arg) \
> -  PyString_AsString(arg)
> -

If we know the workarounds were required should we add an error to 
prevent hard to debug build issues?

   #if PY_MAJOR_VERSION < 3
     #error "Python 2 not supported"
   #endif

Or maybe something in the top level makefile?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ