question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

git depencencies don't have hashes in `poetry.lock` & `poetry update` doesn't work if the version number hasn't changed

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: windows 10
  • Poetry version: 1.1.12
  • Link of a Gist with the contents of your pyproject.toml file:
    [tool.poetry.dependencies]
    basedtyping = { git = "https://github.com/KotlinIsland/basedtyping.git", rev = "f2ecd42ab96eaf68c96da6527cb6075d8da3028d" }
    

Issue

  1. run poetry update with the dependency above
  2. change the rev to a newer commit, such as 11f7b4c232d68d5bb4c150d3340322548e1feda8
  3. run poetry update

expected result

the new version is installed

actual result

the old version stays installed, the only thing updated in the lockfile is the commit hash there is also no hash in metadata.files image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DetachHeadcommented, Apr 19, 2022

that’s odd, i tried it again and it worked this time

thanks!

0reactions
abncommented, Jun 5, 2022

@DetachHead seems to be working for me.

$ git diff
diff --git a/pyproject.toml b/pyproject.toml
index 02e9c10..ef5abc1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,7 @@ readme = "README.md"
 
 [tool.poetry.dependencies]
 python = "^3.10"
-basedtyping = {git = "https://github.com/KotlinIsland/basedtyping.git", rev = "a409f4fb70cd49b2db9ba311ffb1cc39d2e7256b"}
+basedtyping = {git = "https://github.com/KotlinIsland/basedtyping.git", rev = "0b07cdf96ca1569667b81f759dff330edb736432"}
 
 
 [build-system]
$ poetry update
Updating dependencies
Resolving dependencies... (0.4s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating basedtyping (0.1.0 a409f4f -> 0.1.0 0b07cdf)
$ git diff
diff --git a/poetry.lock b/poetry.lock
index 70a1849..85ef0c6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -10,13 +10,13 @@ develop = false
 [package.source]
 type = "git"
 url = "https://github.com/KotlinIsland/basedtyping.git"
-reference = "a409f4fb70cd49b2db9ba311ffb1cc39d2e7256b"
-resolved_reference = "a409f4fb70cd49b2db9ba311ffb1cc39d2e7256b"
+reference = "0b07cdf96ca1569667b81f759dff330edb736432"
+resolved_reference = "0b07cdf96ca1569667b81f759dff330edb736432"
 
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.10"
-content-hash = "5e5794a416e7480fe96babd7e97fbf2104d09dfaf6f7b395ffa86917bd5e59a3"
+content-hash = "4d3fc0684503d52933844c623c89868c34bc1dd0df3dca86bf532905c3ec2c29"
 
 [metadata.files]
 basedtyping = []
diff --git a/pyproject.toml b/pyproject.toml
index 02e9c10..ef5abc1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,7 @@ readme = "README.md"
 
 [tool.poetry.dependencies]
 python = "^3.10"
-basedtyping = {git = "https://github.com/KotlinIsland/basedtyping.git", rev = "a409f4fb70cd49b2db9ba311ffb1cc39d2e7256b"}
+basedtyping = {git = "https://github.com/KotlinIsland/basedtyping.git", rev = "0b07cdf96ca1569667b81f759dff330edb736432"}
 
 
 [build-system]

Also fwiw; this also seems to work fine with 1.2.0b1.

$ poetry@1.2.0b1 update
Updating dependencies
Resolving dependencies... (0.9s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating basedtyping (0.1.0 a409f4f -> 0.1.0 0b07cdf)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing Poetry 1.2.0 | Blog
The Poetry team is pleased to announce the immediate availability of Poetry 1.2.0. Poetry 1.2 boasts a massive list of changes, new features ......
Read more >
Dependency Management With Python Poetry
Install dependencies with poetry.lock; Execute basic Poetry CLI commands. Using Poetry will help you start new projects, maintain existing ones, ...
Read more >
Pipenv: promises a lot, delivers very little | Chris Warrick
lock , which stores the exact version and source file hash [2] of each package installed (including pytz , Django's dependency). The last...
Read more >
Defining metadata (meta.yaml) - Conda
All the metadata in the conda-build recipe is specified in the meta.yaml file. ... If you don't use these variables then you won't...
Read more >
Python Application Dependency Management
Update from one year later (2019-11-06): My upcoming criticism of Pipenv and Poetry have stood the test of time: Poetry hasn't added the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found