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

Order of locked package markers is unstable. #1457

Closed
3 tasks done
charettes opened this issue Oct 10, 2019 · 9 comments · Fixed by #2361
Closed
3 tasks done

Order of locked package markers is unstable. #1457

charettes opened this issue Oct 10, 2019 · 9 comments · Fixed by #2361
Labels
kind/bug Something isn't working as expected

Comments

@charettes
Copy link

charettes commented Oct 10, 2019

Issue

When performing a poetry update package markers in poetry.lock get re-ordered in an unstable way. For example, running poetry update on the provided pyproject.toml keeps swapping these markers around in the poetry.lock file.

diff --git a/poetry.lock b/poetry.lock
index 204943b..982ec97 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -28,7 +28,7 @@ version = "0.3.3"
 [[package]]
 category = "dev"
 description = "Disable App Nap on OS X 10.9"
-marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"darwin\" or python_version >= \"3.4\" and sys_platform == \"darwin\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform == \"darwin\" or python_version == \"2.7\" and sys_platform == \"darwin\""
+marker = "python_version >= \"3.4\" and sys_platform == \"darwin\" or python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"darwin\" or python_version == \"2.7\" and sys_platform == \"darwin\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform == \"darwin\""
 name = "appnope"
 optional = false
 python-versions = "*"
@@ -1080,7 +1080,7 @@ version = "0.1.9"
 [[package]]
 category = "main"
 description = "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4"
-marker = "python_version < \"3.5\" or python_version == \"2.7\" and python_version < \"3.0\" or python_version >= \"2.7\" and python_version < \"3.0\""
+marker = "python_version < \"3.5\" or python_version >= \"2.7\" and python_version < \"3.0\" or python_version == \"2.7\" and python_version < \"3.0\""
 name = "enum34"
 optional = false
 python-versions = "*"
@@ -2094,7 +2094,7 @@ testing = ["docopt", "pytest (>=3.0.7)"]
 [[package]]
 category = "dev"
 description = "Object-oriented filesystem paths"
-marker = "python_version >= \"2.7\" and python_version < \"3.0\" and python_version in \"2.6 2.7 3.2 3.3\" or python_version >= \"2.7\" and python_version < \"3.0\" and (python_version == \"2.7\" or python_version == \"3.3\") or python_version == \"2.7\" or python_version == \"2.7\""
+marker = "python_version == \"2.7\" or python_version == \"2.7\" or python_version >= \"2.7\" and python_version < \"3.0\" and python_version in \"2.6 2.7 3.2 3.3\" or python_version >= \"2.7\" and python_version < \"3.0\" and (python_version == \"2.7\" or python_version == \"3.3\")"
 name = "pathlib2"
 optional = false
 python-versions = "*"
@@ -2139,7 +2139,7 @@ version = "*"
 [[package]]
 category = "dev"
 description = "Pexpect allows easy control of interactive console applications."
-marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform != \"win32\" or python_version >= \"3.4\" and sys_platform != \"win32\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform != \"win32\" or python_version == \"2.7\" and sys_platform != \"win32\""
+marker = "python_version >= \"3.4\" and sys_platform != \"win32\" or python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform != \"win32\" or python_version == \"2.7\" and sys_platform != \"win32\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform != \"win32\""
 name = "pexpect"
 optional = false
 python-versions = "*"
@@ -2253,7 +2253,7 @@ version = "2.7.7"
 [[package]]
 category = "dev"
 description = "Run a subprocess in a pseudo terminal"
-marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform != \"win32\" or python_version >= \"3.4\" and sys_platform != \"win32\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform != \"win32\" or python_version == \"2.7\" and sys_platform != \"win32\""
+marker = "python_version >= \"3.4\" and sys_platform != \"win32\" or python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform != \"win32\" or python_version == \"2.7\" and sys_platform != \"win32\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform != \"win32\""
 name = "ptyprocess"
 optional = false
 python-versions = "*"
@@ -3346,7 +3346,7 @@ version = "0.6.1"
 [[package]]
 category = "dev"
 description = "Enable Unicode input and display when running Python from Windows console."
-marker = "python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform == \"win32\" or sys_platform == \"win32\" and python_version == \"2.7\""
+marker = "sys_platform == \"win32\" and python_version == \"2.7\" or python_version >= \"2.7\" and python_version < \"3.0\" and sys_platform == \"win32\""
 name = "win-unicode-console"
 optional = false
 python-versions = "*"
@charettes charettes added the kind/bug Something isn't working as expected label Oct 10, 2019
@stale
Copy link

stale bot commented Dec 9, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 9, 2019
@charettes
Copy link
Author

This is still a legitimate issue that I believe should be addressed. No one else commented on it yet but I assume from the 👍 that it's affecting a few other users as well.

@stale stale bot removed the stale label Dec 10, 2019
@charettes
Copy link
Author

We're not experiencing the issue since we dropped support for both Python 2 and 3 in our package. The issue persist if you have python = "^2.7 || ^3.6" in you your [tool.poetry.dependencies].

@Qu4tro
Copy link
Contributor

Qu4tro commented Sep 4, 2020

We're still experiencing this issue with python = "^3.8" . Lock creates >600 line diffs.

@abn
Copy link
Member

abn commented Sep 5, 2020

@Qu4tro what verision of poetry was the original lock file generate and what version are you using now?

@Qu4tro
Copy link
Contributor

Qu4tro commented Sep 16, 2020

@abn

❯ poetry -V
Poetry version 1.0.10

The version of poetry that generated the lock file is unknown to me, because it was done by dependabot. On their repo, they did updated to 1.0.10, but I have no way to know if that's the latest released version.

@abn
Copy link
Member

abn commented Sep 16, 2020

Dependabot stuff is a bit wierd at the moment, we really need better ways for tools like that to rely on poetry. A little like tox's min_version or some other constraint.

This particular issue i think is because different versions are being used, ie. developer uses version 1 and dependabot uses another.

@finswimmer
Copy link
Member

This topic has improved a lot since this issue was open. I guess it should be solved.

Feel free to leave a comment if you disagree.

Copy link

github-actions bot commented Mar 1, 2024

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 Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants