Skip to content

Commit 9a5de28

Browse files
authored
Align _opcode_metadata.py to 3.14.3 (#7456)
* Align `_opcode_metadata.py` to 3.14.3 * Unmark passing test * Ensure python 3.14 runs on CI * Update banner * Fix `test__opcode.py` * Adjust generate script * Fix docs
1 parent 3148024 commit 9a5de28

File tree

7 files changed

+445
-211
lines changed

7 files changed

+445
-211
lines changed

.github/workflows/pr-format.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ concurrency:
1313
group: format-check-${{ github.event.pull_request.number }}
1414
cancel-in-progress: true
1515

16+
env:
17+
PYTHON_VERSION: "3.14.3"
18+
1619
jobs:
1720
format_check:
1821
permissions:
@@ -45,6 +48,10 @@ jobs:
4548
- name: Run ruff check import sorting
4649
run: ruff check --select I --fix
4750

51+
- uses: actions/setup-python@v6.2.0
52+
with:
53+
python-version: ${{ env.PYTHON_VERSION }}
54+
4855
- name: Run generate_opcode_metadata.py
4956
run: python scripts/generate_opcode_metadata.py
5057

Lib/_opcode_metadata.py

Lines changed: 213 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/test/test__opcode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def test_is_valid(self):
3838
opcodes = [dis.opmap[opname] for opname in names]
3939
self.check_bool_function_result(_opcode.is_valid, opcodes, True)
4040

41-
@unittest.expectedFailure # TODO: RUSTPYTHON; KeyError: 'BINARY_OP_ADD_INT'
4241
def test_opmaps(self):
4342
def check_roundtrip(name, map):
4443
return self.assertEqual(opcode.opname[map[name]], name)
@@ -116,7 +115,6 @@ def test_stack_effect_jump(self):
116115

117116

118117
class SpecializationStatsTests(unittest.TestCase):
119-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 'load_attr' not found in []
120118
def test_specialization_stats(self):
121119
stat_names = ["success", "failure", "hit", "deferred", "miss", "deopt"]
122120
specialized_opcodes = [

Lib/test/test_dis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ def test_opname(self):
10051005
def test_boundaries(self):
10061006
self.assertEqual(dis.opmap["EXTENDED_ARG"], dis.EXTENDED_ARG)
10071007

1008-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 29 not less than or equal to 20
10091008
def test_widths(self):
10101009
long_opcodes = set(['JUMP_BACKWARD_NO_INTERRUPT',
10111010
'LOAD_FAST_BORROW_LOAD_FAST_BORROW',

0 commit comments

Comments
 (0)