Sync with upstream#4
Merged
reactive-firewall merged 285 commits intoreactive-firewall:mainfrom Feb 11, 2026
Merged
Conversation
* [update_lib] fix async detection * Update test_exceptions from v3.14.2 * Update test_except_star from v3.14.2 * Update test_exception_hierarchy from v3.14.2 * Update test_exception_variations from v3.14.2 * Auto-format: ruff format --------- Co-authored-by: CPython Developers <> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Update `symtable` from 3.14.2
- Fix from_windows_err using new_exception_empty on OSError subclasses (ConnectionRefusedError, ConnectionAbortedError), which caused segfault in release builds due to debug_assert on type size mismatch - Move ConnectPipe from instance method to module-level function - Add Destructor for Overlapped to cancel pending I/O on object cleanup - Add NMPWAIT_NOWAIT, NMPWAIT_USE_DEFAULT_WAIT, NMPWAIT_WAIT_FOREVER constants to _winapi
* Simplify upgrade-pylib.md by removing manual copy steps handled by quick command * Let upgrade-pylib run auto-mark instead marking manually * Let upgrade-pylib a separate commit from updating module * Correct commands' permissions * Add open PR check to upgrade-pylib-next command * Fix dependency pattern example in upgrade-pylib-next command * Let upgrade-pylib command to invetigate failing tests * Add pre-commit review to invetigate-test-failure command * Use deps command to get dependent tests in upgrade-pylib workflow
* Add f_trace_opcodes Needed for bdb, and, by extension, pdb, to work. * Fix compile error
--------- Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
* slot_del * refcount inc_by for atomicity * temp patch multithreading * apply review
* Update test_coroutines from v3.14.2-288-g06f9c8ca1c * Mark expected failures on Linux --------- Co-authored-by: CPython Developers <>
Update `test__locale` from v3.14.2
* gc module internal structure and API Add gc_state module with GcState, GcGeneration, GcDebugFlags, GcStats. Replace gc module stubs with working API backed by gc_state. Add gc_callbacks and gc_garbage to Context. Add is_gc_tracked, gc_finalized, gc_get_referents to PyObject. Collection is stubbed (returns 0) — actual algorithm to follow. * fix dict/weakref/generators * unmark test_asyncio * apply review
descriptor.rs: - Add __objclass__, __name__ (pymember) and __reduce__ (pymethod) - Add type check (descr_check) in descr_get; simplify None branch - Remove incorrect BASETYPE flag - Add MemberKind::Object (_Py_T_OBJECT = 6) - Prevent Bool slot deletion (TypeError) - Raise AttributeError on ObjectEx deletion when already None pyclass.rs (derive-impl): - Remove duplicate MemberKind enum; use MemberKindStr (Option<String>) - Simplify MemberNursery map key from (String, MemberKind) to String - Support #[pymember(type="object")] for _Py_T_OBJECT semantics test_inspect.py: - Remove expectedFailure from test_getdoc (now passing)
Update `test_fork1` from v3.14.2
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.
… data (#7058) * [update_lib] fix hard_dep not to unclude other tests * [update_lib] commit test data
* `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
* 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
- 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
Update test_errno,test_iter from v3.14.3
Update `support.__init__.py` from 3.14.3
Update `test_array.py` from 3.14.3
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.7.6 to 2.8.0. - [Commits](BurntSushi/memchr@2.7.6...2.8.0) --- updated-dependencies: - dependency-name: memchr dependency-version: 2.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [psm](https://github.com/rust-lang/stacker) from 0.1.29 to 0.1.30. - [Commits](https://github.com/rust-lang/stacker/commits) --- updated-dependencies: - dependency-name: psm dependency-version: 0.1.30 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
For example in the following code:
def foo(x: int, y: float):
def bar(q: int):
return q
pass
Make sure that `foo` type annotations are correctly propogated to
it's `__annotate__` and `__annotations__` attributes.
With this chage, we'll get:
>>>>> foo.__annotations__
{'x': <class 'int'>, 'y': <class 'float'>}
Previously annotations where 'lost', and we would get:
>>>>> foo.__annotations__
{}
Update test_memoryview from v3.14.3 and impl count/index
Add `source_path: AtomicPtr<PyStrInterned>` field to `PyCode` for interior mutability, replacing the UB-inducing `#[allow(invalid_reference_casting)]` + `write_volatile` pattern in `update_code_filenames`. Use atomic load/store instead of a mutex since the operation is a simple pointer swap on a 'static reference. Update all read sites to use `source_path()` accessor.
* Implement TypeAliasType, type annotations, and genericalias fixes - TypeAliasType: lazy value evaluation via closures, __module__, __parameters__, __iter__, evaluate_value, check_type_params, IMMUTABLETYPE flag, Hashable/AsMapping/Iterable traits - TypeAliasType constructor: positional-or-keyword arg validation, duplicate/unexpected kwarg rejection - type.__annotations__ setter: distinguish None assignment from deletion - Annotation scope: name as __annotate__, format as positional-only, __conditional_annotations__ uses Cell for both load and store - Compiler: proper TypeParams/TypeAlias scope with closures, find_ann covers match/try-except handlers - symboltable: deduplicate TypeAlias value scope code - GenericAlias repr: handle list args, avoid deadlock in repr_arg by cloning items before calling repr - AST types: remove IMMUTABLETYPE (heap types, mutable) - pymodule macro: preserve existing __module__ getset descriptors * Update typing from v3.14.3 * Implement TypeAliasType, type annotations, and genericalias fixes - TypeAliasType: lazy value evaluation via closures, __module__, __parameters__, __iter__, evaluate_value, check_type_params, IMMUTABLETYPE flag, Hashable/AsMapping/Iterable traits - TypeAliasType constructor: positional-or-keyword arg validation, duplicate/unexpected kwarg rejection - type.__annotations__ setter: distinguish None assignment from deletion - Annotation scope: name as __annotate__, format as positional-only, __conditional_annotations__ uses Cell for both load and store - Compiler: proper TypeParams/TypeAlias scope with closures, find_ann covers match/try-except handlers - symboltable: deduplicate TypeAlias value scope code - GenericAlias: implement gaiterobject (generic_alias_iterator), starred equality comparison, starred pickle via iterator reduce, split attr_exceptions/attr_blocked for correct __dir__, make_parameters/subs_parameters handle list/tuple args recursively, repr_arg indexed access for mutation safety - AST types: remove IMMUTABLETYPE (heap types, mutable) - pymodule macro: preserve existing __module__ getset descriptors --------- Co-authored-by: CPython Developers <>
Wait for module initialization to complete when a module is already in sys.modules but still being initialized by another thread. Check __spec__._initializing and call _lock_unlock_module to block until the import finishes.
…#7077) * Replace `once_cell` with `std::sync::OnceLock`/`core::cell::OnceCell` - Replace `once_cell::sync::{Lazy, OnceCell}` with `std::sync::{LazyLock, OnceLock}` - Replace `once_cell::unsync::{Lazy, OnceCell}` with `core::cell::{LazyCell, OnceCell}` - Inline `get_or_try_init` at call sites (unstable in std as of 1.93) - Replace `OnceCell::with_value()` with `OnceCell::from()` in codecs.rs - Remove `once_cell` direct dependency from common and vm crates * Auto-format: cargo fmt --all --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
just a PR to sync with upstream