Repository navigation
fix(config): route Python packages to explicit registries - #15082
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change adds Python registry package routes, validates route ownership, selects registries exclusively by package, records routes in lockfile inputs, and adds coverage for dependencies, build dependencies, fallback prevention, and lockfile invalidation. ChangesPython registry package routing
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant WorkspaceConfig
participant PythonRegistryRoute
participant PythonInstaller
participant PythonIndex
participant LockfileInputs
WorkspaceConfig->>PythonRegistryRoute: Parse and validate package patterns
PythonRegistryRoute->>PythonInstaller: Provide validated routes
PythonInstaller->>PythonIndex: Select registry for package
PythonIndex-->>PythonInstaller: Return one registry URL
PythonInstaller->>LockfileInputs: Store registry package mappings
Merge Risk: ⚪ Minimal · up to Registry routing preserves Python package-name normalization, and no concrete merge-blocking risk remains. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15082 +/- ##
==========================================
+ Coverage 91.17% 91.18% +0.01%
==========================================
Files 1333 1334 +1
Lines 179125 179289 +164
==========================================
+ Hits 163316 163485 +169
+ Misses 15809 15804 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4683655480399995,
"stddev": 0.12446805491748901,
"median": 2.4286349432399996,
"user": 1.6014784800000001,
"system": 1.9859683799999999,
"min": 2.32263899824,
"max": 2.70711843424
},
{
"command": "pacquet@main",
"mean": 2.4079821404399997,
"stddev": 0.10628130658295591,
"median": 2.37727734174,
"user": 1.60597258,
"system": 1.8726861799999999,
"min": 2.2863004392399997,
"max": 2.61980171724
},
{
"command": "pnpr@HEAD",
"mean": 1.4625490020399998,
"stddev": 0.07421697347598488,
"median": 1.46569228274,
"user": 1.63639078,
"system": 1.88605168,
"min": 1.36077314524,
"max": 1.5961852822400002
},
{
"command": "pnpr@main",
"mean": 1.49668410284,
"stddev": 0.140872182798577,
"median": 1.4492743252400002,
"user": 1.6268660799999999,
"system": 1.9435591799999998,
"min": 1.3487857382400001,
"max": 1.73560164824
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31066264288,
"stddev": 0.024140471804297483,
"median": 0.30758486178,
"user": 0.32820756,
"system": 0.6703752000000001,
"min": 0.27299878678,
"max": 0.34679116178
},
{
"command": "pacquet@main",
"mean": 0.31160612988,
"stddev": 0.02310176535164607,
"median": 0.31282679578,
"user": 0.32882876,
"system": 0.7063875,
"min": 0.27446042978,
"max": 0.34614862478
},
{
"command": "pnpr@HEAD",
"mean": 0.33952912638000005,
"stddev": 0.017256684059757374,
"median": 0.33452657927999996,
"user": 0.36032546,
"system": 0.6776003000000002,
"min": 0.32270730978,
"max": 0.37419485578
},
{
"command": "pnpr@main",
"mean": 0.36248453968,
"stddev": 0.028575346363397536,
"median": 0.36818103428,
"user": 0.38130316,
"system": 0.7099629000000001,
"min": 0.31940032077999997,
"max": 0.39631249478
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009556865713059361,
"stddev": 0.0015607291580939193,
"median": 0.00943529364,
"user": 0.005635447305936077,
"system": 0.004523330776255707,
"min": 0.0065396946400000005,
"max": 0.01423557964
},
{
"command": "pacquet@main",
"mean": 0.010837694959884738,
"stddev": 0.0019406199966195208,
"median": 0.01044670764,
"user": 0.006176623861671472,
"system": 0.0053539330259366035,
"min": 0.007429916640000001,
"max": 0.02191044464
},
{
"command": "pnpr@HEAD",
"mean": 0.010594611106417913,
"stddev": 0.0014167949689445152,
"median": 0.010445220140000001,
"user": 0.005858298955223882,
"system": 0.005428725223880599,
"min": 0.007854639640000001,
"max": 0.015138627640000001
},
{
"command": "pnpr@main",
"mean": 0.010116853421690154,
"stddev": 0.0014924650191098056,
"median": 0.009818237140000002,
"user": 0.005639304788732392,
"system": 0.005097624788732397,
"min": 0.0072158106400000005,
"max": 0.018867279639999998
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008183269887445256,
"stddev": 0.0010135744388080938,
"median": 0.008035474340000001,
"user": 0.0048898610218978105,
"system": 0.003745136788321168,
"min": 0.00638357434,
"max": 0.01184910034
},
{
"command": "pacquet@main",
"mean": 0.007959443812656248,
"stddev": 0.0005494906023264968,
"median": 0.00793723034,
"user": 0.004796130781249998,
"system": 0.003658762890624998,
"min": 0.00688792134,
"max": 0.00970019834
},
{
"command": "pnpr@HEAD",
"mean": 0.007792906004310948,
"stddev": 0.0007488815648464511,
"median": 0.007641345339999999,
"user": 0.00461123519434629,
"system": 0.0036359190812720863,
"min": 0.00623780134,
"max": 0.01035227134
},
{
"command": "pnpr@main",
"mean": 0.007513529966198081,
"stddev": 0.0006644715453463252,
"median": 0.00746372734,
"user": 0.004460701405750796,
"system": 0.003492214696485623,
"min": 0.0060466793400000005,
"max": 0.00980294934
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5916424481599996,
"stddev": 0.1216970372376812,
"median": 2.55403114676,
"user": 2.1422283,
"system": 1.87462636,
"min": 2.47168014176,
"max": 2.82273047276
},
{
"command": "pacquet@main",
"mean": 2.5551416319599998,
"stddev": 0.07582938576019618,
"median": 2.52862436776,
"user": 2.0479642,
"system": 1.80454936,
"min": 2.47946996376,
"max": 2.7053024907600003
},
{
"command": "pnpr@HEAD",
"mean": 1.68438052656,
"stddev": 0.14860086893406504,
"median": 1.67622807226,
"user": 1.7001145999999998,
"system": 1.9396873599999995,
"min": 1.45243688676,
"max": 1.9017294797600002
},
{
"command": "pnpr@main",
"mean": 1.6827291552599999,
"stddev": 0.10603449321955684,
"median": 1.64095222026,
"user": 1.9225979999999996,
"system": 2.20158366,
"min": 1.5981164677600002,
"max": 1.93932078776
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5373885464400001,
"stddev": 0.058652444654265556,
"median": 0.5378988168400001,
"user": 0.8919822999999999,
"system": 1.1336575999999998,
"min": 0.43414876184,
"max": 0.6347923848400001
},
{
"command": "pacquet@main",
"mean": 0.5693634614399999,
"stddev": 0.07590271477906646,
"median": 0.5610333838400001,
"user": 0.9038207,
"system": 1.1509827,
"min": 0.45786475484,
"max": 0.7244251878400001
},
{
"command": "pnpr@HEAD",
"mean": 0.39338747704,
"stddev": 0.023808309695873487,
"median": 0.39632730484,
"user": 0.3557138,
"system": 0.6552917,
"min": 0.35173036484,
"max": 0.43324603684
},
{
"command": "pnpr@main",
"mean": 0.40924303044000004,
"stddev": 0.03287428655347693,
"median": 0.39958601884,
"user": 0.3580086,
"system": 0.6884908999999999,
"min": 0.37479956184,
"max": 0.46284141684
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6002134194800004,
"stddev": 0.014608165803129102,
"median": 1.6013114371800001,
"user": 0.92250732,
"system": 1.00433516,
"min": 1.5715962146800002,
"max": 1.62438745968
},
{
"command": "pacquet@main",
"mean": 1.6447335420800004,
"stddev": 0.039403196096140986,
"median": 1.6456063951800002,
"user": 1.04456972,
"system": 1.04097346,
"min": 1.5999614476800001,
"max": 1.72496808268
},
{
"command": "pnpr@HEAD",
"mean": 0.33538748568,
"stddev": 0.03540298213352262,
"median": 0.31887085518,
"user": 0.28946441999999994,
"system": 0.62475626,
"min": 0.30486774768,
"max": 0.42212027168
},
{
"command": "pnpr@main",
"mean": 0.32164898637999995,
"stddev": 0.04381293595815619,
"median": 0.29827702268,
"user": 0.28373002,
"system": 0.58853186,
"min": 0.28117853768,
"max": 0.39952501368000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31825553154,
"stddev": 0.051352388159871004,
"median": 0.32267392104000003,
"user": 0.33652512,
"system": 0.14977426000000002,
"min": 0.24916782004000004,
"max": 0.40433703404000004
},
{
"command": "pacquet@main",
"mean": 0.33495186374,
"stddev": 0.05317443030899528,
"median": 0.32610569904000003,
"user": 0.33935622,
"system": 0.15977826,
"min": 0.26319575804,
"max": 0.41746332804
},
{
"command": "pnpr@HEAD",
"mean": 0.12334023443999997,
"stddev": 0.008438533968066993,
"median": 0.12543791304000002,
"user": 0.055496920000000005,
"system": 0.029909759999999997,
"min": 0.10966383104,
"max": 0.13942178504000002
},
{
"command": "pnpr@main",
"mean": 0.11792177624833335,
"stddev": 0.008613538633438578,
"median": 0.11790023154000001,
"user": 0.05305535333333333,
"system": 0.025278934999999992,
"min": 0.10243752704,
"max": 0.13245618204
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7640462615533333,
"stddev": 0.06513021508475356,
"median": 0.7762140462200001,
"user": 0.81759384,
"system": 0.20239152444444442,
"min": 0.6316067672200001,
"max": 0.8361822962200001
},
{
"command": "pacquet@main",
"mean": 0.7773557213311112,
"stddev": 0.08849140808037873,
"median": 0.7414995832200001,
"user": 0.8356833955555555,
"system": 0.22387119111111112,
"min": 0.6855913302200001,
"max": 0.9202606232200001
},
{
"command": "pnpm@HEAD",
"mean": 4.051840077886666,
"stddev": 0.17176094060057304,
"median": 4.0816996882200005,
"user": 6.516434839999999,
"system": 0.30218907999999994,
"min": 3.80133673622,
"max": 4.26791059322
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2063016128685715,
"stddev": 0.01606302043763824,
"median": 0.20863018944,
"user": 0.15636353428571428,
"system": 0.09213005714285713,
"min": 0.17787147644,
"max": 0.24095824044
},
{
"command": "pacquet@main",
"mean": 0.20457696728615385,
"stddev": 0.011423549551539687,
"median": 0.20331142444,
"user": 0.15609493538461539,
"system": 0.10094931538461537,
"min": 0.18980858644,
"max": 0.22548814644
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.601078406379999,
"stddev": 0.2003385613962826,
"median": 4.6164291641799995,
"user": 1.8398926199999999,
"system": 2.0101523,
"min": 4.368069515679999,
"max": 4.9145387626799995
},
{
"command": "pacquet@main",
"mean": 4.559418880880001,
"stddev": 0.12483981607733761,
"median": 4.55474375768,
"user": 2.0484124200000005,
"system": 2.0522020000000003,
"min": 4.38925631568,
"max": 4.82690787668
},
{
"command": "pnpr@HEAD",
"mean": 3.6114935466800007,
"stddev": 0.14823234179565556,
"median": 3.57086782918,
"user": 1.8341766199999998,
"system": 1.8806267,
"min": 3.43847159668,
"max": 3.8873134416800004
},
{
"command": "pnpr@main",
"mean": 3.5435973838800003,
"stddev": 0.14030930922239376,
"median": 3.49234753068,
"user": 1.6751284199999996,
"system": 1.7205977999999995,
"min": 3.42614975768,
"max": 3.82243568668
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.14929484039000002,
"stddev": 0.011096661854375023,
"median": 0.14394801563999998,
"user": 0.1990562675,
"system": 0.17517337249999998,
"min": 0.13451708864,
"max": 0.17025046864
},
{
"command": "pacquet@main",
"mean": 0.14252882458117644,
"stddev": 0.011303138671955459,
"median": 0.14485841864000001,
"user": 0.1792686094117647,
"system": 0.17666517764705877,
"min": 0.12392269964000001,
"max": 0.15968080364
},
{
"command": "pnpr@HEAD",
"mean": 0.15659737451500003,
"stddev": 0.008166291499440162,
"median": 0.15719435614,
"user": 0.18257583,
"system": 0.18752999749999996,
"min": 0.13729146464,
"max": 0.17131303964
},
{
"command": "pnpr@main",
"mean": 0.1613501548066667,
"stddev": 0.013131442322457235,
"median": 0.16210155164,
"user": 0.18912419111111112,
"system": 0.18906711555555555,
"min": 0.13659939664,
"max": 0.18325438864000002
}
]
} |
8d0b0b5 to
6db16c1
Compare
PR Summary by QodoRoute Python packages to explicit authoritative registries
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
Code Review by Qodo
1. Website examples now fail
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Code review by qodo was updated up to the latest commit daa9a07 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
| Project | pnpm's project |
| Branch | pr/15082 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 137.29 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,452.44 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 304.87 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 351.73 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 109.66 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,360.77 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,438.47 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 322.71 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 6.24 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 7.85 ms |
Replace Python's first-index search with explicit package namespace claims. Normalize exact names and prefixes using Python package name semantics, reject ambiguous claims, and select one index before fetching metadata. Record canonical routing inputs in Python lockfiles so route changes invalidate replay. Restricted registries do not implicitly enable PyPI. Use local resolution for restricted or multiple routes because the pnpr Python resolution protocol currently represents one whole index. Reuse pnpr's package pattern validation and preserve existing npm scope and prefix routing and Cargo's single-index configuration. Python support is experimental, so release this change as a patch. Make existing Cargo diagnostic assertions tolerate output wrapping and isolate the import and pack plugin fixtures from user npm scope routes.
Summary
Python
registriesentries now assign packages to an authoritative index through exact names or trailing-prefix patterns inpackages. Declaration order no longer changes resolution.packages: ["*"]declares the default index, and omittingpackagespreserves a single custom index's behavior.Missing packages, incompatible versions, and registry errors never fall back to another index. Routing applies to transitive and isolated build dependencies, and changes invalidate Python lockfiles. Includes regression tests and a patch changeset for the experimental Python support. The routing details are documented in the companion website PR pnpm/pnpm.io#941. The README contains no routing details.
Validation: 811 focused config, Python installer, Python resolver, and Python index CLI tests passed after rebasing onto main. Workspace compilation, formatting, spelling, and Clippy passed. An earlier full run passed all 11,742 Rust tests and exposed diagnostic wrapping and npmrc isolation problems fixed in three existing fixtures.
Squash Commit Body
Checklist
are implemented in every affected version.
and written for pnpm users.
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.