Skip to content

Commit da518ed

Browse files
committed
Python: CG trace: Remove Python 3.8 only f"{var=}" usage
1 parent bb4b8dc commit da518ed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

python/tools/recorded-call-graph-metrics/src/cg_trace/bytecode_reconstructor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def expr_that_added_elem_to_stack(
155155
immediately. (since correctly process the bytecode when faced with jumps is not as
156156
straight forward).
157157
"""
158-
LOGGER.debug(f"find_inst_that_added_elem_to_stack {start_index=} {stack_pos=}")
158+
LOGGER.debug(
159+
f"find_inst_that_added_elem_to_stack start_index={start_index} stack_pos={stack_pos}"
160+
)
159161
assert stack_pos >= 0
160162
for inst in reversed(instructions[: start_index + 1]):
161163
# Return immediately if faced with a jump
@@ -179,7 +181,7 @@ def expr_that_added_elem_to_stack(
179181
def expr_from_instruction(instructions: List[Instruction], index: int) -> BytecodeExpr:
180182
inst = instructions[index]
181183

182-
LOGGER.debug(f"expr_from_instruction: {inst} {index=}")
184+
LOGGER.debug(f"expr_from_instruction: {inst} index={index}")
183185

184186
if inst.opname in ["LOAD_GLOBAL", "LOAD_FAST", "LOAD_NAME", "LOAD_DEREF"]:
185187
return BytecodeVariableName(inst.argval)

python/tools/recorded-call-graph-metrics/src/cg_trace/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def profilefunc(self, frame: FrameType, event: str, arg):
192192
if event not in ["call", "c_call"]:
193193
return
194194

195-
LOGGER.debug(f"profilefunc {event=}")
195+
LOGGER.debug(f"profilefunc event={event}")
196196
if event == "call":
197197
# in call, the `frame` argument is new the frame for entering the callee
198198
assert frame.f_back is not None

0 commit comments

Comments
 (0)