Use Resolver in pip sync#2696
Conversation
| /// cargo run --bin uv-dev -- resolve-many scripts/popular_packages/pypi_10k_most_dependents.txt | ||
| /// ``` | ||
| ResolveMany(ResolveManyArgs), | ||
| InstallMany(InstallManyArgs), |
There was a problem hiding this comment.
Does anyone care about preserving this? I can migrate it but I wasn't sure if it was worth it. \cc @konstin
There was a problem hiding this comment.
I've been annoyed maintaining it since I don't use it.
There was a problem hiding this comment.
It was nice to have but honestly not if its effort to maintain, i don't run it anymore
There was a problem hiding this comment.
Haha. If I had my way I would remove them all.
8b95e1c to
21bf287
Compare
| error: Network connectivity is disabled, but the requested data wasn't found in the cache for: `black` | ||
| error: Because black==23.10.1 was not found in the cache and you require black==23.10.1, we can conclude that the requirements are unsatisfiable. | ||
|
|
||
| hint: Packages were unavailable because the network was disabled |
There was a problem hiding this comment.
This is an improvement, I think.
| error: markupsafe isn't available locally, but making network requests to registries was banned. | ||
| error: Because markupsafe==2.1.3 was not found in the provided package locations and you require markupsafe==2.1.3, we can conclude that the requirements are unsatisfiable. | ||
|
|
||
| hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links <uri>`) |
There was a problem hiding this comment.
This is an improvement, I think.
| Downloaded 1 package in [TIME] | ||
| Installed 1 package in [TIME] | ||
| + werkzeug==2.0.0 (from git+https://github.com/pallets/werkzeug.git@2.0.0) | ||
| + werkzeug==2.0.0 (from git+https://github.com/pallets/werkzeug.git@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74) |
There was a problem hiding this comment.
This is an improvement, I think.
|
|
||
| ----- stderr ----- | ||
| Removed 2 files for tqdm ([SIZE]) | ||
| Removed 3 files for tqdm ([SIZE]) |
There was a problem hiding this comment.
I don't know why this changed. Will look into it.
There was a problem hiding this comment.
We have an additional .msgpack file from the cache, because we fetch the Requires-Python for the URL.
| /// | ||
| /// TODO(charlie): This currently passes, but should fail. `sync` does not currently validate the | ||
| /// `Requires-Python` constraint for direct URL dependencies. (It _does_ respect `Requires-Python` | ||
| /// for registry-based dependencies.) |
21bf287 to
bc30872
Compare
bc30872 to
061956e
Compare
Summary
This PR removes the custom
DistFinderthat we use inpip sync. This originally existed becauseVersionMapwasn't lazy, and so we saved a lot of time inDistFinderby reading distribution data lazily. But now, AFAICT, there's really no benefit. MaintainingDistFindermeans we effectively have to maintain two resolvers, and end up fixing bugs inDistFinderthat don't exist in theResolver(like #2688.Closes #2694.
Closes #2443.
Test Plan
I ran this benchmark a bunch. It's basically a wash. Sometimes one is faster than the other.