Skip to content

Global Python pin should be ignored when incompatible with project #14916

@zanieb

Description

@zanieb
❯ uv python pin --global 3.12
Pinned `/Users/zb/.config/uv/.python-version` to `3.12`
❯ uv init -p 3.13 --no-pin-python example
Initialized project `example` at `/private/tmp/example`
❯ cd example
❯ uv sync
Using CPython 3.12.9
error: The Python request from `/Users/zb/.config/uv/.python-version` resolved to Python 3.12.9, which is incompatible with the project's Python requirement: `>=3.13` (from `project.requires-python`)
Use `uv python pin` to update the `.python-version` file to a compatible version

We should probably ignore this Python pin instead of erroring?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions