5 Commits

Author SHA1 Message Date
Jeong, YunWon
5530855436 Make __hello_only__ a frozen-only alias of __hello__ (#7160)
Remove __hello_only__.py source file and its symlink. Register
__hello_only__ as a frozen module alias reusing __hello__ bytecode,
matching the behavior where origname is None (no source file).
2026-02-15 22:25:28 +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
02cc257b42 Support pickle better with __getnewargs_ex__ (#6749)
* Implement pickle more

* add weakref check

* check exports in __setstate__

* remove reducelib
2026-01-17 18:37:16 +09:00
Jeong, YunWon
79cd048e1f native ExceptionGroup (#6358) 2025-12-09 23:02:44 +09:00
Shahar Naveh
8968aeafb9 Move vm -> crates/vm (#6269) 2025-11-15 21:51:33 +09:00