Skip to content

Commit 7eca804

Browse files
committed
Add workaround to make tests work on Python 3.12
1 parent 59756a1 commit 7eca804

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/doctest/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,8 @@ def ensure_interruptible_after(seconds: float, max_wait_after_interrupt: float =
880880

881881
try:
882882
yield data
883-
except AlarmInterrupt:
883+
except AlarmInterrupt as e:
884+
e.__traceback__ = None # workaround for https://github.com/python/cpython/pull/129276
884885
alarm_raised = True
885886
finally:
886887
before_cancel_alarm_elapsed = walltime() - start_time

0 commit comments

Comments
 (0)