python-poetry / python-poetry/poetry

Poetry not updating .lock file with the newer dependency version when we're using `-post1` in the dependency version

Open
#10,286 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

Description

Hi all,

I have an issue with Poetry 1.4.2 (not sure if it happens on the later versions). We have some dependencies in our main poetry project using the version formatted as x.y.z-post1 (-post1 is being used as our hotfix version).

Today I figured out the poetry isn't updating the version in .lock file if we mention the new version as -post1

Do you know if the issue is fixed on the newer version of poetry?

Workarounds

We have to use the regular version format (x.y.z) to get it works

Poetry Installation Method

pipx

Operating System

Amazon Linux 2023

Poetry Version

1.4.2

Poetry Configuration
cache-dir = "/Users/tinnguyen87/Library/Caches/pypoetry"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = true
virtualenvs.path = "{cache-dir}/virtualenvs"  # /Users/tinnguyen87/Library/Caches/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
Python Sysconfig
sysconfig.log
Paste the output of 'python -m sysconfig', over this line.
Example pyproject.toml

Poetry Runtime Logs
poetry-runtime.log
Paste the output of 'poetry -vvv <command>', over this line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with Poetry 1.4.2, a dependency using an x.y.z-post1 version, and a lock update; compare the result with the regular x.y.z workaround. The issue provides no example pyproject.toml, logs, files, or tests, so first establish a minimal reproducible case and verify that the lock file records the newer post-release dependency version.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.