Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bytecode parity - slice augassign, async comp inline
- Augmented assignment with two-part slices uses BINARY_SLICE/STORE_SLICE
- Inline async comprehensions (remove await/async guards)
- Inlined comprehension cleanup jump uses JumpNoInterrupt
- Class firstlineno uses first decorator line when decorated
- Recurse into nested functions for static attribute collection
- Fold unary positive complex constants (+0.0j)
- Add deoptimize_borrow_for_folded_nonliteral_exprs pass
- Add inline_single_predecessor_artificial_expr_exit_blocks pass
- Skip shared artificial expr-stmt exit blocks in small-block inlining
- Mark folded boolop tail as folded_from_nonliteral_expr
  • Loading branch information
youknowone committed Apr 20, 2026
commit f4674b6d9de0f22d9dd6bdfd37466ffaa2158347
2 changes: 0 additions & 2 deletions Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,6 @@ def foo():
with self.assertRaisesRegex(SystemError, msg):
foo()

# TODO: RUSTPYTHON
@unittest.expectedFailure
# @requires_debug_ranges()
def test_co_positions_artificial_instructions(self):
import dis
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,6 @@ class C:
dis.dis(code)
self.assertNotIn('NOP', output.getvalue())

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: unable to find constant -0.0 in (0.0,)
def test_dont_merge_constants(self):
# Issue #25843: compile() must not merge constants which are equal
# but have a different type.
Expand Down Expand Up @@ -1193,7 +1192,6 @@ def call():
line1 = call.__code__.co_firstlineno + 1
assert line1 not in [line for (_, _, line) in call.__code__.co_lines()]

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_lineno_after_implicit_return(self):
TRUE = True
# Don't use constant True or False, as compiler will remove test
Expand Down Expand Up @@ -2495,7 +2493,6 @@ def f(self):
self.assertIsInstance(C.__static_attributes__, tuple)
self.assertEqual(sorted(C.__static_attributes__), ['a', 'b'])

@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: type object 'C' has no attribute '__static_attributes__'
def test_nested_function(self):
class C:
def f(self):
Expand Down Expand Up @@ -2579,7 +2576,6 @@ def test_binop(self):
def test_list(self):
self.check_stack_size("[" + "x, " * self.N + "x]")

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 101 not less than or equal to 6
def test_tuple(self):
self.check_stack_size("(" + "x, " * self.N + "x)")

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ def test_nested_class_definition(self):
self.assertSourceEqual(mod2.cls183, 183, 188)
self.assertSourceEqual(mod2.cls183.cls185, 185, 188)

@unittest.expectedFailure # TODO: RUSTPYTHON; pass
def test_class_decorator(self):
self.assertSourceEqual(mod2.cls196, 194, 201)
self.assertSourceEqual(mod2.cls196.cls200, 198, 201)
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_peepholer.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def crater():
],)
self.check_lnotab(crater)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_constant_folding_lists_of_constants(self):
for line, elem in (
# in/not in constants with BUILD_LIST should be folded to a tuple:
Expand All @@ -214,7 +213,6 @@ def test_constant_folding_lists_of_constants(self):
self.assertNotInBytecode(code, 'BUILD_LIST')
self.check_lnotab(code)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_constant_folding_sets_of_constants(self):
for line, elem in (
# in/not in constants with BUILD_SET should be folded to a frozenset:
Expand Down Expand Up @@ -634,7 +632,6 @@ def g()->1+1:
self.assertNotInBytecode(f, 'BINARY_OP')
self.check_lnotab(f)

@unittest.expectedFailure # TODO: RUSTPYTHON; no BUILD_LIST to BUILD_TUPLE optimization
def test_in_literal_list(self):
def containtest():
return x in [a, b]
Expand Down
Loading
Loading