🍌Shawn
a6c2f72407
Update LICENSE ( #7581 )
2026-04-13 12:49:32 +09:00
Jeong, YunWon
7abf8cc247
Bytecode parity - for-loop cleanup, return duplication, late jump threading fix ( #7580 )
...
- Use POP_TOP instead of POP_ITER for for-loop break/return cleanup
- Expand duplicate_end_returns to clone final return for jump predecessors
- Restrict late jump threading pass to unconditional jumps only
- Skip exception blocks in inline/reorder passes
- Simplify threaded_jump_instr NoInterrupt handling
2026-04-12 22:43:35 +09:00
Shahar Naveh
cb976b411f
Fail if prek fails ( #7574 )
2026-04-10 18:50:03 +09:00
Shahar Naveh
c98b6d85de
Remove overly broad permissions from release.yml ( #7577 )
2026-04-10 18:49:37 +09:00
Jeong, YunWon
4e2ce58693
Bytecode parity - direct loop backedges ( #7578 )
2026-04-10 18:48:57 +09:00
Shahar Naveh
98de82c5f0
Revert "Only run cargo check when rust code is changed ( #7572 )" ( #7579 )
2026-04-10 18:07:11 +09:00
Jeong, YunWon
0b7e0f007b
Bytecode parity - exception ( #7557 )
...
* Fix exception handling: except* chaining, finally cleanup, RERAISE
- Align except* bytecode chaining
- Fix exception state model and finally handler cleanup
- Fix RERAISE to only pop exception, preserve values below
* Port IR optimization passes from flowgraph.c
- BUILD_TUPLE n + UNPACK_SEQUENCE n elimination
- Dead store elimination within basic blocks
- apply_static_swaps for SWAP reduction
* Add bytecode comparison and disassembly dump scripts
- compare_bytecode.py: compare CPython vs RustPython bytecode output
- dis_dump.py: extract disassembly in normalized JSON format
2026-04-10 12:51:48 +09:00
Shahar Naveh
dcae8f0d53
Update some libs and tests from 3.14.3 to 3.14.4 ( #7576 )
...
* Update some libs and tests to 3.14.4
* Update `pydoc_data`
2026-04-10 09:16:10 +09:00
Shahar Naveh
f937cde7af
Only run cargo check when rust code is changed ( #7572 )
2026-04-10 02:40:15 +09:00
Shahar Naveh
c4c28a4449
Unify python version used by CI. Update to 3.14.4 ( #7571 )
...
* Add `.python-version` file
* Modify CI to use `.python-version` file
* Use correct path for `.python-version` file
2026-04-10 02:38:14 +09:00
dependabot[bot]
1012626bbb
Bump cargo-bins/cargo-binstall from 1.17.8 to 1.17.9 ( #7566 )
...
Bumps [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall ) from 1.17.8 to 1.17.9.
- [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/113a77a4ce971c41332f2129c3d995df993cf746...0b24824336e2b3800b0f89d9e08b2c08bfa3dcdd )
---
updated-dependencies:
- dependency-name: cargo-bins/cargo-binstall
dependency-version: 1.17.9
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-04-06 23:30:13 +09:00
dependabot[bot]
0f19413bcc
Bump pyo3 from 0.28.2 to 0.28.3 in the pyo3 group ( #7563 )
...
Bumps the pyo3 group with 1 update: [pyo3](https://github.com/pyo3/pyo3 ).
Updates `pyo3` from 0.28.2 to 0.28.3
- [Release notes](https://github.com/pyo3/pyo3/releases )
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md )
- [Commits](https://github.com/pyo3/pyo3/compare/v0.28.2...v0.28.3 )
---
updated-dependencies:
- dependency-name: pyo3
dependency-version: 0.28.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: pyo3
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 23:29:58 +09:00
Joshua Megnauth
6493f9a31d
fix: Swapcase must handle multibyte expansions ( #7559 )
...
`swapcase` used `to_ascii_lowercase` and uppercase to swap cases. This
is fine for ASCII, but code points may expand into multiple bytes which
leads to incorrect case swaps for some languages. The fix is to use
`to_lowercase` and `to_uppercase` instead.
Unfortunately, this leads to a realloc in `swapcase` when bytes are
expanded.
Part of #7526 .
2026-04-06 23:29:30 +09:00
Copilot
b682ec3bbe
Fix str.zfill() width calculation for non-ASCII strings ( #7534 )
2026-04-04 14:45:30 +09:00
Bo Maryniuk
a022ccc39f
Fix VM's infinite recursion crash with musl libc ( #7558 )
...
* Fix VM's infinite recursion crash with musl libc
* Lintfix/cleanup warnings
2026-04-04 09:46:46 +09:00
dependabot[bot]
07c0a32e3c
Bump lodash from 4.17.23 to 4.18.1 in /wasm/demo ( #7556 )
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.23 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.23...4.18.1 )
---
updated-dependencies:
- dependency-name: lodash
dependency-version: 4.18.1
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 01:44:50 +09:00
Shahar Naveh
c857db6e9e
Replace unmaintained unic crates ( #7555 )
2026-04-03 01:43:11 +09:00
Shahar Naveh
7d52244129
Updtae test_optimizer.py from 3.14.3 ( #7554 )
2026-04-03 01:33:50 +09:00
Shahar Naveh
0d5bd4aba7
Update test_opcache.py from 3.14.3 ( #7553 )
2026-04-03 01:33:34 +09:00
Shahar Naveh
1e8f8a9d3e
Update test_module from 3.14.3 ( #7552 )
...
* Update `test_module` from 3.14.3
* Unmark passing test
2026-04-03 01:33:19 +09:00
Shahar Naveh
5f49f54c43
Add test_perfmaps.py from 3.14.3 ( #7551 )
2026-04-03 00:50:25 +09:00
Shahar Naveh
5b3ec18158
Update test_file & test_largefile from 3.14.3 ( #7550 )
2026-04-03 00:49:55 +09:00
Shahar Naveh
fb1b4734a7
[zizmor] ignore superfluous-actions ( #7548 )
2026-04-03 00:44:58 +09:00
Jeong, YunWon
9e3a554412
fix crates ( #7549 )
2026-03-31 21:05:08 +09:00
Jeong, YunWon
501ff88aed
Improve codegen bytecode parity ( #7541 )
...
- Add CFG block splitting, jump threading, backward jump normalization
- Add genexpr StopIteration wrapper
- Add ConstantData::Slice and constant slice folding
- Add duplicate_exits_without_lineno and Block: Clone
- Add builtin(genexpr) optimization for tuple/list/set/all/any
- Add compile_try_except_no_finally for try-except without finally
- Add module_name_declared_global_in_nested_scope
- Add constant tuple folding in try_fold_constant_expr
- Add fstring literal-only optimization and empty literal elision
- Fix duplicate_exits_without_lineno: splice new blocks into linked list
2026-03-31 15:45:18 +09:00
Shahar Naveh and coderabbitai[bot]
b2b3070d12
Resolve excessive-permissions warning in ci.yaml ( #7547 )
...
* Resolve `excessive-permissions` warning in `ci.yaml`
* Update .github/workflows/ci.yaml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-31 14:53:08 +09:00
dependabot[bot]
eb38c204b3
Bump j178/prek-action from 2.0.0 to 2.0.1 ( #7544 )
...
Bumps [j178/prek-action](https://github.com/j178/prek-action ) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/j178/prek-action/releases )
- [Commits](https://github.com/j178/prek-action/compare/79f765515bd648eb4d6bb1b17277b7cb22cb6468...53276d8b0d10f8b6672aa85b4588c6921d0370cc )
---
updated-dependencies:
- dependency-name: j178/prek-action
dependency-version: 2.0.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-03-30 18:38:01 +02:00
dependabot[bot]
9c82ca423f
Bump minimatch and serve in /wasm/demo ( #7539 )
...
Bumps [minimatch](https://github.com/isaacs/minimatch ) to 3.1.5 and updates ancestor dependency [serve](https://github.com/vercel/serve ). These dependencies need to be updated together.
Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md )
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5 )
Updates `serve` from 14.2.5 to 14.2.6
- [Release notes](https://github.com/vercel/serve/releases )
- [Changelog](https://github.com/vercel/serve/blob/main/CHANGELOG.md )
- [Commits](https://github.com/vercel/serve/compare/v14.2.5...v14.2.6 )
---
updated-dependencies:
- dependency-name: minimatch
dependency-version: 3.1.5
dependency-type: indirect
- dependency-name: serve
dependency-version: 14.2.6
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 01:31:08 +09:00
Shahar Naveh
ce331a3e11
Resolve template injection ( #7546 )
2026-03-31 01:30:41 +09:00
dependabot[bot]
9b43343c78
Bump dtolnay/rust-toolchain ( #7545 )
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from efa25f7f19611383d5b0ccf2d1c8914531636bf9 to 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](https://github.com/dtolnay/rust-toolchain/compare/efa25f7f19611383d5b0ccf2d1c8914531636bf9...3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-version: 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
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-03-31 01:30:08 +09:00
dependabot[bot]
764e72cc93
Bump env_logger from 0.11.9 to 0.11.10 ( #7543 )
...
Bumps [env_logger](https://github.com/rust-cli/env_logger ) from 0.11.9 to 0.11.10.
- [Release notes](https://github.com/rust-cli/env_logger/releases )
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.9...v0.11.10 )
---
updated-dependencies:
- dependency-name: env_logger
dependency-version: 0.11.10
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-03-31 01:29:47 +09:00
dependabot[bot]
025549d909
Bump schannel from 0.1.28 to 0.1.29 ( #7542 )
...
Bumps [schannel](https://github.com/steffengy/schannel-rs ) from 0.1.28 to 0.1.29.
- [Release notes](https://github.com/steffengy/schannel-rs/releases )
- [Commits](https://github.com/steffengy/schannel-rs/compare/v0.1.28...v0.1.29 )
---
updated-dependencies:
- dependency-name: schannel
dependency-version: 0.1.29
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-03-31 01:29:35 +09:00
Shahar Naveh
3c88e681a8
Split cargo check matrix to individual targets. Avoid cache poisoning ( #7540 )
...
* Split check matrix. Prevent cache poisoning
* Use `rustup`
* Change name
* Align cargo args
2026-03-30 23:59:48 +09:00
Shahar Naveh
d998b62bca
Fix lint warnings in release.yml ( #7538 )
2026-03-30 18:53:38 +09:00
Shahar Naveh
dbf64f873f
Remove oparg builders ( #7537 )
2026-03-30 18:53:13 +09:00
Jeong, YunWon
844fdf3a8d
Bytecode parity ( #7536 )
...
* Add CFG block splitting, jump threading, backward jump normalization, genexpr StopIteration wrapper
- split_blocks_at_jumps: split blocks at branch points so each has one exit
- jump_threading: thread jumps through single-jump blocks (flowgraph.c jump_thread)
- Backward conditional jump normalization: invert and create NOT_TAKEN+JUMP block
- Follow empty blocks in jump-to-return optimization (next_nonempty_block)
- Add PEP 479 StopIteration handler to compile_comprehension for generators
* Add ConstantData::Slice and constant slice folding
- Add Slice variant to ConstantData and BorrowedConstant
- Fold constant slices (x[:3], x[1:4]) into LOAD_CONST(slice(...))
- Marshal serialization/deserialization for Slice type
- Box::leak in borrow_obj_constant for PySlice roundtrip
* Add duplicate_exits_without_lineno (disabled) and Block: Clone
Prepare infrastructure for exit block duplication optimization.
Currently disabled pending stackdepth integration.
* Improve codegen bytecode parity
2026-03-30 18:50:58 +09:00
Jeong, YunWon
6f98ae3f79
Bytecode parity ( #7535 )
...
* Add CFG block splitting, jump threading, backward jump normalization, genexpr StopIteration wrapper
- split_blocks_at_jumps: split blocks at branch points so each has one exit
- jump_threading: thread jumps through single-jump blocks (flowgraph.c jump_thread)
- Backward conditional jump normalization: invert and create NOT_TAKEN+JUMP block
- Follow empty blocks in jump-to-return optimization (next_nonempty_block)
- Add PEP 479 StopIteration handler to compile_comprehension for generators
* Add ConstantData::Slice and constant slice folding
- Add Slice variant to ConstantData and BorrowedConstant
- Fold constant slices (x[:3], x[1:4]) into LOAD_CONST(slice(...))
- Marshal serialization/deserialization for Slice type
- Box::leak in borrow_obj_constant for PySlice roundtrip
* Add ConstantData::Frozenset variant (type only, folding deferred)
Add Frozenset to ConstantData, BorrowedConstant, and marshal support.
Actual frozenset folding (BUILD_SET + CONTAINS_OP → LOAD_CONST frozenset)
requires VirtualMachine for element hashing and is deferred.
* Add duplicate_exits_without_lineno (disabled) and Block: Clone
Prepare infrastructure for exit block duplication optimization.
Currently disabled pending stackdepth integration.
2026-03-30 12:52:04 +09:00
Huy Vũ (Josh)
5e989f00e9
Validate SyntaxError details tuple shape ( #7533 )
2026-03-29 22:37:08 +09:00
Jeong, YunWon
cbdc7bb587
Compiler parity: docstring dedent, StopIteration wrapper, constant folding ( #7530 )
2026-03-29 22:36:20 +09:00
Jeong, YunWon
213ea9d456
ruff from fork ( #7532 )
2026-03-29 19:26:24 +09:00
Jeong, YunWon
167653f3cb
ruff 0.15.8 ( #7531 )
2026-03-29 15:21:09 +09:00
Copilot and youknowone
ae2ceab7ab
Fix inspect.getsource returning truncated source for multi-line function definitions ( #7519 )
...
* Initial plan
* fix: restore def-line source range before entering function scope so co_firstlineno is correct
Agent-Logs-Url: https://github.com/RustPython/RustPython/sessions/94701403-2011-4525-88f1-6e06891da6a4
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com >
* fix: remove pre-existing expectedFailure decorators from test_gettext plural form tests
Agent-Logs-Url: https://github.com/RustPython/RustPython/sessions/ce27bf53-569f-45a0-ad5a-08e8f322c717
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com >
* remove extra_tests/snippets/inspect_getsource.py (covered by test_inspect)
Agent-Logs-Url: https://github.com/RustPython/RustPython/sessions/2b64da1b-8aab-4fec-8b28-3a21d46ac2f9
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com >
2026-03-29 00:52:34 +09:00
dependabot[bot]
4b99e3fd62
Bump serialize-javascript and terser-webpack-plugin in /wasm/demo ( #7523 )
...
Removes [serialize-javascript](https://github.com/yahoo/serialize-javascript ). It's no longer used after updating ancestor dependency [terser-webpack-plugin](https://github.com/webpack/terser-webpack-plugin ). These dependencies need to be updated together.
Removes `serialize-javascript`
Updates `terser-webpack-plugin` from 5.3.16 to 5.4.0
- [Release notes](https://github.com/webpack/terser-webpack-plugin/releases )
- [Changelog](https://github.com/webpack/terser-webpack-plugin/blob/main/CHANGELOG.md )
- [Commits](https://github.com/webpack/terser-webpack-plugin/compare/v5.3.16...v5.4.0 )
---
updated-dependencies:
- dependency-name: serialize-javascript
dependency-version:
dependency-type: indirect
- dependency-name: terser-webpack-plugin
dependency-version: 5.4.0
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-29 00:52:00 +09:00
Huy Vũ (Josh)
f5eb35ce59
type.__new__: preserve caller namespace when reading __qualname__ ( #7524 )
...
* type.__new__: preserve caller namespace when reading __qualname__
* type.__new__: preserve caller namespace when reading __qualname__
2026-03-29 00:51:49 +09:00
dependabot[bot]
88cbcc9f95
Bump winresource from 0.1.30 to 0.1.31 ( #7522 )
...
Bumps [winresource](https://github.com/BenjaminRi/winresource ) from 0.1.30 to 0.1.31.
- [Commits](https://github.com/BenjaminRi/winresource/commits )
---
updated-dependencies:
- dependency-name: winresource
dependency-version: 0.1.31
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-03-28 14:47:55 +09:00
dependabot[bot]
72ac694963
Bump the wasmtime group with 3 updates ( #7521 )
...
Bumps the wasmtime group with 3 updates: [cranelift](https://github.com/bytecodealliance/wasmtime ), [cranelift-jit](https://github.com/bytecodealliance/wasmtime ) and [cranelift-module](https://github.com/bytecodealliance/wasmtime ).
Updates `cranelift` from 0.129.1 to 0.130.0
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases )
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md )
- [Commits](https://github.com/bytecodealliance/wasmtime/commits )
Updates `cranelift-jit` from 0.129.1 to 0.130.0
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases )
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md )
- [Commits](https://github.com/bytecodealliance/wasmtime/commits )
Updates `cranelift-module` from 0.129.1 to 0.130.0
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases )
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md )
- [Commits](https://github.com/bytecodealliance/wasmtime/commits )
---
updated-dependencies:
- dependency-name: cranelift
dependency-version: 0.130.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: wasmtime
- dependency-name: cranelift-jit
dependency-version: 0.130.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: wasmtime
- dependency-name: cranelift-module
dependency-version: 0.130.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: wasmtime
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 14:47:42 +09:00
Jeong, YunWon and dependabot[bot]
d12f623ade
Bytecode parity ( #7514 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 09:19:12 +09:00
Jeong, YunWon
e564d4646f
winapi functions ( #7516 )
2026-03-28 00:02:49 +09:00
Jeong, YunWon
99311d4617
fix cron-ci ( #7483 )
...
* fix cron-ci
* fix custom_text_test_runner
2026-03-27 23:55:30 +09:00
Shahar Naveh
a4e7b89b8d
Oparg resume depth ( #7515 )
...
* Base resume context
* Fixes for api change
* Align codegen
* Align `frame.rs` to the api changes
* fix jit
* Use new oparg
* Fix doc
* let `ir` to decide exception depth
2026-03-27 21:47:52 +09:00