Daily edition

Nov 21, 2026

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

Nov 22, 20265 reads · 55 merged PRs screened

language design

pandas-dev/pandas · #72260

Files changed →View PR ↗

PERF: don't build the engine in Index.is_monotonic_* to check its typePython · 40 + / 18 −

Introduces 2 new declarations in pandas/core/indexes/base.py.

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

pandas/core/indexes/base.py ↗ · 5 files

@@ -5459,21 +5463,39 @@ def _get_engine_target(self) -> ArrayLike:             elif pa.types.is_duration(pa_type):                 vals = vals._to_timedeltaarray()                 return vals._ndarray.view("i8")-        if (-            type(self) is Index-            and isinstance(vals, ExtensionArray)-            and not isinstance(vals, BaseMaskedArray)-            and not (-                isinstance(vals, ArrowExtensionArray)-                and is_numeric_dtype(self.dtype)-                # Exclude decimal-                and self.dtype.kind != "O"-            )-        ):-            # TODO(ExtensionIndex): remove special-case, just use self._values+        if self._engine_target_is_object_cast:             return vals.astype(object)         return vals +    @final+    @cache_readonly+    def _engine_target_is_object_cast(self) -> bool:+        """+        Whether _get_engine_target casts our ExtensionArray to an object ndarray.++        Lets callers tell whether the engine would be an object engine without+        building it.+        """+        vals = self._values+        if (+            type(self) is not Index+            or not isinstance(vals, ExtensionArray)+            or isinstance(vals, (BaseMaskedArray, StringArray))

language design

react/react · #37591

Files changed →View PR ↗

[Ledgers] Implement captureLedgers on the serverJavaScript · 256 + / 19 −

Introduces 12 new declarations in packages/react-server/src/ReactFlightServer.js.

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

packages/react-server/src/ReactFlightServer.js ↗ · 9 files

@@ -1120,10 +1130,83 @@ export function addToLedger(type: Ledger<empty>, entry: mixed): void { function createRequestLedgers(): RequestLedgers {   return {     dirtyUnits: [],-    declaredTypes: null,+    declarations: null,   }; } +// Give the captured input its own unit so its writes can be distinguished+// from the surrounding render. The wrapper itself is omitted from the output.+function outlineLedgerData(+  request: Request,+  task: Task,+  data: LedgerDataObject<ReactClientValue>,+): ReactJSONValue {+  const ledgers = ensureRequestLedgers(request);+  const totals = [];+  for (let i = 0; i < data.totals.length; i++) {+    totals.push(ensureLedgerTotalDeclared(request, ledgers, data.totals[i]));+  }+  const input = data.input;+  if (+    input !== null &&+    typeof input === 'object' &&+    // Reuse is only safe when the surrounding component keys don't affect+    // how the input is serialized.+    task.keyPath === null &&+    !task.implicitSlot+  ) {+    const existingEntry = request.writtenObjects.get(input);+    if (existingEntry !== undefined) {+      // The data is already serialized, but this capture still needs a unit+      // to associate the reused work's ledger writes with this position.

framework internals

vercel/next.js · #101254

Files changed →View PR ↗

[image-optimizer] Add experimental support for @next/safe-image-optimizationTypeScript · 366 + / 12 −

Introduces 7 new declarations in packages/next/src/server/image-optimizer/nsio.ts.

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

packages/next/src/server/image-optimizer/nsio.ts ↗ · 20 files

@@ -0,0 +1,105 @@+// nsio (`@next/safe-image-optimization`) is an alternative to sharp, enabled by+// `experimental.imgOptSafeMode`.+//+// This module is imported by `transform.ts`, which runs in a child process, so+// keep its imports minimal. nsio itself is only required when it's used.+import type { Pool } from '@next/safe-image-optimization'+import { GIF, JPEG, PNG, WEBP } from './image-type'+import {+  NSIO_INPUT_FORMATS,+  NSIO_OUTPUT_MIME_TYPES,+} from '../../shared/lib/image-optimizer-constants'++let _pool: Pool | undefined++function getPool(+  concurrency: number | null | undefined,+  logger: { warnOnce(message: string): void } | undefined+): Pool {+  if (!_pool) {+    try {+      const { Pool } =+        require('@next/safe-image-optimization') as typeof import('@next/safe-image-optimization')+      // `Pool` rejects `0`, but sharp treats it as "use the default", so match+      // that+      _pool = new Pool({ concurrency: concurrency || undefined })+    } catch (error) {+      // The caller falls back to the unoptimized image without logging, so+      // warn here, or a misconfiguration (e.g. no worker binary for this+      // platform) would go unnoticed+      logger?.warnOnce(+        `Failed to initialize "@next/safe-image-optimization" for "experimental.imgOptSafeMode", images will not be optimized: ${error}`+      )+      throw error

framework internals

kubernetes/kubernetes · #144133

Files changed →View PR ↗

apiserver/cacher: deliver all events that share a resourceVersionGo · 67 + / 1 −

Introduces 1 new declaration in staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.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/testing/watcher_tests.go ↗ · 6 files

@@ -385,6 +387,61 @@ func RunTestDeleteTriggerWatch(ctx context.Context, t *testing.T, store storage. 	testCheckEventType(t, w, watch.Deleted) } +// RunTestWatchMultiKeyTransaction checks that an open watch gets every event of+// one etcd transaction. These events share a resourceVersion.+func RunTestWatchMultiKeyTransaction(ctx context.Context, t *testing.T, store storage.Interface, client *clientv3.Client) {+	const namespace = "multi-key-transaction"+	var lastPod *example.Pod+	want := sets.New[string]()+	for i := range 5 {+		_, lastPod = testPropagateStore(ctx, t, store, &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: fmt.Sprintf("pod-%d", i), Namespace: namespace}})+		want.Insert(lastPod.Name)+	}+	w, err := store.Watch(ctx, "/pods/"+namespace, storage.ListOptions{ResourceVersion: lastPod.ResourceVersion, Predicate: storage.Everything, Recursive: true})+	if err != nil {+		t.Fatalf("Watch failed: %v", err)+	}+	defer w.Stop()++	resp, err := client.Get(ctx, "/", clientv3.WithPrefix(), clientv3.WithKeysOnly())+	if err != nil {+		t.Fatalf("Get failed: %v", err)+	}+	var deletes []clientv3.Op+	for _, kv := range resp.Kvs {+		if strings.Contains(string(kv.Key), "/pods/"+namespace+"/") {+			deletes = append(deletes, clientv3.OpDelete(string(kv.Key)))+		}+	}+	if len(deletes) != want.Len() {+		t.Fatalf("Expected %d keys in etcd, got %d", want.Len(), len(deletes))+	}+	if _, err := client.Txn(ctx).Then(deletes...).Commit(); err != nil {

runtime

nodejs/node · #67422

Files changed →View PR ↗

repl: redraw highlighted input once per chunkJavaScript · 54 + / 1 −

Reworks 33 lines of existing logic in lib/internal/readline/interface.js.

Changes how existing runtime behaves. Tests changed with it, with code of their own.

lib/internal/readline/interface.js ↗ · 3 files

@@ -502,7 +506,40 @@ class Interface extends InterfaceConstructor {     return this.historyManager.addHistory(this[kIsMultiline], this[kLastCommandErrored]);   } +  [kFlushPendingRefresh]() {+    if (this[kRefreshPending]) {+      this[kRefreshLine]();+    }+  }++  // Performance optimization for pasted input. Input arrives in chunks: each+  // 'data' event from the input stream may carry many characters at once (a+  // paste often does), and emitKeypressEvents() turns a chunk into one+  // keypress per character, with isCompletionEnabled set to false for all but+  // the chunk's last character. Redrawing a colorized line on every one of+  // those keypresses makes pasting quadratic, so plain characters inserted in+  // the middle of a chunk only update the line buffer and leave a redraw+  // pending, and the chunk's last keypress redraws the line.+  // Returns true if this keypress inserts a plain character into a colorized+  // line. Such a keypress either leaves the redraw pending or, as the last+  // keypress of a chunk, redraws the whole line itself, so it does not need a+  // pending redraw to be flushed first. Any other keypress must flush the+  // pending redraw before it writes to the output.+  [kWillDeferRefresh](s, key) {+    if (this[kColorize] === undefined) return false;+    if (typeof s !== 'string' || s === '' || key?.ctrl || key?.meta) {+      return false;+    }+    const name = key?.name;+    if (name === 'tab') {+      // Tab triggers completion instead of inserting when completion is on.+      return typeof this.completer !== 'function' || !this.isCompletionEnabled;+    }+    return name === undefined || name.length === 1 || name === 'space';

Read today’s edition →