hybrid dis.py from CPython 3.13.10

This commit is contained in:
Jeong, YunWon authored and Jeong YunWon committed 2025-12-12 21:44:00 +09:00
1 parent d11604995a
commit 152d10bfea
4 files changed
+1054 -5

No files matched your search

Vendored
+1054
View File
File diff suppressed because it is too large. Load diff
-2
View File
@@ -27,7 +27,6 @@ class OpListTests(unittest.TestCase):
self.check_bool_function_result(_opcode.has_local, invalid, False)
self.check_bool_function_result(_opcode.has_exc, invalid, False)
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'opmap'
def test_is_valid(self):
names = [
'CACHE',
@@ -39,7 +38,6 @@ class OpListTests(unittest.TestCase):
opcodes = [dis.opmap[opname] for opname in names]
self.check_bool_function_result(_opcode.is_valid, opcodes, True)
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'hasarg'
def test_oplists(self):
def check_function(self, func, expected):
for op in [-10, 520]:
-2
View File
@@ -1070,8 +1070,6 @@ if 1:
elif instr.opname in HANDLED_JUMPS:
self.assertNotEqual(instr.arg, (line + 1)*INSTR_SIZE)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_no_wraparound_jump(self):
# See https://bugs.python.org/issue46724
-1
View File
@@ -1799,7 +1799,6 @@ print(f'''{{
self.assertIn(rb'\1', stdout)
self.assertEqual(len(stderr.strip().splitlines()), 2)
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'get_instructions'
def test_fstring_without_formatting_bytecode(self):
# f-string without any formatting should emit the same bytecode
# as a normal string. See gh-99606.