Daily edition

Oct 2, 2026

The edition exactly as it was published. Nothing here is re-selected on a later reading.

Oct 3, 20265 reads · 175 merged PRs screened

framework internals

kubernetes/kubernetes · #142522

Files changed →View PR ↗

cacher: stream watch cache snapshots without an item sliceGo · 47 + / 43 −

Introduces 7 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go.

Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.

staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go ↗ · 4 files

@@ -250,55 +266,46 @@ type snapshotCacheIntervalSource struct { 	buffer *watchCacheIntervalBuffer } -func (s *snapshotCacheIntervalSource) Next() (*watchCacheEvent, error) {+func (s *snapshotCacheIntervalSource) next() (*watchCacheEvent, error) { 	event, exists := s.buffer.next() 	if !exists { 		return nil, nil 	} 	return event, nil } +func (s *snapshotCacheIntervalSource) All() iter.Seq2[*watchCacheEvent, error] {+	return eventsFromNext(s.next)+}+ // lazySnapshotCacheIntervalSource serves events from an immutable snapshot.-// The snapshot reference is captured under the watchCache lock, but the O(N)-// traversal that materializes the events is deferred until the first Next()-// call so that it runs off the watchCache lock.+// The snapshot reference is captured under the watchCache lock, while its+// contents are traversed one event at a time after releasing that lock. type lazySnapshotCacheIntervalSource struct { 	// snapshot is an immutable point-in-time copy of the store. 	snapshot store.Snapshot 	// resourceVersion is assigned to every watchCacheEvent produced by this source. 	resourceVersion uint64-	// loaded indicates whether items has been materialized from the snapshot.-	loaded bool-	// items holds the result of OrderedListPrefix, populated on the first Next() call-	items []interface{}-	// currentIndex tracks the current position within items.-	currentIndex int

language design

rust-lang/rust · #163461

Files changed →View PR ↗

Improve diagnostic deduplicationRust · 103 + / 27 −

Introduces 8 new declarations in compiler/rustc_errors/src/dedup_hash.rs.

Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.

compiler/rustc_errors/src/dedup_hash.rs ↗ · 10 files

@@ -0,0 +1,63 @@+use std::hash::Hash;++use rustc_data_structures::stable_hash::StableHasher;+use rustc_serialize::Encoder;+use rustc_span::def_id::{CrateNum, DefId, DefIndex};+use rustc_span::{ByteSymbol, ExpnId, Span, SpanEncoder, Symbol, SyntaxContext};++/// Hasher used to determine if two diagnostics are the same and should be deduplicated. Used by+/// `DiagCtxtInner::emitted_diagnostics`. It's a stable hash with one special behaviour: parents of+/// spans within the diagnostics are ignored so that incremental and non-incremental compilation+/// get the same behaviour.+///+/// Although this has nothing to do with encoding data to/from file, it is implemented on top of+/// `Encoder`/`SpanEncoder` because they provide traversals of all the relevant types used within+/// diagnostics. There is no corresponding decoder.+pub(crate) struct DedupHashEncoder(pub(crate) StableHasher);++macro_rules! encoder_methods {+    ($($name:ident($ty:ty);)*) => {+        $(+            #[inline]+            fn $name(&mut self, value: $ty) {+                value.hash(&mut self.0)+            }+        )*+    }+}++impl Encoder for DedupHashEncoder {+    encoder_methods! {+        emit_usize(usize);+        emit_u128(u128);+        emit_u64(u64);

language design

vercel/next.js · #98589

Files changed →View PR ↗

Add React Compiler memoization preservation optionRust · 142 + / 27 −

Introduces 9 new declarations in turbopack/crates/turbopack-ecmascript/src/transform/mod.rs.

Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.

turbopack/crates/turbopack-ecmascript/src/transform/mod.rs ↗ · 10 files

@@ -690,6 +708,41 @@ mod react_compiler_tests {      use super::*; +    #[test]+    fn preserves_default_environment_without_explicit_option() {+        let options = react_compiler_options(+            "production",+            "input.js",+            ReactCompilerTransformOptions::default(),+            ReactCompilerTarget::React19,+        );++        assert!(+            options+                .environment+                .enable_preserve_existing_memoization_guarantees+        );+    }++    #[test]+    fn forwards_explicit_memoization_preservation_option() {+        let options = react_compiler_options(+            "production",+            "input.js",+            ReactCompilerTransformOptions {+                compilation_mode: ReactCompilerCompilationMode::Infer,+                enable_preserve_existing_memoization_guarantees: Some(false),+            },+            ReactCompilerTarget::React19,+        );++        assert!(+            !options

language design

pandas-dev/pandas · #68926

Files changed →View PR ↗

BUG: astype/construction from float to datetime64 is an unchecked narrowingPython · 83 + / 9 −

Introduces 3 new declarations in pandas/core/dtypes/astype.py.

Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.

pandas/core/dtypes/astype.py ↗ · 9 files

@@ -162,6 +173,38 @@ def astype_float_to_int_nansafe(         return values.astype(dtype, copy=copy)  +def float_outside_int64(values: np.ndarray) -> np.ndarray:+    """+    Mask of floats that a narrowing to int64 would alias to NaT or saturate.+    """+    # NaN compares False both ways. float(iNaT) is admitted and round-trips+    #  to NaT, matching cast_from_unit_vectorized.+    return (values >= np.float64(2**63)) | (values < np.float64(iNaT))+++def raise_if_float_outside_int64(+    values: np.ndarray, dtype: np.dtype, mask: np.ndarray | None = None+) -> None:+    """+    Reject floats that a cast to the given datetime64/timedelta64 dtype would+    alias to NaT or saturate to an in-bounds-looking value.++    Entries where ``mask`` is True are ignored.+    """+    unit, step = np.datetime_data(dtype)+    if step != 1 or unit == "generic":+        # unitless and multiplier dtypes are rejected regardless of the values+        #  (multiplier: GH#25611), so the saturated value never surfaces+        return+    oob = float_outside_int64(values)+    if mask is not None:+        oob &= ~mask+    if oob.any():+        bad = values[oob][0]+        err = OutOfBoundsDatetime if dtype.kind == "M" else OutOfBoundsTimedelta+        raise err(f"cannot convert input {bad} with the unit '{unit}'")

core implementation

holoviz/panel · #8787

Files changed →View PR ↗

fix: Keep notebook stylesheets inline after updatesPython · 36 + / 11 −

Introduces 2 new declarations in panel/io/notebook.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

panel/io/notebook.py ↗ · 5 files

@@ -513,19 +513,31 @@ def __init__(self, mimebundle):     def _repr_mimebundle_(self, include=None, exclude=None):         return self._mimebundle -def replace_inline_css(stylesheet: ImportedStyleSheet):+def replace_inline_css(+    stylesheet: ImportedStyleSheet, cache: dict[str, InlineStyleSheet] | None = None+) -> ImportedStyleSheet | InlineStyleSheet:     if not stylesheet.url.startswith(CDN_DIST):         return stylesheet-    path = DIST_DIR / stylesheet.url.replace(CDN_DIST, '').split('?')[0]  # type: ignore+    url = stylesheet.url.split('?')[0]+    if cache is not None and url in cache:+        return cache[url]+    path = DIST_DIR / url.replace(CDN_DIST, '')  # type: ignore     if not path.exists():         return stylesheet-    return InlineStyleSheet(css=path.read_text(encoding='utf-8'))--def patch_inline_stylesheets(model: UIElement):+    inlined = InlineStyleSheet(css=path.read_text(encoding='utf-8'))+    if cache is not None:+        cache[url] = inlined+    return inlined++def patch_inline_stylesheets(model: UIElement, doc: Document | None = None):+    doc = doc or model.document+    # Registering the Document makes later updates, which re-resolve+    # stylesheets to CDN urls, inline them too (see Reactive._resolve_stylesheets).+    cache = None if doc is None else state._inline_stylesheets.setdefault(doc, {})     stylesheets = []     for sts in model.stylesheets:         if isinstance(sts, ImportedStyleSheet):-            sts = replace_inline_css(sts)

Read today’s edition →