Skip to content

uv pip compile --upgrade can fail when uv pip compile succeeds if requirements.txt contains pre-release #3602

Open

Description

@Phlogistique

My requirements.in contains a package which depends on betterproto>=2.0.0b6. The requirements.txt was initially generated using pip and contains betterproto==2.0.0b6.

Running uv pip compile works, but uv pip compile --upgrade refuses to pick up that pre-release version, and therefore fails resolution.

I would think it would be more intuitive for either:

  • uv pip compile to fail if any pre-release version is already in requirements.txt, or
  • uv pip compile --upgrade to accept pre-releases if they are already in requirements.txt

Activity

  1. charliermarsh commented on May 15, 2024

    @charliermarsh
    Member

    I think "uv pip compile --upgrade to accept pre-releases if they are already in requirements.txt" does make sense.

  2. added
    enhancement
    on May 15, 2024
  3. charliermarsh commented on May 16, 2024

    @charliermarsh
    Member

    I would probably say the same of yanked packages... If you run with --upgrade, and your lockfile uses a yanked package, we should probably allow you to continue using it...?

  4. zanieb commented on May 17, 2024

    @zanieb
    Member

    That's a little more dubious imo. If something is yanked you ought to be pushed to resolve it. If you want to keep using the yanked version you should have to pin? Can we consider that separately? (see #3644)

  5. charliermarsh commented on May 17, 2024

    @charliermarsh
    Member

    Yeah that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions