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

Add Poetry Version to Metadata in Poetry.lock #9238

Closed
jhamet93 opened this issue Mar 25, 2024 · 3 comments
Closed

Add Poetry Version to Metadata in Poetry.lock #9238

jhamet93 opened this issue Mar 25, 2024 · 3 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@jhamet93
Copy link

Issue Kind

Brand new capability

Description

To ensure compatibility, I would like to understand which version of the poetry CLI is compatible with a given pyproject.toml which produced a poetry.lock.

Recently, this issue broke CI/CD pipelines for certain projects where the Poetry version that ended up being installed was 1.8 but the projects themselves were not updated to support that version. Thus, it would be a nice bonus if I could predetermine a compatible version of Poetry and install that version to manage a given Poetry project.

I do understand there are better solutions that can be implemented internally (e.g. only support a single Poetry version across all projects) but given the scale of the company (number of projects + developers), I figured it is worth reaching out here about this particular request.

Impact

When sharing projects, to ensure the same version of Poetry is used across users/CI/etc.

Workarounds

Could parse the first line of the poetry.lock file but that seems a brittle approach.

@jhamet93 jhamet93 added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Mar 25, 2024
@dimbleby
Copy link
Contributor

writing a poetry version number into poetry.lock should not help your pipelines. Pipelines should be pinning the versions of tools such as poetry - not automatically taking the latest, but also not automatically taking whatever version the most recent committer used.

if you want to know what version of poetry produced a lockfile so that you as a developer can install a matching poetry - then reading the first line of poetry.lock seems just fine to me.

@radoering
Copy link
Member

We deliberately decided against adding the poetry version to the metadata. See #7339 for details.

Apart from your proposed solution, your use case reads more or less like a duplicate of #3316.

@radoering radoering closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
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 Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants