-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
- Poetry version: 1.1.13 -> 1.2.1
- Python version: 3.9.10
- OS version and name: macOS 12.5.1
- pyproject.toml: Gist
- [ x] I am on the latest stable Poetry version, installed using a recommended method.
- [ x] I have searched the issues of this repo and believe that this is not a duplicate.
- [ x] I have consulted the FAQ and blog for any relevant entries or release notes.
- [ x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
I believe this issue is similar to #4729 but didn't consider it a duplicate because the issue is marked as closed.
This issue might be fixed up:
python-poetry/poetry-core#379
from poetry.core.semver.helpers import parse_constraint
dev_build = parse_constraint('==0.92.0+f4f0e5bc')
release_build = parse_constraint('==0.92.0')
release_build.allows(dev_build)
True
dev_build.allows(release_build)
False
release_build.next_breaking()
<Version 0.93.0>
dev_build.next_breaking()
<Version 0.93.0>
On version 1.1.13 adding a dependency to the pyproject.toml would always result in that specific version being written to the poetry.lock
when running poetry lock --no-update
.
After upgrading to 1.2.1
we noticed that adding a pinned version of an internal library to the pyproject.toml
file and running poetry lock --no-update
would result in the lock file containing a pointer to the expected version, but it would include the local identifier.
The poetry.lock
would look like the example below.
[[package]]
name = "other-internal-project"
version = "0.92.0+f4f0e5bc"
description = ""
category = "main"
optional = false
A workaround that we found was adding the source to the pyproject.toml
. Package versions with local identifiers are published to the local-pypi-snapshot
PyPI instance and versions without are published to local-pypi-release
.
other-internal-project" = {version = "0.92.0", source = "local-pypi-release"}