Selected changesmerged Oct 21, 2026
BUG: str regex \w, \d, \s and \b only matching ASCII for pyarrow-backed stringsPython · 79 + / 44 −
Introduces 5 new declarations in pandas/core/arrays/_arrow_string_mixins.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/core/arrays/_arrow_string_mixins.py ↗ · 5 files
@@ -64,48 +77,72 @@ def _has_unsupported_regex(pat: str | re.Pattern[str]) -> bool: Returns -------- bool- Whether `pat` contains a lookahead or lookbehind.+ list[tuple[Any, Any]]+ The nodes of `pat`, or an empty list if Python's ``re`` cannot+ parse it. """- try:- # error: Module "re" has no attribute "_parser"- from re import _parser # type: ignore[attr-defined]+ _parser = ArrowStringArrayMixin._re_parser()+ repeats = {_parser.MAX_REPEAT, _parser.MIN_REPEAT, _parser.POSSESSIVE_REPEAT} - regex_parser = _parser.parse- except Exception as err:- raise type(err)(- "Incompatible version for regex; you will need to upgrade pandas "- "or downgrade Python"- ) from err-- def has_unsupported_code(tokens):- # For certain op codes we need to recurse.+ def walk(tokens): for op_code, argument in tokens:- if (- (- op_code == _parser.SUBPATTERN- and has_unsupported_code(argument[3])- )- or (- op_code == _parser.BRANCH
MIR move elimination [4/6]: MoveEliminationRust · 959 + / 36 −
Introduces 41 new declarations in compiler/rustc_mir_transform/src/move_elimination.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_mir_transform/src/move_elimination.rs ↗ · 36 files
@@ -0,0 +1,911 @@+//! Eliminates copies and moves by unifying MIR places whose allocation ranges+//! are disjoint.+//!+//! See RFC 3943 for the local-lifetime semantics that make this optimization+//! possible.+//!+//! # Motivation+//!+//! MIR building can insert a lot of redundant copies, and Rust code in general+//! often tends to move values around a lot. The result is a lot of assignments+//! of the form `dest = {move} src;` in MIR. MIR building for constants in+//! particular tends to create additional locals that are only used inside a+//! single block to shuffle a value around unnecessarily.+//!+//! Additionally, Rust constructs nested aggregates by repeatedly moving values+//! into fields. For example, a function may build an inner value in a local,+//! move it into an outer aggregate, then move that aggregate into the caller's+//! destination. If these intermediate source and destination places have+//! different addresses, each layer needs an actual copy or move of the bytes.+//!+//! LLVM cannot remove these copies when both the source and destination+//! addresses are observed because merging the allocations would be an+//! observable change: the program could see that two addresses which were+//! previously distinct have become the same. This pass removes the copies+//! earlier, while MIR still has the information needed to prove that the two+//! allocation ranges do not overlap.+//!+//! # Optimization+//!+//! The basis of this optimization is place unification. If the source and+//! destination of an assignment have the same address, then the assignment is a+//! no-op. The same idea applies to aggregate construction: if a field operand+//! is already located at the corresponding field of the destination, then the
turbo-tasks-backend: restore invalidated tasks with batched optional readsRust · 418 + / 38 −
Introduces 25 new declarations in turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs ↗ · 4 files
@@ -2104,6 +2202,280 @@ mod must_exist_tests { assert!(!tt.backend().storage.access_mut(id).flags.meta_restored()); } }++ /// Runs [`ExecuteContext::for_each_try_task_all`] and returns the ids handed to the callback.+ fn try_tasks(tt: &TurboTasks<TurboTasksBackend>, ids: &[TaskId]) -> Vec<TaskId> {+ let mut ctx = ExecuteContext::new(tt.backend(), tt);+ let mut seen = Vec::new();+ ctx.for_each_try_task_all(ids.iter().copied(), "try tasks", |guard, _| {+ seen.push(guard.id())+ });+ seen+ }++ fn has_entry(tt: &TurboTasks<TurboTasksBackend>, id: TaskId) -> bool {+ tt.backend().storage.with_task(id, |_| ()).is_some()+ }++ fn assert_unpinned(tt: &TurboTasks<TurboTasksBackend>, id: TaskId) {+ assert_eq!(+ tt.backend()+ .storage+ .with_task(id, |t| t.gc_transient_ref_count()),+ Some(0)+ );+ }++ #[tokio::test(flavor = "multi_thread")]+ async fn try_tasks_resident_handed_off() {+ let tt = backend();+ let present = persistent(1);+ let transient = TaskId::new(TRANSIENT_TASK_BIT | 2).unwrap();+ resident(&tt, present, TaskDataCategory::All);
models: Add Flint model (FlintForCausalLM)C++ · 234 + / 5 −
Introduces 3 new declarations in src/models/flint.cpp.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/models/flint.cpp ↗ · 18 files
@@ -0,0 +1,194 @@+#include "models.h"++void llama_model_flint::load_arch_hparams(llama_model_loader & ml) {+ ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps);+ ml.get_key(LLM_KV_LEADING_DENSE_BLOCK_COUNT, hparams.n_layer_dense_lead);+ ml.get_key_or_arr(LLM_KV_EXPERT_FEED_FORWARD_LENGTH, hparams.n_ff_exp_arr, hparams.n_layer_all);+ ml.get_key(LLM_KV_EXPERT_SHARED_COUNT, hparams.n_expert_shared);+ ml.get_key(LLM_KV_EXPERT_WEIGHTS_SCALE, hparams.expert_weights_scale, false);+ ml.get_key(LLM_KV_EXPERT_WEIGHTS_NORM, hparams.expert_weights_norm);+ ml.get_key(LLM_KV_EXPERT_GATING_FUNC, hparams.expert_gating_func);++ ml.get_key(LLM_KV_EXPERT_SHARED_FEED_FORWARD_LENGTH, hparams.n_ff_shexp);+ ml.get_arr(LLM_KV_ATTENTION_SLIDING_WINDOW_PATTERN, hparams.is_swa_impl);+ ml.get_arr(LLM_KV_ATTENTION_ROPE_PATTERN, hparams.rope_pattern);+ ml.get_key(LLM_KV_ATTENTION_SLIDING_WINDOW, hparams.n_swa);+ hparams.swa_type = LLAMA_SWA_TYPE_STANDARD;+ type = LLM_TYPE_UNKNOWN;+}++void llama_model_flint::load_arch_tensors(llama_model_loader &) {+ LLAMA_LOAD_LOCALS;++ const int64_t n_ff_exp = hparams.n_ff_exp();++ tok_embd = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, 0);++ output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, 0);+ output = create_tensor(tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab}, 0);++ for (int i = 0; i < n_layer; ++i) {+ auto & layer = layers[i];++ layer.attn_norm = create_tensor(tn(LLM_TENSOR_ATTN_NORM, "weight", i), {n_embd}, 0);
Unify watch event filtering into dedicated structGo · 43 + / 33 −
Introduces 3 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go ↗ · 4 files
@@ -1276,29 +1274,41 @@ func forgetWatcher(c *Cacher, w *cacheWatcher, index int, selector watchSelector } } -func filterWithAttrsAndPrefixFunction(prefix string, p storage.SelectionPredicate, recursive bool, groupResource schema.GroupResource) filterWithAttrsFunc {- return func(objKey string, label labels.Set, field fields.Set, obj runtime.Object) bool {- if recursive {- if !key.HasPathPrefix(objKey, prefix) {- return false- }- } else if objKey != prefix {- return false- }- if !p.MatchesObjectAttributes(label, field) {- return false- }- matches, err := p.MatchesSharding(obj)- if err != nil {- utilruntime.HandleError(fmt.Errorf("shard matching failed for %v: %w", groupResource, err))- return false- }- if !matches {- metrics.RecordWatchFilteredEvent(groupResource)+type watchEventFilter struct {+ prefix string+ opts storage.ListOptions+ groupResource schema.GroupResource+}++func newWatchEventFilter(prefix string, opts storage.ListOptions, groupResource schema.GroupResource) watchEventFilter {+ return watchEventFilter{+ prefix: prefix,+ opts: opts,+ groupResource: groupResource,