diff --git a/crates/socket-patch-cli/tests/e2e_vex_build/pdm.rs b/crates/socket-patch-cli/tests/e2e_vex_build/pdm.rs index 8de0ef4df..e51a26691 100644 --- a/crates/socket-patch-cli/tests/e2e_vex_build/pdm.rs +++ b/crates/socket-patch-cli/tests/e2e_vex_build/pdm.rs @@ -136,21 +136,26 @@ fn pins_for(v: &str) -> Vec { // 2.26.9+ require 1.x). if ((2, 21, 0)..(2, 26, 1)).contains(&t) { pins.push("hishel<1"); - } else if t >= (2, 26, 1) { - // 2.26.9+ declare an unbounded `hishel>=1.0.0` (2.29.6: + } else if ((2, 26, 1)..(2, 29, 7)).contains(&t) { + // 2.26.9 - 2.29.6 declare an unbounded `hishel>=1.0.0` (2.29.4: // `>=1.4.0`), and hishel 2.0 (2026-11-05) dropped // `SyncSqliteStorage`, so every command dies with "module // 'hishel' has no attribute 'SyncSqliteStorage'". `<2` // resolves the 1.x line those releases shipped against (a // no-op for 2.26.1 - 2.26.8, which already bound `<1`). + // 2.29.7+ require `hishel>=2.0`, so the pin would make them + // uninstallable. pins.push("hishel<2"); } - // 2.x declares an unbounded `unearth`, and unearth 0.19 (2026-10-27) - // moved to `httpx2`: PDM's PyPI client is no longer the `httpx` - // client unearth expects, so `pdm lock` dies with "PDMPyPIClient is - // not an instance or subtype of type (Client)" (seen on 2.29.2). - // `<0.19` resolves the 0.18 line every 2.x ran with before. - pins.push("unearth<0.19"); + // 2.0 - 2.29.3 declare an unbounded `unearth`, and unearth 0.19 + // (2026-10-27) moved to `httpx2`: PDM's PyPI client is no longer the + // `httpx` client unearth expects, so `pdm lock` dies with + // "PDMPyPIClient is not an instance or subtype of type (Client)" + // (seen on 2.29.2). `<0.19` resolves the 0.18 line they ran with. + // 2.29.4+ moved to httpx2 themselves and require `unearth>=0.19`. + if t < (2, 29, 4) { + pins.push("unearth<0.19"); + } } let mut out = vec![format!("pdm=={v}")]; out.extend(pins.into_iter().map(String::from)); diff --git a/scripts/backtest-pdm.py b/scripts/backtest-pdm.py index 1769858e3..cd7142c56 100644 --- a/scripts/backtest-pdm.py +++ b/scripts/backtest-pdm.py @@ -204,17 +204,20 @@ def pins_for(version): # ModuleNotFoundError before locking. if (2, 21) <= v < (2, 26, 1): pins.append("hishel<1") - # 2.26.9+ declare an unbounded `hishel>=1.0.0` (2.29.6: `>=1.4.0`); - # hishel 2.0 (2026-11-05) dropped `SyncSqliteStorage` and every - # command dies with AttributeError. `<2` keeps the 1.x line (a - # no-op for 2.26.1 - 2.26.8, which already bound `<1`). - elif v >= (2, 26, 1): + # 2.26.9 - 2.29.6 declare an unbounded `hishel>=1.0.0` (2.29.4: + # `>=1.4.0`); hishel 2.0 (2026-11-05) dropped `SyncSqliteStorage` + # and every command dies with AttributeError. `<2` keeps the 1.x + # line (a no-op for 2.26.1 - 2.26.8, which already bound `<1`). + # 2.29.7+ require `hishel>=2.0`, so the pin would be unresolvable. + elif (2, 26, 1) <= v < (2, 29, 7): pins.append("hishel<2") - # 2.x declares an unbounded `unearth`; 0.19 (2026-10-27) moved to - # httpx2 and breaks PDM's PyPI client ("PDMPyPIClient is not an - # instance or subtype of type (Client)" on `pdm lock`, seen on - # 2.29.2). `<0.19` resolves the 0.18 line 2.x ran with before. - pins.append("unearth<0.19") + # 2.0 - 2.29.3 declare an unbounded `unearth`; 0.19 (2026-10-27) + # moved to httpx2 and breaks PDM's PyPI client ("PDMPyPIClient is + # not an instance or subtype of type (Client)" on `pdm lock`, seen + # on 2.29.2). `<0.19` resolves the 0.18 line they ran with. 2.29.4+ + # moved to httpx2 themselves and require `unearth>=0.19`. + if v < (2, 29, 4): + pins.append("unearth<0.19") return pins