* Update `_compat_pickle.py` from 3.14.2
* Update `pickle.py` from 3.14.2
* Update pickletools and tests
* Update all other pickle related files
* Make `test_extcall` to use modified doctest checker
* remove duplicated _call_typing_func_object() functions
Move _call_typing_func_object() code to
stdlib::typing::call_typing_func_object().
Use that function everywhere.
* support | operation between typing.Union and strings
Adds support for performing '|' operation between Union objects and
strings, e.g. forward type references.
For example following code:
from typing import Union
U1 = Union[int, str]
U1 | "float"
The result of the operation above becomes:
int | str | ForwardRef('float')
- Add FieldType enum and FIELD_TYPES static table mapping all
AST node classes to their ASDL field types
- Resolve markers to real Python type objects (GenericAlias,
Union, plain types) at module init in populate_field_types()
- Set class-level None defaults for optional fields
- Replace hardcoded LIST_FIELDS and class-name checks in
slot_init with _field_types-based lookup
- Add expr_context default to Load(), fix ImportFrom.level
default (now None instead of 0)
- Fix __class_getitem__ None check, compile() formatting
- Remove 14 @expectedFailure decorators from test_ast
GC bit operations (_PyObject_GC_TRACK/UNTRACK equivalent):
- Add set_gc_bit() helper for atomic GC bit manipulation
- Add set_gc_tracked() / clear_gc_tracked() methods
- Update is_gc_tracked() to use GcBits::TRACKED flag
- Call set_gc_tracked() in track_object()
- Call clear_gc_tracked() for static types (they are immortal)
tp_clear infrastructure (for breaking reference cycles):
- Add try_clear_obj() function to call payload's try_clear
- Add clear field to PyObjVTable
- Add clear() method to PyType's Traverse impl
- Fix heap type instance traversal to include type reference
(enables correct cycle detection for instance ↔ type references)
- Enable mro traversal in PyType (was previously disabled)
- Extract empty_arguments_object helper from expression.rs
- Fix LIST_FIELDS ambiguity: "args" and "body" have different
ASDL types per node (e.g. Lambda.args is `arguments`, not
`expr*`; Lambda.body is `expr`, not `stmt*`)
- Replace class name string comparison in compile() with
fast_isinstance to accept AST subclasses
- Rewrite faulthandler with live frame walking via
Frame.previous AtomicPtr chain and thread-local
CURRENT_FRAME (AtomicPtr) instead of frame snapshots
- Add signal-safe traceback dumping (dump_live_frames,
dump_frame_from_raw) walking the Frame.previous chain
- Add safe_truncate/dump_ascii for UTF-8 safe string
truncation in signal handlers
- Refactor write_thread_id to accept thread_id parameter
- Add SA_RESTART for user signal registration, SA_NODEFER
only when chaining
- Save/restore errno in faulthandler_user_signal
- Add signal re-entrancy guard in trigger_signals to
prevent recursive handler invocation
- Add thread frame tracking (push/pop/cleanup/reinit)
with force_unlock fallback for post-fork recovery
- Remove expectedFailure markers for now-passing tests