slot_repr now checks the __module__ attribute set by #[pymodule]
at runtime, so explicit module = "..." in #[pystruct_sequence] is
no longer needed for types defined inside a #[pymodule].
- Add sys.call_tracing as func(*args) dispatch
- Add sys._current_exceptions with per-thread exception tracking
via thread_exceptions registry synced on push/pop/set_exception
- Fix f_back to use previous_frame pointer and cross-thread lookup
- Add module="sys" to float_info struct sequence
- Fix sys.exit to unpack tuple args
- Set default stdio_errors to surrogateescape
- Remove noisy __del__ warning in object core
- Add __pointer_type__ getter/setter and StgInfo cache
- Add kept_refs (HashMap-keyed) for c_char_p lifetime
- Simplify ensure_z_null_terminated to 2-value return
- Add RawMemoryBuffer for zero-copy memoryview_at_addr
- Add bitfield support in PyCField with validation
- Add CArgObject offset handling in extract_ptr_from_arg
- Add deprecation warning for _pack_ without _layout_
- Fix comparison TypeError message format
- Fix unsupported binop error message format
- Mark failing CI tests as expectedFailure/skip
after_forkers_child.lock() can deadlock in the forked child
if another thread held the mutex at the time of fork.
Use try_lock and skip at-fork callbacks when the lock is
unavailable, matching the pattern used in after_fork_child
for thread_handles.
- excepthook: call traceback._print_exception_bltin instead of
traceback.print_exception to match PyErr_Display behavior
- run_string: register compiled code in linecache._interactive_cache
so traceback can display source lines and caret indicators
- Remove test_sys_tracebacklimit expectedFailure
* Add compile_bool_op_inner and optimize nested opposite-operator BoolOps to avoid redundant __bool__ calls
When a nested BoolOp has the opposite operator (e.g., `And` inside `Or`),
the inner BoolOp's short-circuit exits are redirected to skip the outer
BoolOp's redundant truth test. This avoids calling `__bool__()` twice on
the same value (e.g., `Test() and False or False` previously called
`Test().__bool__()` twice instead of once).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add snapshot test for nested BoolOp bytecode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add runtime test for redundant __bool__ check (issue #3567)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Apply clippy and rustfmt
* Apply ruff format
* Refactor compile_bool_op: extract emit_short_circuit_test and unify with compile_bool_op_inner
Reduce code duplication by:
- Extracting the repeated Copy + conditional jump pattern into emit_short_circuit_test
- Merging compile_bool_op and compile_bool_op_inner into a single
compile_bool_op_with_target with an optional short_circuit_target parameter
- Keeping compile_bool_op as a thin wrapper for the public interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Relocate redundant __bool__ check test snippet
* Update extra_tests/snippets/syntax_short_circuit_bool.py
* Fix assertion in syntax_short_circuit_bool
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
Add fast path for exact tuple/list (direct length check without
iterator). General path now iterates only size+1 elements,
fixing hang on infinite sequences like __getitem__ without
raising IndexError.
Error messages now include "got N" for tuple, list, and dict.
Remove 7 expectedFailure/skip markers from test_unpack.
- Replace ExceptionStack linked list with Vec for O(1) push/pop
- Introduce FramePtr (NonNull<Py<Frame>>) to avoid Arc clone in frame stack
- Use FramePtr in ThreadSlot for lock-protected cross-thread frame access
- Add resume_gen_frame for lightweight generator/coroutine resume
- Replace Coro.exception PyMutex with PyAtomicRef for lock-free swap
- Add with_frame_exc to support initial exception state for generators
- Use scopeguard for panic-safe cleanup in with_frame_exc/resume_gen_frame
- Add traceback entries in gen_throw delegate/close error paths
- Treat EndAsyncFor and CleanupThrow as reraise in handle_exception
- Update current_frame()/current_globals() to return owned values
- Add ThreadSlot with atomic exception field for sys._current_exceptions()
- Push/pop thread frames in resume_gen_frame for sys._current_frames()
Add _WindowsConsoleIO class to _io module with ReadConsoleW/WriteConsoleW support.
Add _testconsole stdlib module with write_input for console input simulation.
Integrate console detection in io_open to use _WindowsConsoleIO for console handles.
Implement _wmi.exec_query via COM/WMI using pipe+thread
pattern matching _wmimodule.cpp. Uses raw COM vtable calls
for IWbemLocator, IWbemServices, IEnumWbemClassObject, and
IWbemClassObject interfaces.
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).