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

Pip install does not respect poetry.lock #7419

Closed
4 tasks done
lrnq opened this issue Jan 27, 2023 · 5 comments
Closed
4 tasks done

Pip install does not respect poetry.lock #7419

lrnq opened this issue Jan 27, 2023 · 5 comments
Labels
status/duplicate Duplicate issues

Comments

@lrnq
Copy link

lrnq commented Jan 27, 2023

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

The gist link contains a pyproject.toml file and a poetry.lock file. The tree structure of the project is:

.
├── poetry-test
│   └── __init__.py
├── poetry.lock
└── pyproject.toml

The file __init__.py is empty.

Steps to recreate: Running pip install . from the root directory in a fresh virtual enviroment respects the versioning specified in pyproject.toml, but not the versioning of the lock file. Specifically, it will install apache-beam version 2.44.0 despite the lock file specifying version 2.42.0.

Expected behaviour: I expect pip install . to respect the lock file and install apache-beam version 2.42.0. My understanding (based on the information in here) is that this is part of what the following block from the toml file allows us to do.

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
@lrnq lrnq added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 27, 2023
@dimbleby
Copy link
Contributor

poetry-core does not currently understand poetry.lock, this is known and expected behaviour

python-poetry/poetry-core#83 is the last try I know of at making it happen

@lrnq
Copy link
Author

lrnq commented Jan 27, 2023

Thanks, I see. Is this referenced anywhere in the docs? Here it is mentioned that poety-core reads lock files which we interpreted exactly as poetry.lock is understood by poetry-core.

In order to improve the above situation, poetry-core was created. Shared functionality pertaining to PEP 517 build backends, including reading lock file, pyproject.toml and building wheel/sdist, were implemented in this package. This makes PEP 517 builds extremely fast for Poetry managed packages.

@dimbleby
Copy link
Contributor

I dunno, I'm sure you can search the docs as well as I can! merge requests improving them should be welcome

@neersighted
Copy link
Member

Duplicate #2778

@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 27, 2023
@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2023
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
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants