uv/crates
Charlie Marsh 4b83d8e949
Require URL dependencies to be declared upfront (#319)
In the resolver, our current model for solving URL dependencies requires
that we visit the URL dependency _before_ the registry-based dependency.
This PR encodes a strict requirement that all URL dependencies be
declared upfront, either as requirements or constraints.

I wrote more about how it works and why it's necessary in documentation
[here](https://github.com/astral-sh/puffin/pull/319/files#diff-2b1c4f36af0c62a2b7bebeae9473ae083588f2a6b18a3ec52393a24266adecbbR20).
I think we could relax this constraint over time, but it requires a more
sophisticated model -- and for now, I just want something that's (1)
correct, (2) easy for us to reason about, and (3) easy for users to
reason about.

As additional motivation... allowing arbitrary URL dependencies anywhere
in the tree creates some really confusing situations in which I'm not
even sure what the right answers are. For example, assume you declare a
direct dependency on `Werkzeug==2.0.0`. You then depend on a version of
Flask that depends on a version of `Werkzeug` from some arbitrary URL.
You build the source distribution at that arbitrary URL, and it turns
out it _does_ build to a declared version of 2.0.0. What should happen?
(And if it resolves to a version that _isn't_ 2.0.0, what should happen
_then_?) I suspect different tools handle this differently, but it must
lead to a lot of "silent" failures. In my testing of Poetry, it seems
like Poetry just ignores the URL dependency, which seems wrong, but is
also a behavior we could implement in the future.

Closes https://github.com/astral-sh/puffin/issues/303.
Closes https://github.com/astral-sh/puffin/issues/284.
2023-11-05 17:09:58 +00:00
..
distribution-filename Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
gourgeist Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
install-wheel-rs Add PackageName::as_dist_info_name (#305) 2023-11-03 08:16:44 +00:00
pep440-rs Add support for pre-release versions (#216) 2023-10-29 14:31:55 -04:00
pep508-rs Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
platform-host Fix musl compilation (#234) 2023-10-30 18:10:17 +01:00
platform-tags Store all distributions rather than compatible wheels (#114) 2023-10-17 17:09:31 -04:00
puffin-build Add support for subdirectories in URL dependencies (#312) 2023-11-03 15:28:38 -04:00
puffin-cache Require URL dependencies to be declared upfront (#319) 2023-11-05 17:09:58 +00:00
puffin-cli Require URL dependencies to be declared upfront (#319) 2023-11-05 17:09:58 +00:00
puffin-client Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-dev Add support for subdirectories in URL dependencies (#312) 2023-11-03 15:28:38 -04:00
puffin-dispatch Add support for subdirectories in URL dependencies (#312) 2023-11-03 15:28:38 -04:00
puffin-distribution Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-git Use separate representations for canonical repository vs. commit (#317) 2023-11-04 11:46:42 -04:00
puffin-installer Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-interpreter Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-normalize Add PackageName::as_dist_info_name (#305) 2023-11-03 08:16:44 +00:00
puffin-package Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-resolver Require URL dependencies to be declared upfront (#319) 2023-11-05 17:09:58 +00:00
puffin-traits Add support for subdirectories in URL dependencies (#312) 2023-11-03 15:28:38 -04:00
puffin-workspace Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
README.md Add source distribution filename abstraction (#154) 2023-10-20 17:45:57 +02:00

Crates

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

puffin-cli

Command-line interface for the Puffin package manager.

puffin-client

Client for interacting with PyPI-compatible HTTP APIs.

puffin-installer

Functionality for installing Python packages into a virtual environment.

puffin-interpreter

Functionality for detecting and leveraging the current Python interpreter.

puffin-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

puffin-resolver

Functionality for resolving Python packages and their dependencies.

distribution-filename

Functionality for parsing wheel filenames as per PEP 427.