Skip to content

Commit 4c50ef3

Browse files
committed
Tidy up debug code
1 parent f8eb10a commit 4c50ef3

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Lib/test/test_monitoring.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ def check_branches(self, run_func, test_func=None, tool=TEST_TOOL, recorders=BRA
17061706
rights.add((src, right))
17071707
print(event_list)
17081708
for event in event_list:
1709-
way, name, src, dest = event
1709+
way, _, src, dest = event
17101710
if "left" in way:
17111711
self.assertIn((src, dest), lefts)
17121712
else:
@@ -1782,7 +1782,6 @@ def func():
17821782
except StopIteration:
17831783
pass
17841784

1785-
print(list(foo.__code__.co_branches()))
17861785
self.check_branches(func, foo)
17871786

17881787

Python/assemble.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ resolve_jump_offsets(instr_sequence *instrs)
675675
instruction *target = &instrs->s_instrs[instr->i_target];
676676
instr->i_oparg = target->i_offset;
677677
if (instr->i_opcode == END_ASYNC_FOR) {
678-
// Adjust the offset so that target is the END_SEND
678+
// Monitoring needs the target to be the END_SEND
679679
instr->i_oparg = offset - instr->i_oparg - END_SEND_OFFSET;
680680
}
681681
else if (instr->i_oparg < offset) {

Python/instruction_sequence.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ typedef _Py_SourceLocation location;
2929

3030
#define RETURN_IF_ERROR(X) \
3131
if ((X) == -1) { \
32-
assert(PyErr_Occurred()); \
3332
return ERROR; \
3433
}
3534

0 commit comments

Comments
 (0)