uv
615dda0e - Tolerate missing `[project]` table in `uv venv` (#6178)

Comment changes are shownComment changes are hidden
Commit
338 days ago
Tolerate missing `[project]` table in `uv venv` (#6178) ## Summary Fixes #6177 This ensures a `pyproject.toml` file without a `[project]` table is not a fatal error for `uv venv`, which is just trying to discover/respect the project's `python-requires` (#5592). Similarly, any caught `WorkspaceError` is now also non-fatal and instead prints a warning message (feeback welcome here, felt less surprising than e.g. a malformed `pyproject.toml` breaking `uv venv`). ## Test Plan I added two test cases: `cargo test -p uv --test venv` Also, existing venv tests were failing for me since I use fish and the printed activation script was `source .venv/bin/activate.fish` (to repro, just run the tests with `SHELL=fish`). So added an insta filter to normalize that.
Author
Parents
  • crates/uv
    • src/commands
      • File
        venv.rs
    • tests
      • common
        • File
          mod.rs
      • File
        venv.rs