Commit Graph
16848 Commits
Author SHA1 Message Date
Shahar Naveh c6e254fbdc General code nits (#8135)
* General nitpicks

* Move Compiler::constant_truthiness to a ConstantData method

* More code cleanup

* bytecode::CodeFlags -> CodeFlags

* More code clenaups
2026-06-22 16:46:17 +09:00
Shahar Naveh 866f7ca812 Fix symtable type_param_block name (#8137) 2026-06-22 16:44:08 +09:00
Shahar Naveh 619f423084 Replace &String -> &str (#8136) 2026-06-22 16:42:54 +09:00
Bas Schoenmaeckers 2ce6fd0e41 Add stdlib to c-api (#8133) 2026-06-22 16:38:33 +09:00
dependabot[bot] 02a05ee67b Bump insta from 1.47.2 to 1.48.0 (#8130)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.47.2 to 1.48.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.47.2...1.48.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-version: 1.48.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-06-22 16:32:37 +09:00
Shahar Naveh 9f2c4e14a9 More clippy rules (#8127)
* clippy `elidable_lifetime_names`

* large_types_passed_by_value

* trivially_copy_pass_by_ref

* type_repetition_in_bounds

* copy_iterator

* collection_is_never_read

* same_functions_in_if_condition

* unnecessary_struct_initialization

* clippy on windows

* ssl windows
2026-06-22 16:30:51 +09:00
Shahar Naveh 432df16bdd Align patches at test_types.py (#8126)
* Align patches at `test_types.py`

* Add missing methods for `_io.TextIOBase`
2026-06-22 16:30:23 +09:00
Shahar Naveh 80d392ddc3 Skip flaky test at test_thread.py (#8125) 2026-06-22 16:28:35 +09:00
Kwak Byoung MinandShahar Naveh 6d25033da6 Support csv writer QUOTE_STRINGS and QUOTE_NOTNULL (#8109)
* Support csv quoting modes added in Python 3.12

Implement writer handling for QUOTE_STRINGS and QUOTE_NOTNULL so the exported constants no longer panic and follow CPython behavior for string, non-null, None, and quotechar validation cases.

Constraint: RustPython contribution policy requires CPython-compatible behavior through Rust-side changes and regression coverage outside Lib/.

Rejected: Marking CPython Lib tests or hiding the constants | would preserve a runtime panic for supported public constants.

Confidence: high

Scope-risk: narrow

Directive: Keep QUOTE_STRINGS and QUOTE_NOTNULL writer behavior aligned with CPython's csv module when extending dialect validation.

Tested: cargo check -p rustpython-stdlib; cargo run --release -- extra_tests/snippets/stdlib_csv.py; cargo run --release -- -m test test_csv; cargo clippy; pre-commit run --all-files via temporary venv/PATH shim; cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher -- --test-threads=1

Not-tested: Remote CI and PR creation were not run because remote git operations require explicit approval.

Assisted-by: Codex:gpt-5.5

* Update crates/stdlib/src/csv.rs

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>

* Update crates/stdlib/src/csv.rs

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>

* Keep csv writer follow-up lint clean

Apply maintainer-requested expression cleanups and rustfmt wrapping so the PR lint job can pass without changing behavior.

Constraint: GitHub Actions Lint failed on rustfmt output after the review suggestion.

Rejected: Changing csv writer semantics | the failing check was formatting-only and all behavior tests already passed.

Confidence: high

Scope-risk: narrow

Directive: Keep future review suggestions rustfmt-clean before pushing.

Tested: cargo fmt --check; cargo check -p rustpython-stdlib; cargo run --release -- extra_tests/snippets/stdlib_csv.py; cargo run --release -- -m test test_csv; cargo clippy; pre-commit run --all-files; cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher -- --test-threads=1

Not-tested: Remote CI has not rerun yet; this commit will trigger it after push.

Assisted-by: Codex:gpt-5.5

---------

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
2026-06-22 13:17:55 +09:00
Shahar Naveh a1b54bc4e7 General code nits (#8107)
* General nits

* compiler

* cformat

* gc_state

* fix release compile

* Fix logic error

* revert bad logic error

* don't inline elapsed_time
2026-06-22 13:17:21 +09:00
dependabot[bot] 51b9b2ef91 Bump the openssl group across 1 directory with 2 updates (#8124)
Bumps the openssl group with 1 update in the / directory: [openssl](https://github.com/rust-openssl/rust-openssl).


Updates `openssl` from 0.10.80 to 0.10.81
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.80...openssl-v0.10.81)

Updates `openssl-sys` from 0.9.116 to 0.9.117
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.116...openssl-sys-v0.9.117)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.81
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: openssl
- dependency-name: openssl-sys
  dependency-version: 0.9.117
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: openssl
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-17 14:01:03 -04:00
Shahar Naveh 63b99b8996 More clippy rules (#8123)
* clippy `bool_to_int_with_if`

* doc_link_with_quotes

* ip_constant

* single_char_pattern

* windows
2026-06-17 13:25:38 +09:00
Shahar Naveh 455e2624ad Clippy ref_option (#8122) 2026-06-17 13:24:59 +09:00
Shahar Naveh 11da0b42c3 clippy enum_glob_use (#8121) 2026-06-17 13:24:36 +09:00
Joshua Megnauth 697a441e70 host_env: renameat support for os.rename (#8118)
Python's `os.rename` supports renaming a path relative to a directory
descriptor - essentially, `renameat`. The syscall and its Rustix wrapper
does all of the work, so this patch mainly updates the Python signature
to forward to the implementation.

As of this patch, `os.rename` is still incorrect for Windows because it
always replaces the destination file. I added a small note for future
contributors (or myself, since I might tackle it) as a reminder of
what's broken.
2026-06-17 13:24:01 +09:00
Shahar Naveh 40197480e9 Use KwArgs newtype struct (#8120) 2026-06-16 22:38:01 +09:00
dependabot[bot] 47d13480c6 Bump launch-editor from 2.10.0 to 2.14.1 in /wasm/demo (#8119)
Bumps [launch-editor](https://github.com/vitejs/launch-editor) from 2.10.0 to 2.14.1.
- [Commits](https://github.com/vitejs/launch-editor/compare/v2.10.0...v2.14.1)

---
updated-dependencies:
- dependency-name: launch-editor
  dependency-version: 2.14.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-06-16 22:37:10 +09:00
Shahar Naveh 5893c688c9 Fix builtin class names not being interned (#8116) 2026-06-16 17:15:01 +09:00
dependabot[bot] 7b2e6a570f Bump taiki-e/install-action from 2.81.1 to 2.81.8 (#8115)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.81.1 to 2.81.8.
- [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/e49978b799e49ff429d162b7a30601a569ab6538...0631aa6515c7d545823c67cfae7ef4fc7f490154)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.81.8
  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-16 17:11:50 +09:00
dependabot[bot] 1a797018d7 Bump memchr from 2.8.1 to 2.8.2 (#8114)
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.8.1 to 2.8.2.
- [Commits](https://github.com/BurntSushi/memchr/compare/2.8.1...2.8.2)

---
updated-dependencies:
- dependency-name: memchr
  dependency-version: 2.8.2
  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-16 16:11:14 +09:00
dependabot[bot] 66559e1c0a Bump codecov/codecov-action from 6.0.1 to 7.0.0 (#8113)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6.0.1 to 7.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/e79a6962e0d4c0c17b229090214935d2e33f8354...fb8b3582c8e4def4969c97caa2f19720cb33a72f)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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-16 16:11:06 +09:00
dependabot[bot] 19943ba24f Bump cargo-bins/cargo-binstall from 1.19.1 to 1.20.0 (#8112)
Bumps [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall) from 1.19.1 to 1.20.0.
- [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/aaa84a43aec4955a42c5ffc65d258961e39f276e...30b5ca8b54e1dcffd9548bc87ede1531310fdc67)

---
updated-dependencies:
- dependency-name: cargo-bins/cargo-binstall
  dependency-version: 1.20.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-06-16 16:10:53 +09:00
dependabot[bot] 047538e224 Bump actions/checkout from 6.0.2 to 6.0.3 (#8111)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [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/de0fac2e4500dabe0009e67214ff5f5447ce83dd...df4cb1c069e1874edd31b4311f1884172cec0e10)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.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-16 16:10:45 +09:00
dependabot[bot] f4e76cf9e0 Bump https://github.com/astral-sh/ruff-pre-commit (#8110)
Bumps [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) from v0.15.15 to 0.15.16.
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.15...v0.15.16)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.16
  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-16 16:10:30 +09:00
github-actions[bot]andgithub-actions[bot] cbfa330780 Update doc DB for CPython 3.14.6 (#8106)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-16 15:59:36 +09:00
Rory Yorke e65b1fc488 Dedent -c command-line parameter value (#8056) 2026-06-16 15:58:12 +09:00
Shahar Naveh a1eeee28e4 Update idlelib to 3.14.6 (#8105)
* Update `idlelib/` to 3.14.6

* Update `test_idle.py` to 3.14.6
2026-06-15 11:21:28 +09:00
Shahar Naveh 72052484ca clippy significant_drop_in_scrutinee & explicit_deref_methods (#8104) 2026-06-15 11:21:13 +09:00
Shahar Naveh 7da696661b Reduce number of string clones when compiling python source code (#8103) 2026-06-15 11:20:48 +09:00
Shahar Naveh a1355939d2 Update some libs to 3.14.6 (#8102) 2026-06-15 11:20:13 +09:00
Shahar Naveh 4da8a1f1d3 Update xml to 3.14.6 (#8101)
* Update `xml` to 3.14.6

* Update tests

* mark failing tests

* Align patches
2026-06-15 11:19:40 +09:00
Shahar Naveh 79c3575961 Update libregtest to 3.14.6 (#8100)
* Update `test_regrtest.py` to 3.14.6

* Update `libregrtest`

* Update unittest

* Unmark passing test

* Remove `test_set` from env polluters

* Revert "Unmark passing test"

This reverts commit 82b8c1c228.

* Revert "Remove `test_set` from env polluters"

This reverts commit 5a4040da32.

* Mark failing test
2026-06-15 11:19:01 +09:00
Joshua Megnauth 271d3c2af1 host_env: Use Rustix for copy_file_range (#8099)
Rustix bypasses `libc` to make direct syscalls on Linux. Rustix is also
semantically cleaner than `libc` itself. For `copy_file_range`, the
offsets can't be negative but `libc`'s `off_t` type is an `i64` because
it's used elsewhere, including for functions that CAN take a negative
offset. Rustix is cleaner because the offsets are `u64`.
2026-06-15 11:18:31 +09:00
Shahar Naveh d758d60eb1 Newtype SigalNum (#8096)
* Newtype SigalNum

* impl Index<SigalNum> for SignalHandlersInner
2026-06-15 11:12:39 +09:00
Shahar Naveh c3e1f0fa37 Get all builtin types dynamiclly (#8095) 2026-06-15 11:11:32 +09:00
Joshua Megnauth 5c1803e019 Fix most of unicodedata; unmask multiple tests (#7947) 2026-06-14 17:47:42 +09:00
dependabot[bot] 1b0d2f7f9d Bump pyo3 from 0.28.3 to 0.29.0 (#8094)
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.28.3 to 0.29.0.
- [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.3...v0.29.0)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.29.0
  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-14 14:09:40 +09:00
dependabot[bot] ddd9e0ff94 Bump log from 0.4.31 to 0.4.32 (#8093)
Bumps [log](https://github.com/rust-lang/log) from 0.4.31 to 0.4.32.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.31...0.4.32)

---
updated-dependencies:
- dependency-name: log
  dependency-version: 0.4.32
  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-14 14:09:24 +09:00
dependabot[bot] fd8794270f Bump which from 8.0.2 to 8.0.3 (#8092)
Bumps [which](https://github.com/harryfei/which-rs) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/8.0.2...8.0.3)

---
updated-dependencies:
- dependency-name: which
  dependency-version: 8.0.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-14 14:09:05 +09:00
dependabot[bot] 01098494b3 Bump uuid from 1.23.2 to 1.23.3 (#8091)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.23.2 to 1.23.3.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.23.2...v1.23.3)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 1.23.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-14 14:09:01 +09:00
dependabot[bot] 28579badbe Bump cranelift in the wasmtime group across 1 directory (#8090)
Bumps the wasmtime group with 1 update in the / directory: [cranelift](https://github.com/bytecodealliance/wasmtime).


Updates `cranelift` from 0.132.0 to 0.132.1
- [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.132.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: wasmtime
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-14 14:08:58 +09:00
Shahar Naveh a895eeed00 Newtype SignalHandlers (#8089) 2026-06-14 13:53:18 +09:00
github-actions[bot]andgithub-actions[bot] f34cfca1f3 Update doc DB for CPython 3.14.6 (#8088)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-12 23:58:41 +09:00
Shahar Naveh 5d375e3c21 Update some of changed libs and tests from 3.14.5 -> 3.14.6 (part 3) (#8086) 2026-06-12 23:50:07 +09:00
Shahar Naveh b8776bd8d0 Update some of changed libs and tests from 3.14.5 -> 3.14.6 (part 2) (#8085) 2026-06-12 23:49:47 +09:00
Shahar Naveh a2fabfa064 Update some of changed libs and tests from 3.14.5 -> 3.14.6 (part 1) (#8084) 2026-06-12 23:49:15 +09:00
Shahar Naveh 52c2d3fd61 cleanup the signals module (#8076) 2026-06-12 17:20:51 +09:00
Shahar Naveh 3ff976180a Update pyrepl to 3.14.5 (#7823)
* Add a dummy `posix._is_inputhook_installed` function

* Add a dummy `nt._is_inputhook_installed` function

* Update `_pyrepl` to 3.14.5

* Update `test_pyrepl` to 3.14.5

* Add a dummy `posix._is_inputhook_installed` function
2026-06-12 11:10:50 +09:00
dependabot[bot] 9941d4dd81 Bump bitflags from 2.11.1 to 2.12.1 (#8082)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.11.1 to 2.12.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.11.1...2.12.1)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-version: 2.12.1
  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-12 11:10:21 +09:00
dependabot[bot] 622e65ccc5 Bump libsqlite3-sys from 0.38.0 to 0.38.1 (#8081)
Bumps [libsqlite3-sys](https://github.com/rusqlite/rusqlite) from 0.38.0 to 0.38.1.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/commits)

---
updated-dependencies:
- dependency-name: libsqlite3-sys
  dependency-version: 0.38.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-12 11:10:11 +09:00