Mesa (staging/21.3): util/u_trace: Replace Flag with IntEnum to support python3.5

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 7 21:49:51 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 12b73bce39f4e7872024dd4c8ed0045a35ca59d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12b73bce39f4e7872024dd4c8ed0045a35ca59d6

Author: Kostiantyn Lazukin <kostiantyn.lazukin at globallogic.com>
Date:   Wed Nov  3 13:23:52 2021 +0200

util/u_trace: Replace Flag with IntEnum to support python3.5

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5586

Fixes: cefaa73909718e570b36c5f8463e4b534e96201a

Signed-off-by: Kostiantyn Lazukin <kostiantyn.lazukin at globallogic.com>

Reviewed-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13643>
(cherry picked from commit 78b613db23c10dc257247d99d8b2b1ef6c96bebb)

---

 .pick_status.json        | 2 +-
 src/util/perf/u_trace.py | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4cbdc56b70c..7efaa4a4fba 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -49,7 +49,7 @@
         "description": "util/u_trace: Replace Flag with IntEnum to support python3.5",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "cefaa73909718e570b36c5f8463e4b534e96201a"
     },
diff --git a/src/util/perf/u_trace.py b/src/util/perf/u_trace.py
index d0d99c828ee..24d1ddce85d 100644
--- a/src/util/perf/u_trace.py
+++ b/src/util/perf/u_trace.py
@@ -23,7 +23,7 @@
 
 from mako.template import Template
 from collections import namedtuple
-from enum import Flag, auto
+from enum import IntEnum
 import os
 
 TRACEPOINTS = {}
@@ -101,9 +101,9 @@ class TracepointArg(object):
 
 HEADERS = []
 
-class HeaderScope(Flag):
-   HEADER = auto()
-   SOURCE = auto()
+class HeaderScope(IntEnum):
+   HEADER = (1 << 0)
+   SOURCE = (1 << 1)
 
 class Header(object):
     """Class that represents a header file dependency of generated tracepoints



More information about the mesa-commit mailing list