Selected changesmerged Nov 23, 2026 – Nov 29, 2026
fix: Apply Plotly relayouts and restyles sent before renderTypeScript · 173 + / 8 −
Introduces 3 new declarations in panel/models/plotly.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
panel/models/plotly.ts ↗ · 3 files
@@ -79,6 +79,99 @@ const decodeUndefined = (obj: any): any => { return obj } +type PlotlyUpdate = {[key: string]: unknown}++/**+ * A relayout, or a restyle of a single trace, sent before the plot rendered.+ * Applied in order once plotted, they leave the plot as it would be had they+ * been applied as they arrived.+ */+type PendingUpdate = {kind: "relayout", data: PlotlyUpdate} | {kind: "restyle", trace: number, data: PlotlyUpdate}++const is_descendant = (key: string, of: string): boolean => {+ return key.startsWith(`${of}.`) || key.startsWith(`${of}[`)+}++const parent_path = (key: string): string => {+ const index = Math.max(key.lastIndexOf("."), key.lastIndexOf("["))+ return index < 0 ? "" : key.slice(0, index)+}++/**+ * The array an item-level key such as `annotations[0]` writes to. Plotly+ * treats such a write as an insert (or, with null, a removal) that shifts+ * the items after it, so it is never superseded and orders later writes.+ */+const item_array = (key: string): string | null => {+ return key.endsWith("]") ? key.slice(0, key.lastIndexOf("[")) : null+}++const within = (key: string, path: string): boolean => key == path || is_descendant(key, path)++/**
models: add MiniCPM5 MoE supportC++ · 238 + / 0 −
Introduces 3 new declarations in src/models/minicpm5-moe.cpp.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/models/minicpm5-moe.cpp ↗ · 10 files
@@ -0,0 +1,221 @@+#include "models.h"++void llama_model_minicpm5_moe::load_arch_hparams(llama_model_loader & ml) {+ if (hparams.n_embd_head_k_full != hparams.n_embd_head_v_full) {+ throw std::runtime_error("MiniCPM5 MoE requires equal key and value head sizes");+ }++ 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);+ ml.get_key(LLM_KV_EXPERT_WEIGHTS_NORM, hparams.expert_weights_norm);+ ml.get_key(LLM_KV_EXPERT_GATING_FUNC, hparams.expert_gating_func, false);++ if (hparams.expert_gating_func == LLAMA_EXPERT_GATING_FUNC_TYPE_NONE) {+ hparams.expert_gating_func = LLAMA_EXPERT_GATING_FUNC_TYPE_SIGMOID;+ }+ type = LLM_TYPE_UNKNOWN;+}++void llama_model_minicpm5_moe::load_arch_tensors(llama_model_loader &) {+ LLAMA_LOAD_LOCALS;+ const int64_t n_expert_shared = hparams.n_expert_shared;++ tok_embd = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, 0);++ // output+ 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}, TENSOR_NOT_REQUIRED);++ // if output is NULL, init from the input tok embed+ if (output == NULL) {
TST: fix flaky memory growth testsPython · 47 + / 20 −
Introduces 5 new declarations in numpy/testing/_private/utils.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
numpy/testing/_private/utils.py ↗ · 3 files
@@ -2924,24 +2924,42 @@ def run_subprocess(cmd, cwd=None, **kwargs): return res +def run_function_with_args_in_subprocess(func, *args):+ """Call ``func(*args)`` in a new Python subprocess, failing the test if+ it raises.++ ``func`` must be a module-level function and ``args`` must survive a+ round trip through `repr`.+ """+ import pytest++ if not HAS_SUBPROCESSES:+ pytest.skip("requires subprocesses")+ location = (func.__module__,+ getattr(sys.modules[func.__module__], "__file__", None),+ func.__qualname__)+ code = ("from numpy.testing._private.utils import _load_function; "+ f"_load_function(*{location!r})(*{args!r})")+ run_subprocess([sys.executable, "-c", code])++ def run_with_memory_limit(func, make_args, limit): """Fail the test if any call needs more than ``limit`` bytes of address space beyond what the process already uses. ``make_args()`` returns a mapping of labels to argument tuples, and ``func(*args)`` runs for each of them. Both run in a fresh subprocess, so they must be module-level functions, and each call runs in its own forked- child of that subprocess. Runs on Linux and on arm64 macOS 26 or later.+ child of that subprocess. Runs on Linux only. """ import pytest
ENH: add sum/prod/mean/median/std/var/sem/skew/kurt to Index (GH#50021)Python · 578 + / 5 −
Introduces 12 new declarations in pandas/core/indexes/base.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/core/indexes/base.py ↗ · 5 files
@@ -8323,6 +8331,554 @@ def max( nanops.nanmax(self._values, skipna=skipna), object_with_dtype=self ) + @final+ def _validate_numpy_reduction(+ self,+ name: str_t,+ validate: Callable[..., None],+ axis: AxisInt | None,+ numpy_kwargs: dict[str_t, Any],+ **op_kwargs: Any,+ ) -> Any:+ """+ Validate numpy-compat arguments, or return the deprecated numpy result.++ Returns ``lib.no_default`` when the caller should compute its own result.+ """+ if numpy_kwargs["out"] is lib.no_default:+ # numpy always passes ``out``, so this is a direct call+ numpy_kwargs["out"] = None+ else:+ result = self._deprecated_numpy_reduction(+ name, axis, numpy_kwargs, **op_kwargs+ )+ if result is not lib.no_default:+ return result+ validate((), numpy_kwargs, fname=name)+ nv.validate_minmax_axis(axis)+ return lib.no_default++ @final+ def _deprecated_numpy_reduction(+ self,
make `ReturnsVisitor` more accurate Rust · 56 + / 27 −
Introduces 3 new declarations in compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs ↗ · 3 files
@@ -6915,51 +6915,80 @@ impl<'v> Visitor<'v> for SelfVisitor<'v> { #[derive(Default)] pub struct ReturnsVisitor<'v> { pub returns: Vec<&'v hir::Expr<'v>>,- in_block_tail: bool,+ /// The set of items in tail position that can be targeted with a break (loops and blocks).+ /// A break to such an item is a return.+ break_targets_in_tail_position: FxHashSet<HirId>, } impl<'v> Visitor<'v> for ReturnsVisitor<'v> { fn visit_expr(&mut self, ex: &'v hir::Expr<'v>) {- // Visit every expression to detect `return` paths, either through the function's tail- // expression or `return` statements. We walk all nodes to find `return` statements, but- // we only care about tail expressions when `in_block_tail` is `true`, which means that- // they're in the return path of the function body. match ex.kind {- hir::ExprKind::Ret(Some(ex)) => {- self.returns.push(ex);+ hir::ExprKind::Ret(Some(val)) => self.returns.push(val),+ hir::ExprKind::Break(dest, Some(val)) if let Ok(id) = dest.target_id => {+ // If this is a break to a block/loop in tail position, this is a return.+ if self.break_targets_in_tail_position.contains(&id) {+ self.returns.push(val)+ }+ }+ hir::ExprKind::Become(_) => {+ // A become is like a return, but for diagnostics it is not useful to treat it as+ // one. Often suggestions will break the tail call. }- hir::ExprKind::Block(block, _) if self.in_block_tail => {- self.in_block_tail = false;+ _ => {}+ }
perf: Mount ReactComponent roots in batchesTypeScript · 74 + / 9 −
Introduces 3 new declarations in panel/models/react_component.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
panel/models/react_component.ts ↗ · 3 files
@@ -899,6 +903,71 @@ function uses_emotion(libs: ReactLibs): boolean { return libs.createCache != null && libs.CacheProvider != null } +// React renders each root in a scheduler task of its own and yields to the+// browser every 5ms, so when many roots mount at once, e.g. one per widget in+// a large layout, only a few mount per frame and the browser restyles and+// repaints the whole page for every one of those frames. Mounts are instead+// queued and flushed synchronously in batches, yielding once a batch has run+// for MOUNT_BUDGET ms.+const MOUNT_BUDGET = 50+let pending_mounts: (() => void)[] = []+let mount_channel: MessageChannel | null = null++function flush_mounts(): void {+ const start = performance.now()+ let i = 0+ while (i < pending_mounts.length && performance.now() - start < MOUNT_BUDGET) {+ try {+ pending_mounts[i++]()+ } catch (e) {+ // Errors raised while rendering used to surface from React's own task,+ // so they are re-raised without holding up the remaining mounts.+ queueMicrotask(() => { throw e })+ }+ }+ pending_mounts = pending_mounts.slice(i)+ if (pending_mounts.length > 0) {+ mount_channel!.port2.postMessage(null)+ }+}++function queue_mount(mount: () => void): void {+ if (mount_channel == null) {
url: add experimental URLPatternListC++ · 537 + / 25 −
Introduces 3 new declarations in src/node_url_pattern.cc.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/node_url_pattern.cc ↗ · 14 files
@@ -662,6 +701,363 @@ void URLPattern::HasRegexpGroups(const FunctionCallbackInfo<Value>& info) { info.GetReturnValue().Set(url_pattern->HasRegExpGroups()); } +namespace {+// Processes `input` and `base_url` as the URLPattern "match" algorithm does+// before it runs the component regular expressions, mirroring+// ada::url_pattern::match(). Returns errors::type_error where "match" throws,+// and std::nullopt where it returns null.+// https://urlpattern.spec.whatwg.org/#url-pattern-match+ada::result<std::optional<URLPatternList::Components>> ProcessMatchInput(+ const ada::url_pattern_input& input, const std::string_view* base_url) {+ URLPatternList::Components components;++ if (const auto* init = std::get_if<ada::url_pattern_init>(&input)) {+ if (base_url != nullptr) {+ return tl::unexpected(ada::errors::type_error);+ }+ auto processed =+ ada::url_pattern_init::process(*init,+ ada::url_pattern_init::process_type::url,+ "",+ "",+ "",+ "",+ "",+ "",+ "",+ "");+ if (!processed) {+ return std::nullopt;+ }+ components.protocol = std::move(processed->protocol).value_or("");+ components.username = std::move(processed->username).value_or("");
sqlite: enforce permission model on file accessC++ · 847 + / 15 −
Introduces 11 new declarations in src/node_sqlite_vfs.cc.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/node_sqlite_vfs.cc ↗ · 9 files
@@ -0,0 +1,671 @@+#include "node_sqlite_vfs.h"++#include "env-inl.h"+#include "path.h"+#include "permission/permission.h"++#include <algorithm>+#include <atomic>+#include <cctype>+#include <cstring>+#include <string>+#include <string_view>+#include <utility>++namespace node {+namespace sqlite {++namespace {++std::atomic<uint64_t> next_vfs_id{0};++bool IsSidecarPath(std::string_view path, std::string* database_path) {+ constexpr std::string_view suffixes[] = {"-journal", "-wal", "-shm"};+ for (const std::string_view suffix : suffixes) {+ if (path.size() > suffix.size() && path.ends_with(suffix)) {+ *database_path = path.substr(0, path.size() - suffix.size());+ return true;+ }+ }++ // SQLite names super-journals as <database>-mjXXXXXX9XX, where X is a hex+ // digit (see pagerIsSuperJrnlName()). A permission granted for the+ // database also covers its super-journal.
Turbopack: diff server HMR pulls against a Rust-owned loaded-module setRust · 666 + / 505 −
Introduces 44 new declarations in crates/next-api/src/aggregate_hmr.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
crates/next-api/src/aggregate_hmr.rs ↗ · 27 files
@@ -199,321 +422,251 @@ impl CompilationEvent for ServerHmrChunkListDiffEvent { } } -async fn diff_chunks_against(- chunk_lists: &[ServerHmrChunkList],- from: &ServerHmrChunkListVersion,-) -> Result<DiffResult> {- let current_chunk_list_paths = chunk_lists- .iter()- .map(|chunk_list| &chunk_list.relative_path)- .collect::<FxIndexSet<_>>();- let has_removed_chunk_lists = from- .versions_by_chunk_list_path- .keys()- .any(|path| !current_chunk_list_paths.contains(path));- let mut has_new_chunk_lists = false;- let chunk_updates = chunk_lists- .iter()- .filter_map(- |ServerHmrChunkList {- relative_path,- versioned_content,- }| {- if *TRACE_DIFFING {- turbo_tasks().send_compilation_event(Arc::new(ServerHmrChunkListDiffEvent {- chunk_list_path: relative_path.clone(),- }));- }- let Some(prev) = from.versions_by_chunk_list_path.get(relative_path).cloned()- else {- has_new_chunk_lists = true;- return None;- };
TST: fix incorrect memory growth testPython · 23 + / 12 −
Introduces 4 new declarations in numpy/testing/_private/utils.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
numpy/testing/_private/utils.py ↗ · 3 files
@@ -3079,30 +3079,41 @@ def growth(): tracemalloc.stop() -def assert_memory_growth_below(func, limit, repeat=10):+def assert_memory_growth_below(func, limit, repeat=10, make_args=None): """Fail if more than ``limit`` bytes are still allocated after calling ``func()`` ``repeat`` times. ``func`` is called once before the measurement starts. It runs in a- new subprocess, so it must be a module-level function.+ new subprocess, so it must be a module-level function. If ``make_args``+ is given, it must be a module-level function too. It is called once in+ the subprocess before the measurement starts and returns a tuple of+ arguments that is passed to every call of ``func``. """ import pytest # not available on PyPy pytest.importorskip("tracemalloc")- location = (func.__module__,- getattr(sys.modules[func.__module__], "__file__", None),- func.__qualname__)+ locations = [+ None if f is None else (+ f.__module__,+ getattr(sys.modules[f.__module__], "__file__", None),+ f.__qualname__)+ for f in (func, make_args)] run_function_with_args_in_subprocess(- _assert_memory_growth_below, location, limit, repeat)+ _assert_memory_growth_below, *locations, limit, repeat)
[CC] Allow scheduling sequential tasks via setImmediateTypeScript · 229 + / 1 −
Introduces 3 new declarations in packages/next/src/server/app-render/app-render-scheduling/immediate-scheduler.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
packages/next/src/server/app-render/app-render-scheduling/immediate-scheduler.ts ↗ · 20 files
@@ -0,0 +1,165 @@+import { InvariantError } from '../../../shared/lib/invariant-error'+import { unpatchedSetImmediate } from '../../node-environment-extensions/fast-set-immediate.external'+import type { SequentialTaskScheduler } from './types'++let hasBadSetImmediate = false++function warnAboutSetImmediate() {+ console.warn(+ "Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setImmediate()`.\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/"+ )+}++const enum ExecutionState {+ Before = 1,+ ScheduledTasks = 2,+ ExecutingTasks = 3,+ Finished = 4,+}++type Execution = {+ state: ExecutionState+ pendingTimeout: NodeJS.Timeout | null+}++/**+ * Allows scheduling multiple tasks that are guaranteed to run in the same iteration of the event loop.+ * Conceptually equivalent to calling `setImmediate(cb)` for each callback.+ *+ * @param tasks - the callbacks to run. NOTE: the array is cleared after tasks are executed or aborted.+ * */+export const scheduleSequentialTasks: SequentialTaskScheduler = (+ tasks,+ signal
feat(asr): Triton kernel for the sequence-packed relative-position attentionPython · 1130 + / 66 −
Introduces 35 new declarations in nemo/collections/asr/parts/triton/rel_pos_attention.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
nemo/collections/asr/parts/triton/rel_pos_attention.py ↗ · 12 files
@@ -0,0 +1,914 @@+# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.++"""Transformer-XL self-attention over sequence-packed activations, with dropout on the attention weights.++The utterances of a batch are concatenated along the token axis;+``seq_starts`` and ``seq_lens`` say where each one lies, so gaps between them are allowed,+and a program of the kernels never reads or writes a row outside its utterance.+Queries, keys and values have shape ``(T_total, H, D)``.+The score of query position ``i`` and key position ``j`` of one utterance is+``scale * q_i . k_j + scale * pos_query_i . pos_emb[c - (i - j)]`` with ``c = max_seqlen - 1``,+the convention of ``RelPositionMultiHeadAttention`` (``rel_shift`` selects the same entries in the padded forward).++The position term ``(T_total, H, 2 * max_seqlen - 1)`` is computed from ``pos_query`` and ``pos_emb``+inside the custom ops, in the forward and again in the backward,+so it is never saved for the backward and no layer retains one;+the kernels read it through 64-bit offsets,+since ``H * T_total * (2 * max_seqlen - 1)`` passes 2**31 at large packed batches.+Its buffer is ``(H, T_total, R)`` with ``R`` rounded up to a multiple of eight,+because an odd leading dimension sends the GEMMs to slow unaligned kernels;+the kernels take the strides of the ``(T_total, H, R)`` view.