Selected changesmerged Oct 9, 2026
ENH: sniff sep=None with the C engine in read_csv (GH#9645)Python · 105 + / 9 −
Introduces 5 new declarations in pandas/io/parsers/readers.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/io/parsers/readers.py ↗ · 7 files
@@ -3643,3 +3689,53 @@ def _validate_skipfooter(kwds: dict[str, Any]) -> None: raise ValueError("'skipfooter' not supported for iteration") if kwds.get("nrows"): raise ValueError("'skipfooter' not supported with 'nrows'")+++def _iter_physical_lines(+ handle: IO[Any], chunks: list[bytes | str], lineterminator: str | None+) -> Iterator[bytes | str]:+ """+ Yield each line of ``handle`` without its terminator, appending every chunk+ read to ``chunks``.+ """+ eol: re.Pattern[Any] | None = None+ partial: list[Any] = []+ skip_lf = False+ while True:+ chunk = handle.read(_SNIFF_CHUNK_SIZE)+ if not chunk:+ tail = partial[0][:0].join(partial) if partial else ""+ if tail:+ yield tail+ return+ chunks.append(chunk)+ if eol is None:+ pattern = re.escape(lineterminator) if lineterminator else r"\r\n|\r|\n"+ eol = re.compile(pattern.encode() if isinstance(chunk, bytes) else pattern)+ start = 0+ if skip_lf and chunk[:1] in (b"\n", "\n"):+ # the second half of a "\r\n" split across chunks+ start = 1+ for match in eol.finditer(chunk, start):+ partial.append(chunk[start : match.start()])+ yield chunk[:0].join(partial)
MIR move elimination [3/6]: PreciseLivenessRust · 646 + / 1 −
Introduces 41 new declarations in compiler/rustc_mir_dataflow/src/impls/precise_liveness.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_mir_dataflow/src/impls/precise_liveness.rs ↗ · 21 files
@@ -0,0 +1,596 @@+//! Computes the points where each local must have a distinct allocation.+//!+//! The result is a [`SparseIntervalMatrix`] with one row per local. Two locals+//! may share the same address only if their rows are disjoint. To model MIR+//! statements where a source operand and destination place may share an+//! address, each statement and terminator is split into an early point, where+//! operands are read, and a late point, where destinations are written.+//!+//! A local live range starts at the late point of any statement or terminator+//! that writes to it without a `Deref` projection. It ends at `StorageLive` or+//! `StorageDead`, or at the early point of a whole-local move operand or the+//! last use of that local on a control-flow path (only for locals whose address+//! is never observed). This happens at `StorageLive` because it resets a local+//! to an uninitialized state.+//!+//! `Call` terminators are handled specially: move operands are kept live+//! through the late point of the terminator so they conflict with each other+//! and with the destination place. This matches the runtime behavior where the+//! place is donated to the callee for the duration of the call.+//!+//! The analysis consists of three passes:+//!+//! 1. A backward value-liveness analysis which identifies the last point at+//! which each local is directly used in each control flow path. This is used+//! to shorten the lifetime of unborrowed locals to their last use.+//! 2. A forward allocation-liveness analysis which uses that information+//! together with writes, moves, and storage markers to compute which+//! allocations may be live on entry to each block.+//! 3. A final walk using those entry states which constructs the matrix and+//! distinguishes whether each effect happens at the early or late point of a+//! statement or terminator.++use rustc_index::IndexVec;
turbopack: report an actionable error when Node.js child processes cannot connectRust · 168 + / 6 −
Introduces 18 new declarations in turbopack/crates/turbopack-node/src/evaluate.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbopack-node/src/evaluate.rs ↗ · 11 files
@@ -769,3 +826,76 @@ impl Issue for EvaluationIssue { Some(self.source) } }++/// Node.js child processes could not connect back to the parent process, which+/// makes it impossible to run any Node.js code (webpack loaders, PostCSS, ...).+#[turbo_tasks::value(shared)]+pub struct NodeJsConnectIssue {+ /// The source being transformed when the connection failed. The failure is+ /// unrelated to its contents, but this tells the user which transform hit it.+ pub source: IssueSource,+ /// What was being evaluated, e.g. the loader chain.+ pub crash_context: Option<RcStr>,+ /// Error output of the child process, describing why the connection failed.+ pub stderr: RcStr,+}++#[async_trait]+#[turbo_tasks::value_impl]+impl Issue for NodeJsConnectIssue {+ fn severity(&self) -> IssueSeverity {+ IssueSeverity::Error+ }++ async fn title(&self) -> Result<StyledString> {+ Ok(StyledString::Text(rcstr!(+ "Node.js worker processes could not connect to Turbopack"+ )))+ }++ fn stage(&self) -> IssueStage {+ IssueStage::Transform+ }
Refactor apiserver_resource_size_estimate_bytes metric and apiserver_resource_objects to have a timestampGo · 134 + / 25 −
Introduces 9 new declarations in staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/timestamped_resource_gauge_collector.go.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/timestamped_resource_gauge_collector.go ↗ · 4 files
@@ -0,0 +1,110 @@+/*+Copyright The Kubernetes Authors.++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.+*/++package metrics++import (+ "sync"+ "time"++ "k8s.io/apimachinery/pkg/runtime/schema"+ compbasemetrics "k8s.io/component-base/metrics"+ "k8s.io/utils/clock"+)++type timestampedResourceGaugeCollector struct {+ compbasemetrics.BaseStableCollector++ desc *compbasemetrics.Desc+ clock clock.PassiveClock+
Second phase of torch 2.6 cleanupsPython · 19 + / 108 −
Reworks 41 lines of existing logic in src/transformers/masking_utils.py.
Changes how existing core implementation behaves. Tests changed with it, with code of their own.
src/transformers/masking_utils.py ↗ · 20 files
@@ -523,21 +517,14 @@ def sdpa_mask( # Expand the mask to match batch size and query length if they weren't used in the mask function attention_mask = attention_mask.expand(batch_size, -1, q_length, kv_length) - # Option 2: Vmap mask creation (torch>=2.6 and custom patterns)- elif _is_torch_greater_or_equal_than_2_6:+ # Option 2: Vmap mask creation (custom patterns)+ else: # This creates the 4D mask easily. Note that we need this context manager as vmap cannot handle slicing a tensor from # scalar tensor (it internally calls `.item()` which vmap does not allow, but this context works around it # We don't need to add an offset to the mask_function either, as we vmap directly the correct indices for k and kv indices with TransformGetItemToIndex(): attention_mask = _vmap_expansion_sdpa(mask_function)(batch_arange, head_arange, q_arange, kv_arange) - # Option 3: Error out since it indicates that the user did something custom, which they shouldn't have (torch<2.6)- else:- raise ValueError(- "The vmap functionality for mask creation is only supported from torch>=2.6. "- "Please update your torch version or use `use_vmap=False` with index-based masks."- )- return attention_mask