Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .cspell.dict/rustpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pyast
pyattr
pyclass
pyclassmethod
pycode
pyexception
pyfunction
pygetset
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,8 @@ jobs:
with:
repository: python/cpython
path: cpython
# RustPython still uses the 3.14 bytecode format; this source is only
# for opcode metadata, independent of the 3.15 runtime target.
ref: "v3.14.7"
# Exact final source shared by all opcode metadata checks.
ref: "d220409a13b77de7a6c30abe16ea90db01528edc" # v3.15.0
persist-credentials: false

- name: prek run (manual stage)
Expand Down
21 changes: 16 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,36 @@ repos:
- id: generate-rs-opcode-metadata
name: generate rust opcode metadata
entry: python3 tools/opcode_metadata/generate_rs_opcode_metadata.py
files: '^(crates/compiler-core/src/bytecode/instruction\.rs|tools/opcode_metadata/*)$'
files: '^(crates/compiler-core/src/bytecode/(instruction|opcode_metadata)\.rs|tools/opcode_metadata/.*)$'
pass_filenames: false
language: system
require_serial: true
priority: 1 # so rustfmt runs first
stages:
- manual

- id: generate-py-opcode-metadata
name: generate python opcode metadata
entry: python3 tools/opcode_metadata/generate_py_opcode_metadata.py
files: '^(crates/compiler-core/src/bytecode/instruction\.rs|tools/opcode_metadata/*)$'
- id: verify-py-opcode-metadata
name: verify canonical python opcode metadata
entry: python3 tools/opcode_metadata/verify_py_opcode_metadata.py
files: '^(Lib/(opcode|_opcode_metadata|dis)\.py|tools/opcode_metadata/.*)$'
pass_filenames: false
language: system
require_serial: true
priority: 1 # so rustfmt runs first
stages:
- manual

- id: check-public-opcode-metadata
name: check public opcode metadata
entry: python3 tools/opcode_metadata/generate_public_metadata.py --check
files: '^(crates/compiler-core/src/bytecode/public_metadata\.rs|tools/opcode_metadata/.*)$'
pass_filenames: false
language: system
require_serial: true
priority: 1
stages:
- manual

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v10.2.0
hooks:
Expand Down
Loading
Loading