Commit Graph
16922 Commits
Author SHA1 Message Date
Jeong, YunWon 58ae87c00a Fix decompose_float subnormals, float format grouping/empty type; add HashSecret::from_keys (#8232)
* common: fix decompose_float for subnormal inputs

Subnormals carry a biased exponent of 0 and no implicit leading mantissa
bit, so the bit-twiddling frexp misread them: hash(5e-324) returned
8404992 instead of CPython's 16777216. Scale subnormals into the normal
range by 2**54 (exact) before decomposing and fold the shift back into
the returned exponent. Adds a frexp-contract unit test over normals,
subnormals, and boundary values.

Assisted-by: Claude

* common: add HashSecret::from_keys

HashSecret's fields are private and the only constructor derives k0/k1
from a u32 seed, so an embedder cannot reproduce a fixed keying (e.g. a
deterministic PYTHONHASHSEED=0-style run). Add a const constructor
taking explicit SipHash keys; the seeded path is unchanged.

Assisted-by: Claude

* common: fix float format grouping and empty presentation type

Thousands grouping split the magnitude only on '.', so exponent and
percent tails received separators (format(1e20, ',e') gave
'1e+,20'-class corruption). Group only the leading integer digits for
interval-3 output; hex/octal/binary keep whole-magnitude grouping.

Empty presentation type: with a precision, clamp it to at least 1 and
restore a trailing '.0' on integer-looking results (Py_DTSF_ADD_DOT_0);
without one, alternate form now inserts the forced decimal point before
an exponent instead of appending it.

Verified byte-identical to CPython 3.14 over a hash/format differential
battery; test_format, test_float, test_fstring, test_hash pass.

Assisted-by: Claude

* common: satisfy rustfmt and clippy in new hash/float tests

- float_ops: use core::f64::consts::PI in the frexp-contract battery
  (clippy::approx_constant)
- hash: rewrite the keyed_hash test via BuildHasher::hash_one
  (clippy::manual_hash_one)
- rustfmt the new float_ops/hash/format test modules

Assisted-by: Claude

* common: add DTSF to format.rs spell-checker ignores

Assisted-by: Claude
2026-07-07 15:29:52 +09:00
Jeong, YunWon 55c012cffd unicode crate (#8211)
* Extract unicodedata core into rustpython-unicode crate

Move the vm-free Unicode character database access — the generated UCD 3.2.0 /
latest tables, their build-time generation, and the icu4x/unicode_names2 lookups
for category/bidirectional/combining/east_asian_width/mirrored/decomposition/
normalize/is_normalized/digit/decimal/numeric/name/lookup — into a new leaf crate
over char/CodePoint/&Wtf8. stdlib/unicodedata.rs keeps the UCD pyclass binding: it
extracts the code point, boxes results, and maps errors. The unicode data files,
build.rs table generation, and the icu_properties/icu_normalizer/unicode_names2
dependencies move out of stdlib.

Assisted-by: Claude

* Route str predicates, casefold, and printable through rustpython-unicode

Add classify/case/identifier modules to the shared crate over char/&str/&Wtf8:
isalpha/isalnum/isdecimal/isdigit/isnumeric/isspace/isprintable classification,
XID identifier predicates, and full-mapping casefold. vm/builtins/str.rs and
literal/char.rs now call these instead of icu_properties/icu_casemap directly.
String-level iteration with final-sigma handling (lower/upper/title/capitalize,
islower/isupper) stays in the runtime.

Assisted-by: Claude

* Route sre_engine char classes through rustpython-unicode

Add the regex module with the SRE character-class and case predicates
(is_word/is_space/is_digit, is_uni_* Unicode variants, ascii/locale/unicode case
folding). sre_engine/string.rs now forwards to it, keeping its public API and
behavior identical — including the ASCII-only is_uni_digit and the hardcoded
is_uni_space table.

Assisted-by: Claude

* Route \N{} name lookups through rustpython-unicode

codegen/string_parser.rs (\N{...} escapes) and common/encodings.rs (the
namereplace error handler) now resolve character names via rustpython-unicode
instead of depending on unicode_names2 directly, leaving the crate as the sole
owner of the name database.

Assisted-by: Claude

* Add differential Unicode sweep and shared-crate snippet test

tests/differential.rs sweeps the full 0..0x110000 range and compares each str
classification predicate against a committed CPython 3.14 reference dataset
(tests/data/cpython3.14_predicates.txt, produced by generate_reference.py). Code
points that differ only because the Rust std / icu4x build ships a later Unicode
release than CPython 3.14's 16.0.0 are recorded in
tests/data/version_skew_cpython3.14.txt, regenerable via
RUSTPYTHON_UNICODE_REGEN_SKEW=1; the regen refuses to record any
cpython=true/crate=false divergence, so only newly-assigned code points are
allowed. Any other divergence fails. Both data files use a run-length
`predicate start:end,...` encoding.

extra_tests/snippets/stdlib_unicode_shared.py exercises the routed surface end to
end (str predicates, casefold, identifiers, unicodedata, normalize, \N{}, and re
character classes) and passes identically on CPython 3.14 and RustPython.

Assisted-by: Claude

* Match regex \d to Unicode decimal digits

is_uni_digit previously matched only ASCII 0-9, so re's \d in Unicode mode
missed decimal digits like ٥ and ५. SRE_UNI_IS_DIGIT matches Py_UNICODE_ISDECIMAL
(category Nd), so route it through classify::is_decimal. Unmasks test_bug_6561 in
test_re and extends the shared-crate snippet with the Nd/Nl/No cases.

Assisted-by: Claude

* Replace shallow Unicode wrappers with re-exports

Address review feedback on the extraction.

Functions that only forwarded to the shared crate become `use ... as`
re-exports rather than hand-written wrappers:

- literal: is_printable is dropped; escape.rs calls
  rustpython_unicode::classify::is_repr_printable directly.
- unicode::identifier::is_continue re-exports is_xid_continue.
- unicode::data::lookup_character re-exports unicode_names2::character.
- Drop the unused repr(u8) on DecompositionType.

The SRE character-class and case predicates move back into
sre_engine::string (their pre-extraction home) instead of living in a
unicode::regex module that only sre_engine and the vm _sre binding used;
is_uni_digit/is_uni_alnum still delegate to rustpython_unicode::classify.
engine.rs and _sre consume them from sre_engine::string again.

The unicode crate's tests move from a single root tests module in lib.rs
into per-module test submodules (case, classify, data, identifier,
normalize).

Assisted-by: Claude

* no-std

* Address review feedback: test module, dead variant, WTF-8 normalization

- differential.rs: move the sweep tests into a `mod tests` block and drop
  the file-level allow of clippy::tests_outside_test_module and
  std_instead_of_alloc; the test uses alloc collections instead.
- data.rs: remove the never-constructed DecompositionType::Canonical variant
  and its allow(unused); compatibility decomposition never produces it and
  canonical decomposition is handled through icu4x.
- normalize.rs: is_normalized now takes &Wtf8 and checks each UTF-8 run,
  skipping lone surrogates, matching normalize's run-wise behavior.
- unicodedata.rs: pass as_wtf8() to is_normalized.

Assisted-by: Claude
2026-07-07 09:19:25 +09:00
dependabot[bot] 924fe2aca9 Bump actions/cache/restore from 5.0.5 to 6.1.0 (#8223)
Bumps [actions/cache/restore](https://github.com/actions/cache) from 5.0.5 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/27d5ce7f107fe9357f9df03efb73ab90386fccae...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

---
updated-dependencies:
- dependency-name: actions/cache/restore
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 01:22:03 +09:00
Jeong, YunWon 838180f2b5 Re-export mmap libc constants through host_env (#8214)
* Re-export mmap libc constants through host_env

Move direct libc MADV_*, MAP_*, PROT_*, EOVERFLOW references in
stdlib::mmap to host_env::mmap re-exports. Replace libc::c_int with
core::ffi::c_int.

* host_env/mmap: gate EOVERFLOW re-export on cfg(windows)

Its only consumer is the cfg(windows) named-mapping overflow check in
stdlib::mmap; the re-export was gated cfg(unix), so it was configured
out on Windows and the reference failed to resolve.

Assisted-by: Claude
2026-07-07 00:29:31 +09:00
dependabot[bot] ac678656fc Bump itertools from 0.14.0 to 0.15.0 (#8226)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.14.0 to 0.15.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 00:06:08 +09:00
dependabot[bot] 538bb4f7b0 Bump taiki-e/install-action from 2.81.11 to 2.82.6 (#8222)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.81.11 to 2.82.6.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/15449e3094499af05d8d964a1c884208e4b8b595...9bcaee1dcae34154180f412e2fa69355a7cda9f6)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.82.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 00:05:26 +09:00
dependabot[bot] abed0aab5a Bump github/gh-aw/actions/setup from 0.80.9 to 0.81.6 (#8220)
Bumps [github/gh-aw/actions/setup](https://github.com/github/gh-aw) from 0.80.9 to 0.81.6.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/gh-aw/compare/a3624368c4e7d877586ff2784b61de73405e2cdd...eed4304d8740f0593f2797276cb8299d228ffd9b)

---
updated-dependencies:
- dependency-name: github/gh-aw/actions/setup
  dependency-version: 0.81.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 00:04:41 +09:00
dependabot[bot] 14d4ece9f7 Bump https://github.com/astral-sh/ruff-pre-commit (#8219)
Bumps [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) from v0.15.18 to 0.15.20.
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.18...v0.15.20)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.20
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 00:04:32 +09:00
dependabot[bot] e0f692c181 Bump https://github.com/rbubley/mirrors-prettier from v3.8.4 to 3.9.1 (#8218)
Bumps [https://github.com/rbubley/mirrors-prettier](https://github.com/rbubley/mirrors-prettier) from v3.8.4 to 3.9.1.
- [Commits](https://github.com/rbubley/mirrors-prettier/compare/v3.8.4...v3.9.1)

---
updated-dependencies:
- dependency-name: https://github.com/rbubley/mirrors-prettier
  dependency-version: 3.9.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 00:04:23 +09:00
Bas Schoenmaeckers 1e0f95ab3c Add pyframe functions to c-api (#8215) 2026-07-07 00:03:43 +09:00
dependabot[bot] 4477758e4a Bump j178/prek-action from 2.0.4 to 2.0.5 (#8217)
Bumps [j178/prek-action](https://github.com/j178/prek-action) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](https://github.com/j178/prek-action/compare/bdca6f102f98e2b4c7029491a53dfd366469e33d...e98a699c41eb69ab013a45817a0406469a748f8d)

---
updated-dependencies:
- dependency-name: j178/prek-action
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 23:56:47 +09:00
Shahar Naveh 0664e38e5b Set python args to be like CPython in CI (#8181)
* Set python args to be like CPython in CI (ish)

* Use `--slow-ci`

* `--dont-add-python-opts`

* unmark passing test
2026-07-06 23:52:33 +09:00
Jeong, YunWon c6907f3228 Move tuple/frozenset hash algorithms into common::hash (#8213)
* Move tuple/frozenset hash algorithms into common::hash

Move the pure tuplehash fold (xxHash-based) into `hash::hash_tuple`, taking
a fallible iterator of element hashes, and the frozenset XOR-fold into a
`hash::FrozenSetHash` streaming accumulator. `builtins::tuple` and
`builtins::set` keep only the element-hash loop and delegate the arithmetic.

Assisted-by: Claude

* common/hash: rename acc_pyhash to acc_py_hash

Drop the now-unused `// cspell:ignore pyhash` from tuple.rs left behind
by the tuple hash move; the only remaining occurrence was the
acc_pyhash local. Renaming it lets cspell pass without an ignore.

Assisted-by: Claude
2026-07-06 23:05:56 +09:00
Bas Schoenmaeckers 80e384e851 Add more abstract functions to c-api (#8202) 2026-07-06 14:12:52 +09:00
dependabot[bot] c8936f5a6d Bump cmov from 0.5.3 to 0.5.4 (#8210)
Bumps [cmov](https://github.com/RustCrypto/utils) from 0.5.3 to 0.5.4.
- [Commits](https://github.com/RustCrypto/utils/compare/cmov-v0.5.3...cmov-v0.5.4)

---
updated-dependencies:
- dependency-name: cmov
  dependency-version: 0.5.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 14:12:11 +09:00
Shahar Naveh e570946c4a Move some free standing functions to ir::InstructionInfo methods (#8209)
* Move some free standing functions to methods

* align tests

* mark loads_const as const fn

* coderabbit suggestion
2026-07-05 01:18:37 +09:00
Kwak Byoung Min 8bdc1cc5fd Fix csv.writer QUOTE_NONE with quotechar=None (#8201)
* Prevent csv QUOTE_NONE writer panics without quotechar

Handle csv.writer rows with QUOTE_NONE through a RustPython-owned unquoted writer path so quotechar=None no longer reaches the unfinished csv_core configuration branch. Escape delimiter, newline, quotechar, and escapechar bytes according to the active dialect, and preserve CPython's single-empty-field error behavior.

Constraint: Match CPython csv.writer behavior without changing Lib/ copied stdlib files.
Rejected: Relying on csv_core QuoteStyle::Never | it does not model CPython QUOTE_NONE escaping with quotechar=None.
Confidence: high
Scope-risk: narrow
Directive: Keep QUOTE_NONE writer behavior separate unless csv_core gains matching CPython semantics.
Tested: prek run --all-files; cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher; cargo build --release --features sqlite; pytest -v in extra_tests
Assisted-by: Codex:gpt-5.5

* Keep csv parity tests aligned with QUOTE_NONE support

Remove the stale RustPython expected-failure marker for the CPython escaped-field writer test that now passes, and cover CR/LF escaping in the snippet regression requested during review.

Constraint: RustPython test policy allows removing expectedFailure markers only when the upstream test passes.

Rejected: Refactoring writer row boilerplate in this follow-up | review marked it as a heavy-lift nitpick and it would broaden the CI fix.

Confidence: high

Scope-risk: narrow

Tested: cargo run --release --features sqlite -- -m test test_csv; cargo run -- extra_tests/snippets/stdlib_csv.py; PATH=/tmp/pyshim:$PATH prek run --all-files; git diff --check; cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher; pytest -v in extra_tests

Assisted-by: Codex:gpt-5.5

* Keep csv quote-style dispatch coherent

Review feedback pointed out that adjacent branches selected behavior from the same quoting discriminator. Use one match so future quote-style additions are routed in a single place.

Constraint: RustPython review requested merging adjacent quote-style checks.
Confidence: high
Scope-risk: narrow
Tested: cargo fmt --check
Tested: target/release/rustpython extra_tests/snippets/stdlib_csv.py
Tested: target/release/rustpython -m test test_csv
Tested: PATH=/tmp/pyshim:$PATH prek run --all-files
Tested: RUST_TEST_THREADS=1 cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher -- --test-threads=1
Tested: cargo clippy --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --all-targets
Assisted-by: Codex:gpt-5.5
2026-07-05 01:17:46 +09:00
Joshua Megnauth f32e96ce90 host_env: os.mkdir for Windows, Redox (#8128)
Python supports `mkdir` on Windows. I deferred to calling Rust's
implementation for now. However, like `rename`, Python's implementation
supports additional features that are currently unsupported on
RustPython. I added a note for future reference.

Redox supports `mkdirat` which significantly cleans up the
implementation.
2026-07-05 01:15:23 +09:00
Bas Schoenmaeckers 4caf959e58 Use PyO3 main & enable c-api tests (#8000)
Enable `abi3t` support in PyO3
Add left over c-api functions

Fix PyLong_AsUnsignedLongLongMask

Update pyo3 to `0.29`
Add `PyInt::as_u64_mask`

Fix `PyInt::as_u32_mask`
2026-07-05 01:13:45 +09:00
Shahar Naveh b39bec4063 Align symtable flag names with CPython (#8184)
* ASSIGNED -> DEF_LOCAL

* GLOBAL -> DEF_GLOBAL

* REFERENCED -> USE

* PARAMETER -> DEF_PARAM

* expose symbol flags directly as a pyattr

* FREE_CLASS -> DEF_FREE_CLASS

* IMPORTED -> DEF_IMPORT

* ANNOTATED -> DEF_ANNOT

* DEF_COMP_ITER DEF_COMP_CELL DEF_TYPE_PARAM

* DEF_NONLOCAL DEF_BOUND

* Align flag values

* unmark passing tests
2026-07-02 16:41:31 +09:00
Joshua Megnauth 6a3d4e8884 Bump unicode_names2 and rustls-graviola (#8203) 2026-07-02 16:38:33 +09:00
Shahar Naveh 16869e1ce8 Update some tests to 3.14.6 (#8204)
* Apply skip at the correct place

* Update `test_msvcrt.yp` to 3.14.6

* Add `test_external_inspection.py`
2026-07-02 16:32:33 +09:00
Shahar Naveh 7aaf2db14d Move free standing ir::Block functions to methods (#8205) 2026-07-02 16:31:34 +09:00
Joshua Megnauth 29e9f4ae43 unicodedata: No alloc is_normalized (#8206)
`icu4x` supports checking if a string is normalized without allocation.
2026-07-02 16:30:38 +09:00
Shahar Naveh d93dd2a781 Update test_sqlite3 to 3.14.6 (#8172) 2026-06-30 23:49:27 +09:00
dependabot[bot] 61ad308106 Bump https://github.com/streetsidesoftware/cspell-cli (#8199)
Bumps [https://github.com/streetsidesoftware/cspell-cli](https://github.com/streetsidesoftware/cspell-cli) from v10.0.0 to 10.0.1.
- [Release notes](https://github.com/streetsidesoftware/cspell-cli/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell-cli/compare/v10.0.0...v10.0.1)

---
updated-dependencies:
- dependency-name: https://github.com/streetsidesoftware/cspell-cli
  dependency-version: 10.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:48:55 +09:00
dependabot[bot] 8003fe04dc Bump https://github.com/astral-sh/ruff-pre-commit (#8198)
Bumps [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) from v0.15.17 to 0.15.18.
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.17...v0.15.18)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.18
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:48:39 +09:00
dependabot[bot] bf0124b10e Bump actions/checkout from 6.0.3 to 7.0.0 (#8197)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/df4cb1c069e1874edd31b4311f1884172cec0e10...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:48:21 +09:00
dependabot[bot] c988994448 Bump cargo-bins/cargo-binstall from 1.20.0 to 1.20.1 (#8196)
Bumps [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall) from 1.20.0 to 1.20.1.
- [Release notes](https://github.com/cargo-bins/cargo-binstall/releases)
- [Changelog](https://github.com/cargo-bins/cargo-binstall/blob/main/release-plz.toml)
- [Commits](https://github.com/cargo-bins/cargo-binstall/compare/30b5ca8b54e1dcffd9548bc87ede1531310fdc67...732870f031d2fb36309d0deaf36abcc704a7be65)

---
updated-dependencies:
- dependency-name: cargo-bins/cargo-binstall
  dependency-version: 1.20.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:42:18 +09:00
dependabot[bot] 0b8bd2a355 Bump reviewdog/action-suggester from 1.24.0 to 1.24.3 (#8195)
Bumps [reviewdog/action-suggester](https://github.com/reviewdog/action-suggester) from 1.24.0 to 1.24.3.
- [Release notes](https://github.com/reviewdog/action-suggester/releases)
- [Commits](https://github.com/reviewdog/action-suggester/compare/aa38384ceb608d00f84b4690cacc83a5aba307ff...2558ba17e65a9039e73764a73009fc05fef28a46)

---
updated-dependencies:
- dependency-name: reviewdog/action-suggester
  dependency-version: 1.24.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:42:06 +09:00
dependabot[bot] f4de973ebd Bump github/gh-aw/actions/setup from 0.79.9 to 0.80.9 (#8194)
Bumps [github/gh-aw/actions/setup](https://github.com/github/gh-aw) from 0.79.9 to 0.80.9.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/gh-aw/compare/54ad1f83a833db4de127cf278b00438e19a103a0...a3624368c4e7d877586ff2784b61de73405e2cdd)

---
updated-dependencies:
- dependency-name: github/gh-aw/actions/setup
  dependency-version: 0.80.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:56 +09:00
dependabot[bot] 6712156e00 Bump libz-rs-sys from 0.6.3 to 0.6.4 (#8193)
Bumps [libz-rs-sys](https://github.com/trifectatechfoundation/zlib-rs) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/trifectatechfoundation/zlib-rs/releases)
- [Changelog](https://github.com/trifectatechfoundation/zlib-rs/blob/main/docs/release.md)
- [Commits](https://github.com/trifectatechfoundation/zlib-rs/compare/v0.6.3...v0.6.4)

---
updated-dependencies:
- dependency-name: libz-rs-sys
  dependency-version: 0.6.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:44 +09:00
dependabot[bot] 2d8a60b240 Bump rustyline in the unix group across 1 directory (#8192)
Bumps the unix group with 1 update in the / directory: [rustyline](https://github.com/kkawakam/rustyline).


Updates `rustyline` from 18.0.0 to 18.0.1
- [Release notes](https://github.com/kkawakam/rustyline/releases)
- [Changelog](https://github.com/kkawakam/rustyline/blob/master/History.md)
- [Commits](https://github.com/kkawakam/rustyline/compare/v18.0.0...v18.0.1)

---
updated-dependencies:
- dependency-name: rustyline
  dependency-version: 18.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: unix
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:35 +09:00
dependabot[bot] 174afd1639 Bump phf from 0.13.1 to 0.14.0 in the phf group across 1 directory (#8191)
Bumps the phf group with 1 update in the / directory: [phf](https://github.com/rust-phf/rust-phf).


Updates `phf` from 0.13.1 to 0.14.0
- [Release notes](https://github.com/rust-phf/rust-phf/releases)
- [Changelog](https://github.com/rust-phf/rust-phf/blob/main/RELEASE_PROCESS.md)
- [Commits](https://github.com/rust-phf/rust-phf/compare/v0.13.1...v0.14.0)

---
updated-dependencies:
- dependency-name: phf
  dependency-version: 0.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: phf
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:25 +09:00
dependabot[bot] 7e75d415c9 Bump libffi from 5.1.0 to 5.1.1 in the libffi group across 1 directory (#8190)
Bumps the libffi group with 1 update in the / directory: [libffi](https://github.com/libffi-rs/libffi-rs).


Updates `libffi` from 5.1.0 to 5.1.1
- [Commits](https://github.com/libffi-rs/libffi-rs/compare/libffi-v5.1.0...libffi-v5.1.1)

---
updated-dependencies:
- dependency-name: libffi
  dependency-version: 5.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: libffi
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:13 +09:00
dependabot[bot] 07c4701dbb Bump zizmorcore/zizmor-action from 0.5.6 to 0.5.7 (#8189)
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/5f14fd08f7cf1cb1609c1e344975f152c7ee938d...192e21d79ab29983730a13d1382995c2307fbcaa)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 23:41:02 +09:00
Shahar Naveh 85ba1df3b1 Add more clippy rules (#8183)
* clippy `assigning_clones`

* string_lit_as_bytes

* tuple_array_conversions

* while_float

* manual_assert

* Revert "string_lit_as_bytes"

This reverts commit f40f756440.
2026-06-30 23:40:29 +09:00
Shahar Naveh e39c791e06 FutureFeature enum (#8185) 2026-06-30 23:39:13 +09:00
Shahar Naveh e7800603cf clippy iter_over_hash_type (#8182) 2026-06-30 23:34:08 +09:00
Shahar Naveh a588a64572 Uncomment codegen crashing tests (#8175)
* Update `test_patma.py` to 3.14.6

* Update `test_listcomps.py`

* Align patches of `test_super.py`

* Align `test_grammar.py`

* Align patches for `test_pep646_syntax.py`
2026-06-30 23:32:30 +09:00
Bas Schoenmaeckers d1792fd2ce Add more int functions to the c-api (#8159)
* Add more int functions to the c-api

* Simplify as_mask logic

* Add `PyLong_FromNativeBytes` & `PyLong_FromUnsignedNativeBytes`
2026-06-30 23:31:15 +09:00
Shahar Naveh dd9a477c87 Fix all clippy suggestions in ir.rs (#8162)
* Fix all clippy suggestions in `ir.rs`

* remove some `idx()` calls
2026-06-30 23:28:23 +09:00
Jeong, YunWon 8e598a68ea Clean up compiler parity leftovers (#8174) 2026-06-26 22:14:08 +09:00
Bas Schoenmaeckers 4421ac89a1 Add more object c-api's (#8170) 2026-06-26 20:42:01 +09:00
Shahar Naveh 9c027d4f67 Update test/signalinterproctester.py to 3.14.6 (#8173)
* Update `test/signalinterproctester.py` to 3.14.6

* Add `signalinterproctester.py` as a test dependency of `test_signal.py`
2026-06-26 18:24:20 +09:00
Shahar Naveh 8cb96ebcbb Update test_subprocess.py to 3.14.6 (#8171) 2026-06-26 18:23:54 +09:00
Jeong, YunWon a1ba6a662c Align compiler and AST behavior with CPython (#8138)
* Align compiler and AST behavior with CPython

Update the compiler pipeline, AST module support, and related VM compile/eval paths toward CPython 3.14 behavior.

Use upstream Ruff parser crates directly and keep RustPython-specific syntax preflight handling in the compile path.

Refresh opcode metadata, snapshots, and targeted tests for the aligned bytecode and AST behavior.

* fix

* Fix PR 8138 CI failures

* Fix match mapping wildcard scan complexity

* fixes

* Use Ruff runtime AST fields

* Minimize residual patch diff

* refactor error handling

* Remove _ast conversion context wrappers

* Clean up _ast conversion glue and compiler warning escalation

Rename the Node conversion parameter `ctx` to `vm` throughout the _ast
module.

Remove the unused compile_program, compile_program_single,
compile_block_expression, and compile_expression forwarders; compile_top
stays as the entry point.

Stash an escalated compiler SyntaxWarning so a non-SyntaxWarning category
propagates unchanged instead of being rewritten to SyntaxError, matching
PyErr_ExceptionMatches(SyntaxWarning) in compiler_warn. Drop the now-unused
CompileWarningError::into_codegen_error.

Replace the PositionalArguments two-variant enum with a struct holding a
shared range and a PositionalArgumentsKind enum.

Assisted-by: Claude

* Represent compiler flags as a CompilerFlags bitflags

Replace the loose PY_CF_*/CO_* i32 constants in compile_mode with a
CompilerFlags bitflags covering the PyCF_* flags and __future__
CO_FUTURE_* bits. The Python-visible ast.PyCF_* attribute values are
derived from it via bits(); parser input modes stay plain consts.

builtins::compile and the compile_string flag handling test flags
through CompilerFlags::contains instead of raw bit math.

Assisted-by: Claude

* Fix PR 8138 test regressions

* Fix PR 8138 CI failures

* Avoid shell interpolation in Linux deps action

* Fix review findings in compiler/AST changes

- frame.rs: compute the MATCH_CLASS class name lazily so a successful
  match no longer takes the type name lock or allocates; the
  __match_args__-not-a-tuple branch reuses it instead of recomputing.
- _ast/constant.rs: add the missing leading space to the with_recursion
  label ("maximum recursion depth exceeded during compilation").
- sys.set_int_max_str_digits: restore the "maxdigits must be 0 or larger
  than {n}" error text.
- codegen: set CO_MAXBLOCKS to 20 in both ir.rs and compile.rs.
- _ast/exception.rs: extract the duplicated excepthandler node guard
  into ensure_excepthandler_node.
- codegen: correct the validate_keywords doc comment.
- Drop redundant "CPython" qualifiers from comments added in this branch.

Assisted-by: Claude
2026-06-26 18:22:08 +09:00
Bas Schoenmaeckers 473ba7391a Add more mapping functions to c-api (#8169) 2026-06-25 22:35:04 +09:00
Bas Schoenmaeckers ab3d050485 Add allocator functions to c-api (#8168) 2026-06-25 22:34:14 +09:00
Shahar Naveh b28f29313f Update some tests to 3.14.6 (#8167)
* Add `test_fileutils.py` from 3.14.6

* Align patch for `test_zipimport_support.py`

* Update `test_bigmem.py` to 3.14.6

* Update `test_exception_group.py`

* Align patches for `test_baseexception.py`

* Update `test_exceptions.py`

* Update `test_dtrace.py`

* Remove patch from `string_tests.py`
2026-06-25 22:33:51 +09:00