Skip to content

What does the @ in poetry add pendulum@^2.0.5 in a docs example mean? #5136

Closed

Description

@DFEvans
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

In the CLI docs page (cli.md), the documentation for add gives two examples for specifying a constraint:

poetry add pendulum@^2.0.5
poetry add "pendulum>=2.0.5"

In the first line, what is the meaning of @ in addition to ^? Is this a symbol that modifies the behaviour of ^, some shell-specific escape sequence (I know that < and > can be troublesome), or just a small typo? It's never referenced again in the accompanying text, or the Dependency Specification docs page (dependency-specification.md).

(It's been in the example ever since it was first added in c6a2d6e)

My reason for looking at this is that I've had another developer a little confused why poetry add foo@1.2.3 isn't working to update a required version. I think it's simply that @ isn't a valid specifier, and they've copied (part of) this example.

Activity

  1. added
    area/docsDocumentation issues/improvements
    status/triageThis issue needs to be triaged
    on Feb 1, 2022
  2. dimbleby commented on Jun 4, 2022

    @dimbleby
    Contributor

    Looks like not a typo, the @ is usual in 'direct' references (files, git repositories) and poetry tolerates it (but as far as I can tell ignores it) in regular version specifiers at poetry add.

    In particular poetry add foo@1.2.3 works just fine for me (with some package that actually exists)

  3. dimbleby commented on Jun 4, 2022

    @dimbleby
    Contributor

    also duplicates #3142

  4. github-actions commented on Mar 1, 2024

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked as resolved and limited conversation to collaborators on Mar 1, 2024
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

    area/docsDocumentation issues/improvements

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions