From 9f288b9f5af4db7da03eb3c790b7d572c90c0144 Mon Sep 17 00:00:00 2001 From: youknowdot Date: Sun, 25 Oct 2026 22:13:46 -0700 Subject: [PATCH] Enable rustyline read-ahead buffer preservation (#9382) Enable buffer-redux on the workspace rustyline dependency and add its locked buffer-redux 1.1.0 dependency. Keep existing dependency versions and checksums, including nix, libc and rustix, unchanged. RustPython retains a rustyline Editor across interactive prompts. On Unix, this feature lets a successful readline submission save unread buffered input for the next read instead of dropping the old reader's buffer. This is based on the source call chain, not a runtime reproduction. Assisted-by: OpenAI Codex:model version unavailable --- Cargo.lock | 10 ++++++++++ Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 9df79f764..c1831e7ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -448,6 +448,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "buffer-redux" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "431a9cc8d7efa49bc326729264537f5e60affce816c66edf434350778c9f4f54" +dependencies = [ + "memchr", +] + [[package]] name = "bumpalo" version = "3.20.3" @@ -4209,6 +4218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53f6a737db68eb1a8ccff86b584b2fc13eca6a7bb6f78ebc7c529547e3ab9684" dependencies = [ "bitflags 2.13.2", + "buffer-redux", "cfg-if", "clipboard-win", "home", diff --git a/Cargo.toml b/Cargo.toml index 516f8e4e0..3d9c17534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -296,7 +296,7 @@ rustls-graviola = "0.4" rustls-native-certs = "0.8" rustls-pemfile = "2.2" rustls-webpki = { version = "0.103", default-features = false, features = ["std"] } -rustyline = "18" +rustyline = { version = "18", features = ["buffer-redux"] } serde = { package = "serde_core", version = "1.0.225", default-features = false, features = ["alloc"] } schannel = "0.1.29" scopeguard = "1"