Commit Graph
15773 Commits
Author SHA1 Message Date
ShaharNaveh 28ed23f7ca Update test_array.py from 3.14.3 2026-02-10 13:16:46 +02:00
ShaharNaveh b6ebbfd365 impl array.clear 2026-02-10 12:58:29 +02:00
Jeong, YunWon 1a54267aa7 Merge pull request #7060 from youknowone/test_iter
Update test_errno,test_iter from v3.14.3
2026-02-10 00:50:54 +09:00
Jeong, YunWon 6f1edf3b26 Remove static cache for builtins iter/reversed reduce
- Replace static_cell! cached builtins_iter/builtins_reversed with
  per-call vm.builtins.get_attr lookups to support runtime builtins
  mutation (CPython issue #101765)
- Refactor PositionIterInternal::reduce to take func, active, and
  empty callbacks; resolve builtins outside the lock to prevent
  deadlock from reentrant iterator access
- Add __reduce__ and fix reentrant next() in PyCallableIterator
- Remove expectedFailure from test_reverse_iterator_picking and
  test_reduce_mutating_builtins_iter
2026-02-10 00:49:12 +09:00
CPython Developers 177837de6b Update test_iter from v3.14.3 2026-02-10 00:48:22 +09:00
CPython Developers 48d63a6dae Update test_errno from v3.14.3 2026-02-10 00:48:22 +09:00
Jeong, YunWon c16f6f8b68 Fix signal handler after fork (#7012)
* temp regrtest save_env patch

* Refactor signal_handlers from Option to OnceCell

- Change `signal_handlers` type from `Option<Box<...>>` to
  `OnceCell<Box<...>>` so fork children can lazily initialize it
- Add `VirtualMachine::is_main_thread()` using runtime thread ID
  comparison instead of structural `signal_handlers.is_none()` check
- Initialize signal handlers in `py_os_after_fork_child()` via
  `get_or_init()` for workers that fork
- Use `get_or_init()` in `signal()` and `getsignal()` functions
- Remove `set_wakeup_fd(-1)` special-case workaround (d6d0303)
- Extract `signal::new_signal_handlers()` to deduplicate init expr
- Allow `getsignal()` from any thread (matches CPython behavior)
- Fix `set_wakeup_fd` error message to name the correct function
2026-02-10 00:38:46 +09:00
Copilot 20ad988585 Update copy module and test_copy from CPython v3.14.3 (#7062) 2026-02-10 00:05:15 +09:00
Jeong, YunWon 570d50c67f no_std for common, pylib, codegen (#7056)
* `std` feature for common

- Gate OS-dependent modules behind `#[cfg(feature = "std")]`
- Replace `std::f64` with `core::f64` in float_ops
- Replace `std::process::abort` with panic in refcount
- Remove `thread_local` from levenshtein (stack buffer)
- Split static_cell into threading/non_threading/no_std

* `std` for codegen

* `no_std` for pylib
2026-02-09 23:28:20 +09:00
Jeong, YunWon c974b77127 [update_lib] fix hard_deps resolution and fix commit not to miss test data (#7058)
* [update_lib] fix hard_dep not to unclude other tests

* [update_lib] commit test data
2026-02-09 14:41:15 +09:00
Jeong, YunWon dc2d235e59 Replace unsafe pointer cast with PyMutex in PyCode (#7055)
Add `source_path: PyMutex<&'static PyStrInterned>` field to
`PyCode` for interior mutability, replacing the UB-inducing
`#[allow(invalid_reference_casting)]` + `write_volatile` pattern
in `update_code_filenames`. Update all read sites across the
codebase to use the new `source_path()` accessor method.
2026-02-09 14:01:39 +09:00
CPython Developers d1c19bef38 Update linecache from v3.14.3 2026-02-09 12:56:53 +09:00
Jeong, YunWon d2a9937ad6 [update_lib] todo shows last updated date (#7053) 2026-02-09 09:39:01 +09:00
Jeong, YunWon 4daac232a4 no_std for doc, replace HashSet in codegen (#7054) 2026-02-09 08:14:53 +09:00
Jeong, YunWon 470bd5990b Fix test_import: import machinery, circular imports, and script shadowing (#7034)
* Fix test_import: import machinery and errors

- Emit IMPORT_FROM instead of LOAD_ATTR for `import a.b.c as m`
- Add "partially initialized module" error for circular imports
- Add "cannot access submodule" error for initializing submodules
- Implement script shadowing detection with "consider renaming" hint
  - Detect user scripts shadowing stdlib/third-party modules
  - Compute original sys.path[0] from sys.argv[0]
  - Check sys.stdlib_module_names for stdlib detection
  - Respect safe_path setting
- Implement _imp._fix_co_filename for code source_path rewriting
- Add data parameter to _imp.get_frozen_object with marshal deser
- Fix import_from: check __spec__.has_location before using origin
- Set ImportError.path attribute on import failures
- Fix import_star error messages for non-str __all__/__dict__ items
- Always call builtins.__import__ in import_inner

* Propagate __bool__ errors from fromlist in import

Previously, try_to_bool errors were silently swallowed via .ok(),
causing fromlist with broken __bool__ to default to false.
2026-02-09 01:40:26 +09:00
Jeong, YunWon cf83008d33 no_std for wtf8, sre_engine, compiler-core, literal (#7051)
* `no_std` for wtf8

* `no_std` for sre_engine, compiler-core, literal
2026-02-09 01:04:54 +09:00
Shahar Naveh ea352ccdae Make inner oparg values private (#7050) 2026-02-08 14:56:56 +00:00
Jeong, YunWonandgithub-actions[bot] f777416870 initial sandbox (#7035)
* Add host_env feature for sandbox isolation

Introduce a `host_env` feature flag that gates all host environment
access (filesystem, network, signals, processes). When disabled,
the VM operates in sandbox mode:

- _io module always available; FileIO gated by host_env
- SandboxStdio provides lightweight stdin/stdout/stderr via Rust std::io
- BytesIO/StringIO/BufferedIO/TextIOWrapper work without host_env
- open() returns UnsupportedOperation in sandbox
- stdlib modules (os, socket, signal, etc.) gated by host_env
- CI checks both host_env ON and OFF builds

* Auto-format: ruff check --select I --fix

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-08 13:58:30 +00:00
Jeong, YunWon 5dabad6702 reason inside #[allow] (#7049) 2026-02-08 13:11:50 +00:00
Shahar Naveh 23a89663e0 Update tomllib from 3.14.3 (#7048) 2026-02-08 12:51:38 +00:00
Shahar Naveh c8b4d6308f Newtype for LoadAttr oparg (#7047) 2026-02-08 11:47:14 +00:00
ShaharNaveh d54cf8f12e Update difflib.py from 3.14.3 2026-02-08 20:36:35 +09:00
ShaharNaveh 32b57785c3 Update dataclasses.py from 3.14.3 2026-02-08 19:38:26 +09:00
Jeong, YunWon d2d8eeea2f Add _types module (#6807)
* _types

* builtin_function_or_method

* PyCapsule

* function_or_method

* Remove expectedFailure for test_builtin_function and test_join_nondaemon_on_shutdown
2026-02-08 19:17:03 +09:00
Jeong, YunWon 07fc6ee3c7 no_std clippy (#7043) 2026-02-08 16:49:18 +09:00
ShaharNaveh c29d2d9a1c Update get{opt,pass}.py from 3.14.3 2026-02-08 16:35:56 +09:00
Shahar Naveh bbe5412aea Update test_{binop,contains}.py from 3.14.3 (#7038) 2026-02-08 10:00:50 +09:00
Shahar Naveh 87289fd904 Update tests with deprecated get_c_recursion_limit (#7039) 2026-02-08 09:59:14 +09:00
ShaharNaveh bff70f957f Remove redundunt test_pickle tests 2026-02-08 08:54:38 +09:00
ShaharNaveh c00ccf7a6c Update test_sort.py from 3.14.3 2026-02-08 08:33:45 +09:00
dependabot[bot] ae260c13fa Bump webpack from 5.94.0 to 5.104.1 in /wasm/example (#7036)
Bumps [webpack](https://github.com/webpack/webpack) from 5.94.0 to 5.104.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack/compare/v5.94.0...v5.104.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.104.1
  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-02-08 00:10:53 +09:00
Shahar Naveh 47f54f19c5 test__all__.py (#7037) 2026-02-07 22:42:10 +09:00
Shahar Naveh f817ab8d07 Bytecode oparg optimization (#7032)
* Generate optimized oparg enums

* No need to match on 255

* Remove `num_enum` crate from `compiler-core`

* Update `Cargo.lock`

* macro fmt

* Rename macro vars

* Match without `,`

* Support alternative values

* Fix alternatives

* Improve docs

* Add const assert

* Don't use `as u32`

* Make only ComparisonOperator unoptimized

* Fix test

* cleanup

* All opargs are optimized

* Remove comment
2026-02-07 19:15:16 +09:00
Shahar Naveh 3d283bb91f Update some libs&tests to 3.14.3 (#7006)
* Update some libs&tests to 3.14.3

* Update argparse from 3.14.3

* Update inspect

* Update `configparser.py` from 3.14.3
2026-02-07 19:09:42 +09:00
CPython Developers 75137f7cdd Update test_import from v3.14.3 2026-02-07 15:13:43 +09:00
Jeong, YunWonandCPython Developers 6b870d62ad Fix traceback, syntax errors, and exception handling (#7015)
* Update codeop from v3.14.3

* Fix traceback, syntax errors, and exception handling

- Improve unclosed bracket detection with "'(' was never closed" message
- Fix IndentationError location to point to end of line
- Implement frame.clear() with proper checks for executing/suspended frames
- Fix exception context chaining for propagated exceptions
- Add traceback.__dir__() and prevent tb_next deletion
- Fix subscript operation source range restoration in compiler
- Change "duplicate parameter" to "duplicate argument" error message
- Refactor duplicate code in asyncgenerator.rs and frame.rs

---------

Co-authored-by: CPython Developers <>
2026-02-07 13:41:45 +09:00
Jeong, YunWon 234bdda40d Refactor warn.rs and _warnings module (#7023)
- Add already_warned() with filter version tracking
- Add type validation for _defaultaction and _onceregistry
- Use direct function names for _warnings pyattr/pyfunction
- Route stdlib::warnings::warn through warn::warn
- Remove spurious EncodingWarning from TextIOWrapper
- Clean up comments and simplify check_matched error handling
- Remove expectedFailure from 3 passing test_warnings tests
2026-02-06 20:46:51 +09:00
Jeong, YunWon 8127000080 Impl more codecs and _codecs._unregister_error (#7025)
- Rewrite _pycodecs.py: escape_decode, charmap_decode,
  unicode_escape_decode/encode, raw_unicode_escape_decode/encode
- Add _codecs._unregister_error with built-in handler protection
  and null byte/surrogate validation
- Normalize encoding name in register_manual
- Add codec error notes via add_note
- Fix cp65001 encoding constant in StandardEncoding::parse
- Remove 35 expectedFailure markers from test_codecs,
  test_pickle, test_datetime, pickletools
2026-02-06 20:37:18 +09:00
dependabot[bot] ea6ab124f4 Bump x509-parser from 0.18.0 to 0.18.1 (#7029)
Bumps [x509-parser](https://github.com/rusticata/x509-parser) from 0.18.0 to 0.18.1.
- [Changelog](https://github.com/rusticata/x509-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rusticata/x509-parser/commits)

---
updated-dependencies:
- dependency-name: x509-parser
  dependency-version: 0.18.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-02-06 18:34:59 +09:00
Jeong, YunWon 6d29b7f684 Refactor _ast module for clarity (#7031)
- Extract singleton_node_to_object() helper for operator/context nodes
- Rename PY_COMPILE_FLAG_AST_ONLY to PY_CF_ONLY_AST
- Rename populate_match_args_and_attributes to populate_repr
- Set _attributes in impl_base_node! no-args variant
- Simplify ast_reduce with .is_some() instead of drop(value)
- Remove _ prefix from used parameters across ast/ files
- Fix slot_new comment to explain why slot_init is called
2026-02-06 17:45:11 +09:00
dependabot[bot] 9596ae3b76 Bump webpki-roots from 1.0.5 to 1.0.6 in the webpki-root group
Bumps the webpki-root group with 1 update: [webpki-roots](https://github.com/rustls/webpki-roots).


Updates `webpki-roots` from 1.0.5 to 1.0.6
- [Release notes](https://github.com/rustls/webpki-roots/releases)
- [Commits](https://github.com/rustls/webpki-roots/compare/v/1.0.5...v/1.0.6)

---
updated-dependencies:
- dependency-name: webpki-roots
  dependency-version: 1.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: webpki-root
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 17:31:46 +09:00
dependabot[bot] 1d5857bf5a Bump criterion from 0.8.1 to 0.8.2 in the criterion group
Bumps the criterion group with 1 update: [criterion](https://github.com/criterion-rs/criterion.rs).


Updates `criterion` from 0.8.1 to 0.8.2
- [Release notes](https://github.com/criterion-rs/criterion.rs/releases)
- [Changelog](https://github.com/criterion-rs/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/criterion-rs/criterion.rs/compare/criterion-v0.8.1...criterion-v0.8.2)

---
updated-dependencies:
- dependency-name: criterion
  dependency-version: 0.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: criterion
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 17:31:33 +09:00
Jeong, YunWon 4f14738a74 [AGENTS] guideline for comments 2026-02-06 14:30:15 +09:00
Padraic Fanning f9686296a9 Add dependency groups to dependabot.yml 2026-02-06 14:20:31 +09:00
dependabot[bot] 40d418e2fc Bump webpack from 5.98.0 to 5.105.0 in /wasm/demo
Bumps [webpack](https://github.com/webpack/webpack) from 5.98.0 to 5.105.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack/compare/v5.98.0...v5.105.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.105.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 12:08:41 +09:00
github-actions[bot] 008ec892c8 Update doc DB for CPython 3.14.3 2026-02-06 12:08:22 +09:00
CPython Developers 951a97e32d Update encodings from v3.14.3 2026-02-06 12:05:17 +09:00
Jeong, YunWon a49ab1911c [doc] fix workflow (#7021) 2026-02-06 11:41:08 +09:00
dependabot[bot]andCopilot b993312365 Bump cranelift-module from 0.128.1 to 0.128.2 (#6992)
* Bump cranelift-module from 0.128.1 to 0.128.2

Bumps [cranelift-module](https://github.com/bytecodealliance/wasmtime) from 0.128.1 to 0.128.2.
- [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-module
  dependency-version: 0.128.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade all cranelift-* packages to 0.128.3 in Cargo.toml (#7017)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-02-06 11:39:50 +09:00
Jeong, YunWon ba462e1223 [AGNETS.md] guide control flow (#7018) 2026-02-06 09:31:55 +09:00