Selected changesmerged Oct 13, 2026
Add scripts/find_and_fix_pep798.pyPython · 245 + / 0 −
Introduces 13 new declarations in scripts/find_and_fix_pep798.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
scripts/find_and_fix_pep798.py ↗ · 3 files
@@ -0,0 +1,245 @@+#!/usr/bin/env -S uv run --script+#+# /// script+# requires-python = ">=3.13"+# dependencies = []+# ///++"""+Find (and optionally fix) opportunities to use PEP 798 in Python source files.++PEP 798 allows unpacking inside comprehensions and generator expressions:+https://peps.python.org/pep-0798/++The following flattening patterns are detected:++ [y for x in xs for y in x] -> [*x for x in xs]+ {y for x in xs for y in x} -> {*x for x in xs}+ (y for x in xs for y in x) -> (*x for x in xs)+ {k: v for d in ds for k, v in d.items()} -> {**d for d in ds}++Only the simplest, always-equivalent forms are rewritten: exactly two ``for``+clauses, no ``async``, and no ``if`` filter on the inner clause. Nested+candidates are fixed innermost first; re-run the script to catch any leftovers.+The rewritten source uses Python 3.15+ syntax, so fixed files need 3.15+.++Usage:+ scripts/find_and_fix_pep798.py [--fix] PATH [PATH ...]++Without ``--fix`` the script only reports and exits with status 1 if any+opportunities were found.+"""++import argparse
validate generic parameter remapping in delegationRust · 117 + / 37 −
Introduces 9 new declarations in compiler/rustc_hir_analysis/src/delegation.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_hir_analysis/src/delegation.rs ↗ · 6 files
@@ -23,46 +23,65 @@ struct ParamIndexRemapper<'tcx> { tcx: TyCtxt<'tcx>, remap_table: RemapTable, delegation_parent_consts: FxHashSet<ty::ParamConst>,+ arg_kinds: Vec<ty::GenericArgKind<'tcx>>, } -impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ParamIndexRemapper<'tcx> {+impl<'tcx> ParamIndexRemapper<'tcx> {+ fn try_remap(+ &self,+ source_index: u32,+ expected_kind: ty::GenericArgKind<'tcx>,+ ) -> Result<u32, ()> {+ self.remap_table+ .get(&source_index)+ .copied()+ .filter(|&idx| {+ self.arg_kinds.get(idx as usize).is_some_and(|kind| {+ std::mem::discriminant(&expected_kind) == std::mem::discriminant(kind)+ })+ })+ .ok_or(())+ }+}++impl<'tcx> ty::FallibleTypeFolder<TyCtxt<'tcx>> for ParamIndexRemapper<'tcx> {+ type Error = ();+ fn cx(&self) -> TyCtxt<'tcx> { self.tcx } - fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
Turbopack: improve segment config parsingRust · 271 + / 96 −
Introduces 8 new declarations in crates/next-core/src/segment_config.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
crates/next-core/src/segment_config.rs ↗ · 19 files
@@ -157,30 +202,113 @@ impl NextSegmentConfig { Ok(()) } let Self {+ rsc, dynamic, dynamic_params, revalidate,+ max_duration, fetch_cache, runtime, preferred_region,- ..+ // TODO what about these?+ instant: _,+ prefetch: _,+ ensure_static: _,+ // Don't need merging+ middleware_matcher: _,+ unstable_allow_dynamic: _,+ generate_image_metadata: _,+ generate_sitemaps: _,+ generate_static_params: _, } = self;+ // Carry the leaf page's RSC classification up through its loader-tree branch. Unlike route+ // segment config, classifications in different parallel branches are not conflicts.+ *rsc = (*rsc).or(parallel_config.rsc); merge_parallel(dynamic, ¶llel_config.dynamic, "dynamic")?; merge_parallel( dynamic_params, ¶llel_config.dynamic_params, "dynamicParams", )?; merge_parallel(revalidate, ¶llel_config.revalidate, "revalidate")?;
Add Kolibri 1Python · 951 + / 0 −
Introduces 61 new declarations in src/transformers/models/kolibri1/modeling_kolibri1.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/models/kolibri1/modeling_kolibri1.py ↗ · 12 files
@@ -0,0 +1,599 @@+# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨+# This file was automatically generated from src/transformers/models/kolibri1/modular_kolibri1.py.+# Do NOT edit this file manually as any edits will be overwritten by the generation of+# the file from the modular. If any change should be done, please apply the change to the+# modular_kolibri1.py file directly. One of our CI enforces this.+# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨+# Copyright 2026 The HuggingFace Inc. team. All rights reserved.+#+# 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.++from collections.abc import Callable++import torch+import torch.nn.functional as F+from torch import nn++from ... import initialization as init+from ...activations import ACT2FN+from ...cache_utils import Cache, DynamicCache+from ...generation import GenerationMixin+from ...integrations import use_experts_implementation, use_kernel_forward_from_hub+from ...masking_utils import create_causal_mask, create_sliding_window_causal_mask+from ...modeling_flash_attention_utils import FlashAttentionKwargs
Fix notebook resources on RequireJS pages when the public CDNs are unreachableJavaScript · 314 + / 62 −
Introduces 11 new declarations in panel/_templates/autoload_panel_js.js.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
panel/_templates/autoload_panel_js.js ↗ · 7 files
@@ -39,6 +39,70 @@ calls it with the rendered model. return !live_notebook && index !== -1 ? CDN_DIST + url.slice(index + JUPYTER_EXTENSION_PATH.length) : url; } + // Pending until this bootstrap has loaded everything (or given up), so+ // that output rendered meanwhile can wait for Panel's models.+ let bootstrap_resolve;+ const bootstrap = new Promise((resolve) => { bootstrap_resolve = resolve });+ root.__panel_bootstrap__ = bootstrap;+ function bootstrap_done() {+ if (root.__panel_bootstrap__ === bootstrap) {+ root.__panel_bootstrap__ = null;+ }+ bootstrap_resolve();+ }+ setTimeout(bootstrap_done, Math.max({{ timeout|default(0)|json }}, 15000));++ // jupyter_bokeh, which renders Panel output for comms='ipywidgets' and in+ // VS Code, builds a view as soon as its output arrives, so a notebook run+ // top to bottom can render before BokehJS has loaded or before panel.js+ // has registered the models the view needs. Both the classic notebook and+ // VS Code load jupyter_bokeh through RequireJS, so its fetch is held until+ // the bootstrap is done, and should it already be loaded, ipywidgets+ // awaits render(), which is held instead.+ function hold_bokeh_views(module) {+ const View = module?.BokehView;+ if (View == null || View.prototype.__panel_hold__ === true) {+ return;+ }+ const render = View.prototype.render;+ View.prototype.render = function(...args) {+ const pending = root.__panel_bootstrap__;+ return pending == null ? render.apply(this, args) : pending.then(() => render.apply(this, args));+ };