Skip to content

Allow poetry add with a --frozen flag to freeze current/specified version of dependency  #5116

@aalok-sathe

Description

@aalok-sathe
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

It would be useful to be able to freeze the version of a dependency at the same time as add. Some dependencies can be volatile, and even with the expectation that a minor revision should not chage the interface of any dependency, to certain projects, this risk may not be tolerable. Whereas we can already manually edit the pyproject.toml file to achieve this, an option to the add command to by default add a specific version 3.1.4 rather than ^3.1.4 or no version at all, would be useful.

Being able to do this retroactively could also be useful, using, say, poetry freeze numpy, which will freeze the numpy dependency to its current version in the lock file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsDocumentation issues/improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions