Selected changesmerged Sep 13, 2026 – Sep 19, 2026
cg_llvm: Move all code out of the crate root Rust · 509 + / 500 −
Introduces 52 new declarations in compiler/rustc_codegen_llvm/src/lib.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
compiler/rustc_codegen_llvm/src/lib.rs ↗ · 10 files
@@ -69,467 +42,3 @@ mod type_of; mod typetree; mod va_arg; mod value;--pub(crate) use macros::TryFromU32;--#[derive(Clone)]-pub struct LlvmCodegenBackend(());--struct TimeTraceProfiler {}--impl TimeTraceProfiler {- fn new() -> Self {- unsafe { llvm::LLVMRustTimeTraceProfilerInitialize() }- TimeTraceProfiler {}- }-}--impl Drop for TimeTraceProfiler {- fn drop(&mut self) {- unsafe { llvm::LLVMRustTimeTraceProfilerFinishThread() }- }-}--impl ExtraBackendMethods for LlvmCodegenBackend {- type Module = ModuleLlvm;-- fn codegen_allocator<'tcx>(- &self,- tcx: TyCtxt<'tcx>,- module_name: &str,- methods: &[AllocatorMethod],- ) -> ModuleLlvm {
fix(cli): preserve double dash before the entrypointRust · 188 + / 0 −
Introduces 8 new declarations in libs/cli_parser/src/tests.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
libs/cli_parser/src/tests.rs ↗ · 3 files
@@ -1195,6 +1214,48 @@ fn eval_print() { assert_eq!(r.get_one("code_arg"), Some("1+1")); } +#[test]+fn eval_double_dash_before_code() {+ let r = parse(+ &TEST_ROOT,+ &svec!["deno", "eval", "--", "-1; console.log(0)", "arg1"],+ )+ .unwrap();+ assert_eq!(r.get_one("code_arg"), Some("-1; console.log(0)"));+ assert_eq!(r.trailing, vec!["arg1"]);+}++#[test]+fn eval_double_dash_before_code_keeps_second_separator() {+ // Only the first `--` is special (mirrors clap): it was consumed to make+ // the positional literal, so a later `--` is forwarded as-is even though+ // eval strips the separator in `deno eval code -- a`.+ let r =+ parse(&TEST_ROOT, &svec!["deno", "eval", "--", "code", "--", "a"]).unwrap();+ assert_eq!(r.get_one("code_arg"), Some("code"));+ assert_eq!(r.trailing, vec!["--", "a"]);+}++#[test]+fn upgrade_double_dash_stays_trailing() {+ // Commands without trailing var args don't enter positional-only mode:+ // `--` still starts (unused) trailing args, as before.+ let r =+ parse(&TEST_ROOT, &svec!["deno", "upgrade", "--", "v1", "v2"]).unwrap();+ assert_eq!(r.get_one("version-or-hash-or-channel"), None);+ assert_eq!(r.trailing, vec!["v1", "v2"]);
Add doctests to DFS and BFS. Contributes to #9943Python · 197 + / 67 −
Reworks 167 lines of existing logic in graphs/directed_and_undirected_weighted_graph.py.
Changes how existing core implementation behaves. Read the linked PR for the surrounding test context.
graphs/directed_and_undirected_weighted_graph.py ↗ · 2 files
@@ -23,53 +36,94 @@ def add_pair(self, u, v, w=1) -> None: self.graph[v] = [] def all_nodes(self):+ """+ Returns list of all nodes in the graph.+ >>> dg = DirectedGraph()+ >>> dg.all_nodes()+ []+ >>> dg.add_pair(1,1)+ >>> dg.all_nodes()+ [1]+ >>> dg.add_pair(2,3,3)+ >>> dg.all_nodes()+ [1, 2, 3]+ """ return list(self.graph) # handles if the input does not exist def remove_pair(self, u, v) -> None:+ """+ Removes all edges u->v if it exists.+ >>> dg = DirectedGraph()+ >>> dg.remove_pair(1,2) # silently exits+ >>> dg.add_pair(0,5,2)+ >>> dg.graph[0]+ [[2, 5]]+ >>> dg.remove_pair(5,0)+ >>> dg.graph[0]+ [[2, 5]]+ >>> dg.remove_pair(0,5)+ >>> dg.graph[0]+ []+ """
ENH: speed up the fixed-width string casts and unicode scalarsC · 16 + / 11 −
Reworks 24 lines of existing logic in numpy/_core/src/multiarray/scalarapi.c.
Changes how existing core implementation behaves. Read the linked PR for the surrounding test context.
numpy/_core/src/multiarray/scalarapi.c ↗ · 3 files
@@ -500,25 +500,30 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) } } if (type_num == NPY_UNICODE) {- /* we need the full string length here, else copyswap will write too- many bytes */- void *buff = PyMem_RawMalloc(descr->elsize);- if (buff == NULL) {- return PyErr_NoMemory();- }- memcpy(buff, data, itemsize);- if (swap) {- byte_swap_vector(buff, itemsize / 4, 4);+ void *buff = NULL;+ const void *ucs4 = data;++ /* only copy when the data cannot be handed to CPython as it is */+ if (swap || !npy_is_aligned(data, NPY_ALIGNOF(Py_UCS4))) {+ buff = PyMem_RawMalloc(descr->elsize);+ if (buff == NULL) {+ return PyErr_NoMemory();+ }+ memcpy(buff, data, itemsize);+ if (swap) {+ byte_swap_vector(buff, itemsize / 4, 4);+ }+ ucs4 = buff; } /* truncation occurs here */- PyObject *u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buff, itemsize / 4);+ PyObject *u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, ucs4, itemsize / 4); PyMem_RawFree(buff); if (u == NULL) {
CLN: Remove unused context manager in groupby codePython · 7 + / 13 −
Reworks 17 lines of existing logic in pandas/core/groupby/groupby.py.
Changes how existing core implementation behaves. Read the linked PR for the surrounding test context.
pandas/core/groupby/groupby.py ↗ · 1 files
@@ -2875,19 +2875,13 @@ def sum_compat(obj: NDFrameT): # GH#18588: see min_compat below return obj.sum(skipna=skipna) - # If we are grouping on categoricals we want unobserved categories to- # return zero, rather than the default of NaN which the reindexing in- # _agg_general() returns. GH #31422- with com.temp_setattr(self, "observed", True):- result = self._agg_general(- numeric_only=numeric_only,- min_count=min_count,- alias="sum",- npfunc=sum_compat,- skipna=skipna,- )-- return result+ return self._agg_general(+ numeric_only=numeric_only,+ min_count=min_count,+ alias="sum",+ npfunc=sum_compat,+ skipna=skipna,+ ) @final def prod(