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

Dependency resolution continues indefinitely #7882

Closed
3 of 4 tasks
MycroftKang opened this issue May 5, 2023 · 3 comments
Closed
3 of 4 tasks

Dependency resolution continues indefinitely #7882

MycroftKang opened this issue May 5, 2023 · 3 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@MycroftKang
Copy link

MycroftKang commented May 5, 2023

  • Poetry version: 1.4.2
  • Python version: 3.10.10
  • OS version and name: Windows 11 22H2
  • 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.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

When I try to update the existing dependency to cause a dependency conflict, dependency resolution continues infinitely.
The rasa package used in the reproduction steps below depends on pytz (>=2019.1,<2023.0).

Steps to reproduce

  1. First, run poetry install with the following tool.poetry.dependencies:
# pyproject.toml

[tool.poetry.dependencies]
python = "3.10.*"
rasa = {git = "https://github.com/MycroftKang/rasa-cpu.git", rev = "dc276bb975d205daa389551727240437c5131297"}
pytz = "2022.1"
  1. Next, change the pytz version from 2022.1 to 2023.3 and run poetry update pytz.
# pyproject.toml

- pytz = "2022.1"
+ pytz = "2023.3"
  1. The Resolving dependencies... message is displayed infinitely, and poetry uses over 10GB(!) of memory if you keep waiting.

Debug Mode (-vvv option) Output

Running poetry update -vvv pytz gives the following output infinitely:

1: ! thus: rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 requires pytz (>=2019.1,<202
3.0)
   1: ! rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 is partially satisfied by not rasa
 (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297
   1: ! which is caused by "rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 depends on pyt
z (>=2019.1,<2023.0)"
   1: ! thus: rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 requires pytz (>=2019.1,<202
3.0)
   1: ! rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 is partially satisfied by not rasa
 (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297
   1: ! which is caused by "rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 depends on pyt
z (>=2019.1,<2023.0)"
   1: ! thus: rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 requires pytz (>=2019.1,<202
3.0)
   1: ! rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 is partially satisfied by not rasa
 (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297
   1: ! which is caused by "rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 depends on pyt
z (>=2019.1,<2023.0)"
   1: ! thus: rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 requires pytz (>=2019.1,<202
3.0)
   1: ! rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 is partially satisfied by not rasa
 (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297
   1: ! which is caused by "rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 depends on pyt
z (>=2019.1,<2023.0)"
   1: ! thus: rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 requires pytz (>=2019.1,<202
3.0)

Expected Correct Behavior

If I run poetry install from the beginning with tool.poetry.dependencies as shown below,

# pyproject.toml

[tool.poetry.dependencies]
python = "3.10.*"
rasa = {git = "https://github.com/MycroftKang/rasa-cpu.git", rev = "dc276bb975d205daa389551727240437c5131297"}
pytz = "2023.3"

poetry will exit with the following message.

Updating dependencies
Resolving dependencies... (0.4s)

Because test-poetry depends on rasa (3.4.2) @ git+https://github.com/MycroftKang/rasa-cpu.git@dc276bb975d205daa389551727240437c5131297 which depends on pytz (>=2019.1,<2023.0), pytz is required.
So, because test-poetry depends on pytz (2023.3), version solving failed.

It should be like this even in the case described in the reproduction step above.

@MycroftKang MycroftKang added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 5, 2023
@dimbleby
Copy link
Contributor

dimbleby commented May 5, 2023

duplicate #7398, #7760, please close

@MycroftKang
Copy link
Author

Closing this as there was a fix for it at #7405 which is not yet released.

Copy link

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 Feb 29, 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 status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants