summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_monitoring.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-01-23 09:26:25 (GMT)
committerGitHub <noreply@github.com>2025-01-23 09:26:25 (GMT)
commita10f99375e7912df863cf101a38e9703cfcd72f1 (patch)
tree7909c7896fe256427c1149d2416fb7912ad3ba48 /Lib/test/test_monitoring.py
parentd7d066c3ab6842117f9e0fb1c9dde4bce00fa1e3 (diff)
downloadcpython-a10f99375e7912df863cf101a38e9703cfcd72f1.zip
cpython-a10f99375e7912df863cf101a38e9703cfcd72f1.tar.gz
cpython-a10f99375e7912df863cf101a38e9703cfcd72f1.tar.bz2
Revert "GH-128914: Remove conditional stack effects from `bytecodes.c` and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build. This reverts commit ab61d3f4303d14a413bc9ae6557c730ffdf7579e.
Diffstat (limited to 'Lib/test/test_monitoring.py')
-rw-r--r--Lib/test/test_monitoring.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/test/test_monitoring.py b/Lib/test/test_monitoring.py
index 7ac2910..364381e 100644
--- a/Lib/test/test_monitoring.py
+++ b/Lib/test/test_monitoring.py
@@ -1588,11 +1588,11 @@ class TestBranchAndJumpEvents(CheckEvents):
('branch right', 'whilefunc', 1, 3)])
self.check_events(func, recorders = BRANCH_OFFSET_RECORDERS, expected = [
- ('branch left', 'func', 30, 34),
- ('branch right', 'func', 46, 60),
- ('branch left', 'func', 30, 34),
- ('branch left', 'func', 46, 52),
- ('branch right', 'func', 30, 72)])
+ ('branch left', 'func', 28, 32),
+ ('branch right', 'func', 44, 58),
+ ('branch left', 'func', 28, 32),
+ ('branch left', 'func', 44, 50),
+ ('branch right', 'func', 28, 70)])
def test_except_star(self):
@@ -1762,8 +1762,7 @@ class TestLoadSuperAttr(CheckEvents):
return self._exec(co)
def _has_load_super_attr(self, co):
- has = any(instr.opname in ("LOAD_SUPER_ATTR", "LOAD_SUPER_METHOD")
- for instr in dis.get_instructions(co))
+ has = any(instr.opname == "LOAD_SUPER_ATTR" for instr in dis.get_instructions(co))
if not has:
has = any(
isinstance(c, types.CodeType) and self._has_load_super_attr(c)