Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(📚) Include a blurb in the section for 'Exact requirements' that says the difference without the == #7485

Closed
KotlinIsland opened this issue Feb 8, 2023 · 5 comments · Fixed by #7503
Labels
area/docs Documentation issues/improvements good first issue

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Feb 8, 2023

  • [🚀] I have searched the issues of this repo and believe that this is not a duplicate.

Issue

What is the difference between pendulum = "2.1.2" and pendulum = "==2.1.2".

In fact, the 'Dependency specification' page doesn't mention bare dependencies at all, which are the type that Poetry adds.
ie: 👉 poetry add pendulum==2.1.2 -> pendulum = "2.1.2".

@KotlinIsland KotlinIsland added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels Feb 8, 2023
@radoering
Copy link
Member

There is no difference:

>>> from poetry.core.constraints.version import parse_constraint
>>> parse_constraint('2.1.2') == parse_constraint('==2.1.2')
True

Relevant part of the code: https://github.com/python-poetry/poetry-core/blob/b5d1934fed190bbfd1a303b44d5e2ef9a600efed/src/poetry/core/constraints/version/parser.py#L155-L165

@radoering radoering added good first issue and removed status/triage This issue needs to be triaged labels Feb 8, 2023
@KotlinIsland
Copy link
Contributor Author

Thought so. Is there any preference? the == part seems redundant at this point, I wonder why it exists, maybe it could be deprecated.

@Secrus
Copy link
Member

Secrus commented Feb 8, 2023

Thought so. Is there any preference? the == part seems redundant at this point, I wonder why it exists, maybe it could be deprecated.

We are currently working towards supporting PEP 621 (pyproject metadata spec) and there will probably be a lot of changes and deprecations then. I don't think it makes sense to deprecate this right now.

@neersighted
Copy link
Member

It's not even redundant -- we explicitly support PEP 440 style specifiers, but have our own features 'on top' (no ==, ^, etc).

PEP 621 will require Poetry to drop its own custom features in favor of the ecosystem-standard specifiers; if anything we may explore deprecating our syntax sugar.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants