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.

Lockfile diffs between Linux and macOS in `[package.extras]`

See original GitHub issue
  • Poetry version: 1.3.1
  • Python version: 3.11.1
  • OS version and name: python:3.11 Docker image vs macOS 12.6
  • pyproject.toml: (see below)
  • 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.

Issue

Starting with following pyproject.toml:

[tool.poetry]
name = "tmp"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
pynacl = "^1.5.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Running poetry lock in macOS or Linux respectively, the lock file will have different contents:

% diff -u poetry.lock poetry.lock.linux
--- poetry.lock	2022-12-16 17:16:10.000000000 +0200
+++ poetry.lock.linux	2022-12-16 17:15:49.000000000 +0200
@@ -113,7 +113,7 @@
 cffi = ">=1.4.1"

 [package.extras]
-docs = ["sphinx (>=1.6.5)", "sphinx_rtd_theme"]
+docs = ["sphinx (>=1.6.5)", "sphinx-rtd-theme"]
 tests = ["hypothesis (>=3.27.0)", "pytest (>=3.2.1,!=3.3.0)"]

 [metadata]

This results in unnecessary churn in git history, as developers from different OSes touch the file.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
intgrcommented, Dec 19, 2022

@neersighted This bug is in Poetry’s cache management, I can reproduce this on CircleCI.

  1. Add pynacl with Poetry 1.2.2
  2. Delete poetry.lock
  3. Upgrade to Poetry 1.3.1
  4. Try poetry lock again wth 1.3.1

It will produce the line docs = ["sphinx (>=1.6.5)", "sphinx_rtd_theme"] instead of docs = ["sphinx (>=1.6.5)", "sphinx-rtd-theme"]

https://github.com/intgr/poetry-test/blob/circleci-project-setup/.circleci/config.yml#L40-L52

Relevant output:

Poetry (version 1.3.1)
Updating dependencies
Resolving dependencies... (0.0s)Resolving dependencies... (0.1s)Resolving dependencies... (0.2s)Resolving dependencies... (0.4s)

Writing lock file
docs = ["sphinx (>=1.6.5)", "sphinx_rtd_theme"]

Full output: https://app.circleci.com/pipelines/github/intgr/poetry-test/9/workflows/326151b0-1251-41dd-abde-8dba33d46cba/jobs/10

The work-around is to delete Poetry’s cache.

0reactions
intgrcommented, Dec 18, 2022

@radoering Did you try to reproduce this and fail? If so, please say that clearly.

I don’t see anyone here saying that they could not reproduce it. I only see an incorrect assumption about what version of Poetry I used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install produces different lockfiles on different computes
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >
Working with front-end tools on Linux and Windows
Not using lockfile while installing dependencies with yarn has shown significant drop in performance. Also, differences between the two ...
Read more >
PEP 665 – A file format to list Python dependencies for ...
This PEP specifies a file format to specify the list of Python package ... file format to be easy to read as a...
Read more >
Quick-and-dirty way to ensure only one instance of a shell ...
Use flock(1) to make an exclusive scoped lock a on file descriptor. This way you can even synchronize different parts of the script....
Read more >
MacOS File Settings: The difference between Locked and ...
File privileges and locking files​​ The Locked property appears to not be stored with the package of permissions and access control lists (ACLs) ......
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