[Python-checkins] gh-107082: Remove debug hack from get_first_executor in test_capi.test_misc (#107085)

gvanrossum webhook-mailer at python.org
Sat Jul 22 21:22:37 EDT 2023


https://github.com/python/cpython/commit/7fc9be350af055538e70ece8d7de78414bad431e
commit: 7fc9be350af055538e70ece8d7de78414bad431e
branch: main
author: Guido van Rossum <guido at python.org>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2023-07-22T18:22:33-07:00
summary:

gh-107082: Remove debug hack from get_first_executor in test_capi.test_misc (#107085)

(Even though it doesn't look like it fixes gh-107082 -- see discussion there -- it still removes debug code that should never have been committed.)

files:
M Lib/test/test_capi/test_misc.py

diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py
index dc155cc99961c..0d3f93941e820 100644
--- a/Lib/test/test_capi/test_misc.py
+++ b/Lib/test/test_capi/test_misc.py
@@ -2436,7 +2436,7 @@ def get_first_executor(func):
     co_code = code.co_code
     JUMP_BACKWARD = opcode.opmap["JUMP_BACKWARD"]
     for i in range(0, len(co_code), 2):
-        if co_code[i] == JUMP_BACKWARD or 1:
+        if co_code[i] == JUMP_BACKWARD:
             try:
                 return _testinternalcapi.get_executor(code, i)
             except ValueError:



More information about the Python-checkins mailing list