Selected changesmerged Sep 23, 2026
Added edmonds_blossom_algorithm.py. For maximum matching in the graph. #12043Python · 267 + / 0 −
Introduces 9 new declarations in graphs/edmonds_blossom_algorithm.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
graphs/edmonds_blossom_algorithm.py ↗ · 3 files
@@ -0,0 +1,267 @@+from collections import deque+++class BlossomAuxData:+ """Class to hold auxiliary data during the blossom algorithm's execution."""++ def __init__(+ self,+ queue: deque,+ parent: list[int],+ base: list[int],+ in_blossom: list[bool],+ match: list[int],+ in_queue: list[bool],+ ) -> None:+ """+ Initializes the BlossomAuxData instance.++ Args:+ queue: A deque for BFS processing.+ parent: List of parent vertices in the augmenting path.+ base: List of base vertices for each vertex.+ in_blossom: Boolean list indicating if a vertex is in a blossom.+ match: List of matched vertices.+ in_queue: Boolean list indicating if a vertex is in the queue.+ """+ self.queue = queue+ self.parent = parent+ self.base = base+ self.in_blossom = in_blossom+ self.match = match+ self.in_queue = in_queue+
Add some more verification and safety rules around custom `distDir`TypeScript · 62 + / 0 −
Introduces 3 new declarations in packages/next/src/lib/dist-dir.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
packages/next/src/lib/dist-dir.ts ↗ · 8 files
@@ -0,0 +1,59 @@+import * as path from 'node:path'++export class InvalidDistDirError extends Error {+ constructor(distDir: string, appDir: string, workspaceRoot: string) {+ super(+ `The configured distDir should be inside of the application directory ` ++ `or the workspace containing it, and must not contain the application ` ++ `directory itself:\n\n` ++ ` distDir: ${distDir}\n` ++ ` application: ${appDir}\n` ++ ` workspace root: ${workspaceRoot}\n\n` ++ `Read more: https://nextjs.org/docs/messages/invalid-dist-dir`+ )+ this.name = 'InvalidDistDirError'+ }+}++/** Whether `descendant` is strictly inside `ancestor`. */+// TODO: Account for symlinks when validating containment.+function isStrictlyInside(ancestor: string, descendant: string): boolean {+ const relative = path.relative(path.resolve(ancestor), descendant)+ return (+ relative !== '' &&+ relative !== '..' &&+ !relative.startsWith('..' + path.sep) &&+ !path.isAbsolute(relative)+ )+}++/**+ * Throws unless `distDir` is inside the application or workspace, without+ * containing the application itself.+ */
fix(parser): emit targeted diagnostic for fields inside traitsRust · 54 + / 0 −
Introduces 3 new declarations in compiler/rustc_parse/src/parser/item.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_parse/src/parser/item.rs ↗ · 4 files
@@ -433,6 +441,35 @@ impl<'a> Parser<'a> { } } + fn recover_field_in_trait(&mut self) -> PResult<'a, Option<ItemKind>> {+ let ident_span = self.token.span;+ let ident_str = pprust::token_to_string(&self.token).into_owned();+ let is_self = self.token.is_keyword(kw::SelfLower);++ self.bump(); // identifier or `self`+ self.bump(); // `:`++ let ty_str = match self.parse_ty() {+ Ok(ty) => pprust::ty_to_string(&ty),+ Err(e) => {+ e.cancel();+ String::from("Type")+ }+ };+ // Eat the trailing separator so the parser doesn't trip over it.+ let _ = self.eat(exp!(Comma));+ let _ = self.eat(exp!(Semi));++ let span = ident_span.to(self.prev_token.span);+ let sugg = if is_self {+ diagnostics::FieldNotAllowedInTraitSugg::SelfReceiver { ty: ty_str }+ } else {+ diagnostics::FieldNotAllowedInTraitSugg::Method { ident: ident_str, ty: ty_str }+ };+ let err = self.dcx().create_err(diagnostics::FieldNotAllowedInTrait { span, sugg });+ Err(err)+ }+ fn parse_use_item(&mut self) -> PResult<'a, ItemKind> {
kubelet/devicemanager: preserve in-flight reservations across allocatedDevices rebuildsGo · 268 + / 39 −
Introduces 10 new declarations in pkg/kubelet/cm/devicemanager/pod_devices.go.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
pkg/kubelet/cm/devicemanager/pod_devices.go ↗ · 6 files
@@ -85,15 +116,113 @@ func (pdev *podDevices) insert(podUID, contName, resource string, devices checkp pdev.devs[podUID][contName][resource] = deviceAllocateInfo{ deviceIds: devices, allocResp: resp,+ state: allocationCommitted,+ }+}++// reserve creates an empty reservation for a pod, container and resource. The+// empty entry prevents another allocation for the same owner from starting+// while this one is in flight.+func (pdev *podDevices) reserve(podUID, contName, resource string) bool {+ pdev.Lock()+ defer pdev.Unlock()+ if resources, podExists := pdev.devs[podUID]; podExists {+ if allocations, contExists := resources[contName]; contExists {+ if _, resourceExists := allocations[resource]; resourceExists {+ return false+ }+ }+ }+ if _, podExists := pdev.devs[podUID]; !podExists {+ pdev.devs[podUID] = make(containerDevices)+ }+ if _, contExists := pdev.devs[podUID][contName]; !contExists {+ pdev.devs[podUID][contName] = make(resourceAllocateInfo)+ }+ pdev.devs[podUID][contName][resource] = deviceAllocateInfo{+ deviceIds: checkpoint.NewDevicesPerNUMA(),+ state: allocationReserved,+ }+ return true+}+
ENH: DataFrame.filter and Series.filter to take a boolean masksPython · 289 + / 28 −
Introduces 2 new declarations in pandas/core/generic.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/core/generic.py ↗ · 7 files
@@ -5592,84 +5597,233 @@ def _reindex_with_indexers( def filter( self,- items=None,+ arg=None,+ /, like: str | None = None, regex: str | None = None, axis: Axis | None = None,+ *,+ items=None,+ cond=None,+ na: Literal["raise"] | bool = False, ) -> Self: """- Subset the DataFrame or Series according to the specified index labels.+ Subset the rows or columns according to a boolean mask or the labels. - For DataFrame, filter rows or columns depending on ``axis`` argument.- Note that this routine does not filter based on content.- The filter is applied to the labels of the index.+ Rows (or columns with ``axis=1``) are kept where a boolean mask is+ True, or selected by their labels with ``items``, ``like``, or+ ``regex``. Parameters ----------- items : list-like- Keep labels from axis which are in items.+ arg : callable, expression, or list-like, optional+ Positional-only. A callable or an expression created with+ :func:`pandas.col` is a boolean mask, see ``cond``. Any other+ list-like selects labels, see ``items``. A list-like of booleans