Poetry update never finishes resolve and Poetry show --outdated hangs
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 (
-vvvoption). -
OS version and name: Oracle Linux Server 7.5
-
Poetry version: 0.12.11
-
Link of a Gist with the contents of your pyproject.toml file: Part of it included.
pyproject.toml
[tool.poetry]
name = "tool"
version = "2.0.16"
description = "Tool"
authors = [
"Amal <???@...>"
]
readme = "README.rst"
include = [
]
classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: Other/Proprietary License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
]
[tool.poetry.dependencies]
python = "^3.7"
bit-vector = "0.42a0"
click = "^7.0"
click_completion = "^0.5.0"
click_help_colors = "^0.5.0"
coloredlogs = "^10.0"
prompt-toolkit = "^2.0"
Pygments = "^2.3"
PyXB = "^1.2"
sly = "^0.3.0"
sty = "1.0.0b8"
tabulate = "^0.8.2"
termcolor = "^1.1"
[tool.poetry.dev-dependencies]
# Documentation
sphinx = "^1.8"
sphinx-rtd-theme = "^0.4.2"
sphinx-click = "^1.4"
# Test
pytest = "^4.0"
pytest-cov = "^2.6"
pytest-flake8 = "^1.0"
pytest-pylint = "^0.14.0"
[tool.poetry.scripts]
tool = "tool.cli:main"
[[tool.poetry.source]]
name = "thw"
url = "https://artifactory/api/pypi/pypi-mirror/simple"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Issue
When I try to see the list of outdated dependencies (poetry show --outdated), poetry hangs. And “poetry updated” gets stuck on “Resolving dependencies” and incrementing time (166.8s).
Running with --vvv:
$ poetry -vvv show --outdated
Using virtualenv: .../.venv
Pressing CTRL+C shows:
^C
[KeyboardInterrupt]
Exception trace:
.venv/lib/python3.7/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
.venv/lib/python3.7/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
.venv/lib/python3.7/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
.venv/lib/python3.7/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
.venv/lib/python3.7/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
.venv/lib/python3.7/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
.venv/lib/python3.7/site-packages/poetry/console/commands/show.py in handle() at line 124
latest = self.find_latest_package(locked)
.venv/lib/python3.7/site-packages/poetry/console/commands/show.py in find_latest_package() at line 305
return selector.find_best_candidate(name, ">={}".format(package.pretty_version))
.venv/lib/python3.7/site-packages/poetry/version/version_selector.py in find_best_candidate() at line 29
package_name, constraint, allow_prereleases=allow_prereleases
.venv/lib/python3.7/site-packages/poetry/repositories/pool.py in find_packages() at line 65
name, constraint, extras=extras, allow_prereleases=allow_prereleases
.venv/lib/python3.7/site-packages/poetry/repositories/pypi_repository.py in find_packages() at line 105
info = self.get_package_info(name)
.venv/lib/python3.7/site-packages/poetry/repositories/pypi_repository.py in get_package_info() at line 238
name, lambda: self._get_package_info(name)
.venv/lib/python3.7/site-packages/cachy/repository.py in remember_forever() at line 174
val = value(callback)
.venv/lib/python3.7/site-packages/cachy/helpers.py in value() at line 6
return val()
.venv/lib/python3.7/site-packages/poetry/repositories/pypi_repository.py in <lambda>() at line 238
name, lambda: self._get_package_info(name)
.venv/lib/python3.7/site-packages/poetry/repositories/pypi_repository.py in _get_package_info() at line 242
data = self._get("pypi/{}/json".format(name))
.venv/lib/python3.7/site-packages/poetry/repositories/pypi_repository.py in _get() at line 391
json_response = self._session.get(self._url + endpoint)
.venv/lib/python3.7/site-packages/requests/sessions.py in get() at line 546
return self.request('GET', url, **kwargs)
.venv/lib/python3.7/site-packages/requests/sessions.py in request() at line 533
resp = self.send(prep, **send_kwargs)
.venv/lib/python3.7/site-packages/requests/sessions.py in send() at line 646
r = adapter.send(request, **kwargs)
.venv/lib/python3.7/site-packages/cachecontrol/adapter.py in send() at line 53
resp = super(CacheControlAdapter, self).send(request, **kw)
.venv/lib/python3.7/site-packages/requests/adapters.py in send() at line 533
return self.build_response(request, resp)
.venv/lib/python3.7/site-packages/cachecontrol/adapter.py in build_response() at line 80
request, response
.venv/lib/python3.7/site-packages/cachecontrol/controller.py in update_cached_response() at line 365
self.cache.set(cache_url, self.serializer.dumps(request, cached_response))
.venv/lib/python3.7/site-packages/cachecontrol/caches/file_cache.py in set() at line 126
with self.lock_class(name) as lock:
.venv/lib/python3.7/site-packages/lockfile/__init__.py in __enter__() at line 197
self.acquire()
.venv/lib/python3.7/site-packages/lockfile/linklockfile.py in acquire() at line 50
time.sleep(timeout is not None and timeout / 10 or 0.1)
Update with verbose shows:
$ poetry -vvv update
Using virtualenv: .venv
Updating dependencies
Resolving dependencies...
1: fact: tool is 2.0.16
1: derived: tool
1: fact: tool depends on bit-vector (0.42a0)
1: fact: tool depends on click (^7.0)
1: fact: tool depends on click_completion (^0.5.0)
1: fact: tool depends on click_help_colors (^0.5.0)
1: fact: tool depends on coloredlogs (^10.0)
1: fact: tool depends on prompt-toolkit (^2.0)
1: fact: tool depends on Pygments (^2.3)
1: fact: tool depends on PyXB (^1.2)
1: fact: tool depends on sly (^0.3.0)
1: fact: tool depends on sty (1.0.0b8)
1: fact: tool depends on tabulate (^0.8.2)
1: fact: tool depends on termcolor (^1.1)
1: fact: tool depends on sphinx (^1.8)
1: fact: tool depends on sphinx-rtd-theme (^0.4.2)
1: fact: tool depends on sphinx-click (^1.4)
1: fact: tool depends on pytest (^4.0)
1: fact: tool depends on pytest-cov (^2.6)
1: fact: tool depends on pytest-flake8 (^1.0)
1: fact: tool depends on pytest-pylint (^0.14.0)
1: selecting tool (2.0.16)
1: derived: pytest-pylint (^0.14.0)
1: derived: pytest-flake8 (^1.0)
1: derived: pytest-cov (^2.6)
1: derived: pytest (^4.0)
1: derived: sphinx-click (^1.4)
1: derived: sphinx-rtd-theme (^0.4.2)
1: derived: sphinx (^1.8)
1: derived: termcolor (^1.1)
1: derived: tabulate (^0.8.2)
1: derived: sty (1.0.0b8)
1: derived: sly (^0.3.0)
1: derived: PyXB (^1.2)
1: derived: Pygments (^2.3)
1: derived: prompt-toolkit (^2.0)
1: derived: coloredlogs (^10.0)
1: derived: click_help_colors (^0.5.0)
1: derived: click_completion (^0.5.0)
1: derived: click (^7.0)
1: derived: bit-vector (0.42a0)
PyPI: 1 packages found for pytest-pylint >=0.14.0,<0.15.0
1: fact: pytest-pylint (0.14.0) depends on pytest (>=2.7)
1: fact: pytest-pylint (0.14.0) depends on pylint (>=1.4.5)
1: fact: pytest-pylint (0.14.0) depends on six (*)
1: selecting pytest-pylint (0.14.0)
1: derived: six (*)
1: derived: pylint (>=1.4.5)
PyPI: 4 packages found for pytest-flake8 >=1.0,<2.0
1: fact: pytest-flake8 (1.0.3) depends on flake8 (>=3.5)
1: fact: pytest-flake8 (1.0.3) depends on pytest (>=3.5)
1: selecting pytest-flake8 (1.0.3)
1: derived: flake8 (>=3.5)
PyPI: 2 packages found for pytest-cov >=2.6,<3.0
1: fact: pytest-cov (2.6.1) depends on pytest (>=3.6)
1: fact: pytest-cov (2.6.1) depends on coverage (>=4.4)
1: selecting pytest-cov (2.6.1)
1: derived: coverage (>=4.4)
PyPI: 5 packages found for pytest >=4.0,<5.0
1: fact: pytest (4.1.1) depends on py (>=1.5.0)
1: fact: pytest (4.1.1) depends on six (>=1.10.0)
1: fact: pytest (4.1.1) depends on attrs (>=17.4.0)
1: fact: pytest (4.1.1) depends on more-itertools (>=4.0.0)
1: fact: pytest (4.1.1) depends on atomicwrites (>=1.0)
1: fact: pytest (4.1.1) depends on pluggy (>=0.7)
1: fact: pytest (4.1.1) depends on colorama (*)
1: selecting pytest (4.1.1)
1: derived: colorama (*)
1: derived: pluggy (>=0.7)
1: derived: atomicwrites (>=1.0)
1: derived: more-itertools (>=4.0.0)
1: derived: attrs (>=17.4.0)
1: derived: six (>=1.10.0)
1: derived: py (>=1.5.0)
PyPI: 2 packages found for sphinx-click >=1.4,<2.0
1: fact: sphinx-click (1.4.1) depends on pbr (>=2.0)
1: fact: sphinx-click (1.4.1) depends on sphinx (>=1.5,<2.0)
1: selecting sphinx-click (1.4.1)
1: derived: pbr (>=2.0)
PyPI: No release information found for sphinx-rtd-theme-0.1.0, skipping
PyPI: 1 packages found for sphinx-rtd-theme >=0.4.2,<0.5.0
1: fact: sphinx-rtd-theme (0.4.2) depends on sphinx (*)
1: selecting sphinx-rtd-theme (0.4.2)
PyPI: 4 packages found for sphinx >=1.8,<2.0
1: fact: sphinx (1.8.3) depends on six (>=1.5)
1: fact: sphinx (1.8.3) depends on Jinja2 (>=2.3)
1: fact: sphinx (1.8.3) depends on Pygments (>=2.0)
1: fact: sphinx (1.8.3) depends on docutils (>=0.11)
1: fact: sphinx (1.8.3) depends on snowballstemmer (>=1.1)
1: fact: sphinx (1.8.3) depends on babel (>=1.3,<2.0 || >2.0)
1: fact: sphinx (1.8.3) depends on alabaster (>=0.7,<0.8)
1: fact: sphinx (1.8.3) depends on imagesize (*)
1: fact: sphinx (1.8.3) depends on requests (>=2.0.0)
1: fact: sphinx (1.8.3) depends on packaging (*)
1: fact: sphinx (1.8.3) depends on sphinxcontrib-websupport (*)
1: fact: sphinx (1.8.3) depends on colorama (>=0.3.5)
1: selecting sphinx (1.8.3)
1: derived: colorama (>=0.3.5)
1: derived: sphinxcontrib-websupport (*)
1: derived: packaging (*)
1: derived: requests (>=2.0.0)
1: derived: imagesize (*)
1: derived: alabaster (>=0.7,<0.8)
1: derived: babel (>=1.3,<2.0 || >2.0)
1: derived: snowballstemmer (>=1.1)
1: derived: docutils (>=0.11)
1: derived: Jinja2 (>=2.3)
PyPI: 1 packages found for termcolor >=1.1,<2.0
1: selecting termcolor (1.1.0)
PyPI: 1 packages found for tabulate >=0.8.2,<0.9.0
1: selecting tabulate (0.8.2)
PyPI: 1 packages found for sty 1.0.0b8
1: selecting sty (1.0.0b8)
PyPI: 1 packages found for sly >=0.3.0,<0.4.0
1: selecting sly (0.3)
PyPI: 6 packages found for pyxb >=1.2,<2.0
1: selecting pyxb (1.2.6)
PyPI: 2 packages found for pygments >=2.3,<3.0
1: selecting pygments (2.3.1)
PyPI: 7 packages found for prompt-toolkit >=2.0,<3.0
1: fact: prompt-toolkit (2.0.7) depends on six (>=1.9.0)
1: fact: prompt-toolkit (2.0.7) depends on wcwidth (*)
1: selecting prompt-toolkit (2.0.7)
1: derived: wcwidth (*)
PyPI: 1 packages found for coloredlogs >=10.0,<11.0
1: fact: coloredlogs (10.0) depends on humanfriendly (>=4.7)
1: fact: coloredlogs (10.0) depends on colorama (*)
1: selecting coloredlogs (10.0)
1: derived: humanfriendly (>=4.7)
PyPI: 1 packages found for click-help-colors >=0.5.0,<0.6.0
1: fact: click-help-colors (0.5) depends on click (>=7.0)
1: selecting click-help-colors (0.5)
PyPI: 1 packages found for click-completion >=0.5.0,<0.6.0
1: fact: click-completion (0.5.0) depends on click (*)
1: fact: click-completion (0.5.0) depends on jinja2 (*)
1: fact: click-completion (0.5.0) depends on six (*)
1: fact: click-completion (0.5.0) depends on shellingham (*)
1: selecting click-completion (0.5.0)
1: derived: shellingham (*)
PyPI: 1 packages found for click >=7.0,<8.0
1: selecting click (7.0)
PyPI: 1 packages found for bit-vector 0.42a0
1: fact: bit-vector (0.42a0) depends on numpy (*)
1: selecting bit-vector (0.42a0)
1: derived: numpy (*)
PyPI: 3 packages found for six >=1.10.0
1: selecting six (1.12.0)
PyPI: No release information found for pylint-0.10.0, skipping
PyPI: No release information found for pylint-0.11.0, skipping
PyPI: No release information found for pylint-0.12.1, skipping
PyPI: No release information found for pylint-0.13.0, skipping
PyPI: No release information found for pylint-0.14.0, skipping
PyPI: No release information found for pylint-0.4.1, skipping
PyPI: No release information found for pylint-0.6.0, skipping
PyPI: No release information found for pylint-0.6.1, skipping
PyPI: No release information found for pylint-0.7.0, skipping
PyPI: No release information found for pylint-0.8.1, skipping
PyPI: 38 packages found for pylint >=1.4.5
1: fact: pylint (2.2.2) depends on astroid (>=2.0.0)
1: fact: pylint (2.2.2) depends on isort (>=4.2.5)
1: fact: pylint (2.2.2) depends on mccabe (*)
1: fact: pylint (2.2.2) depends on colorama (*)
1: selecting pylint (2.2.2)
1: derived: mccabe (*)
1: derived: isort (>=4.2.5)
1: derived: astroid (>=2.0.0)
PyPI: 2 packages found for flake8 >=3.5
1: fact: flake8 (3.6.0) depends on pyflakes (>=2.0.0,<2.1.0)
1: fact: flake8 (3.6.0) depends on pycodestyle (>=2.4.0,<2.5.0)
1: fact: flake8 (3.6.0) depends on mccabe (>=0.6.0,<0.7.0)
1: selecting flake8 (3.6.0)
1: derived: mccabe (>=0.6.0,<0.7.0)
1: derived: pycodestyle (>=2.4.0,<2.5.0)
1: derived: pyflakes (>=2.0.0,<2.1.0)
PyPI: No release information found for coverage-2.5, skipping
PyPI: No release information found for coverage-2.6, skipping
PyPI: No release information found for coverage-2.75, skipping
PyPI: No release information found for coverage-2.76, skipping
PyPI: No release information found for coverage-2.77, skipping
PyPI: No release information found for coverage-2.78, skipping
PyPI: No release information found for coverage-2.8, skipping
PyPI: No release information found for coverage-2.80, skipping
PyPI: No release information found for coverage-2.85, skipping
PyPI: 6 packages found for coverage >=4.4
1: selecting coverage (4.5.2)
PyPI: 7 packages found for colorama >=0.3.5
1: selecting colorama (0.4.1)
PyPI: 3 packages found for pluggy >=0.7
1: selecting pluggy (0.8.1)
PyPI: 5 packages found for atomicwrites >=1.0
1: selecting atomicwrites (1.2.1)
PyPI: 6 packages found for more-itertools >=4.0.0
1: fact: more-itertools (5.0.0) depends on six (>=1.0.0,<2.0.0)
1: selecting more-itertools (5.0.0)
PyPI: 3 packages found for attrs >=17.4.0
1: selecting attrs (18.2.0)
PyPI: No release information found for py-0.8.0-alpha2, skipping
PyPI: No release information found for py-0.9.0, skipping
PyPI: No release information found for py-1.4.32.dev1, skipping
PyPI: 6 packages found for py >=1.5.0
1: selecting py (1.7.0)
PyPI: 18 packages found for pbr >=2.0
1: selecting pbr (5.1.1)
PyPI: 3 packages found for sphinxcontrib-websupport *
1: selecting sphinxcontrib-websupport (1.1.0)
PyPI: 23 packages found for packaging *
1: fact: packaging (19.0) depends on pyparsing (>=2.0.2)
1: fact: packaging (19.0) depends on six (*)
1: selecting packaging (19.0)
1: derived: pyparsing (>=2.0.2)
PyPI: No release information found for requests-0.0.1, skipping
PyPI: No release information found for requests-0.12.01, skipping
PyPI: No release information found for requests-2.15.0, skipping
PyPI: 57 packages found for requests >=2.0.0
1: fact: requests (2.21.0) depends on chardet (>=3.0.2,<3.1.0)
1: fact: requests (2.21.0) depends on idna (>=2.5,<2.9)
1: fact: requests (2.21.0) depends on urllib3 (>=1.21.1,<1.25)
1: fact: requests (2.21.0) depends on certifi (>=2017.4.17)
1: selecting requests (2.21.0)
1: derived: certifi (>=2017.4.17)
1: derived: urllib3 (>=1.21.1,<1.25)
1: derived: idna (>=2.5,<2.9)
1: derived: chardet (>=3.0.2,<3.1.0)
PyPI: 6 packages found for imagesize *
1: selecting imagesize (1.1.0)
PyPI: No release information found for alabaster-0.0.1, skipping
PyPI: 12 packages found for alabaster >=0.7,<0.8
1: selecting alabaster (0.7.12)
PyPI: No release information found for babel-0.8, skipping
PyPI: No release information found for babel-0.8.1, skipping
PyPI: No release information found for babel-0.9, skipping
PyPI: No release information found for babel-0.9.1, skipping
PyPI: No release information found for babel-0.9.2, skipping
PyPI: No release information found for babel-0.9.3, skipping
PyPI: No release information found for babel-0.9.4, skipping
PyPI: No release information found for babel-0.9.5, skipping
PyPI: 14 packages found for babel >=1.3,<2.0 || >2.0
1: fact: babel (2.6.0) depends on pytz (>=0a)
1: selecting babel (2.6.0)
1: derived: pytz (>=0a)
PyPI: 3 packages found for snowballstemmer >=1.1
1: selecting snowballstemmer (1.2.1)
PyPI: 4 packages found for docutils >=0.11
1: selecting docutils (0.14)
PyPI: 25 packages found for jinja2 >=2.3
1: fact: jinja2 (2.10) depends on MarkupSafe (>=0.23)
1: selecting jinja2 (2.10)
1: derived: MarkupSafe (>=0.23)
PyPI: 9 packages found for wcwidth *
1: selecting wcwidth (0.1.7)
PyPI: 14 packages found for humanfriendly >=4.7
1: fact: humanfriendly (4.17) depends on pyreadline (*)
1: selecting humanfriendly (4.17)
1: derived: pyreadline (*)
PyPI: 11 packages found for shellingham *
1: selecting shellingham (1.2.8)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:20 (1 by maintainers)
Top Results From Across the Web
Python's poetry hangs while solving dependencies
Almost every command I try simply hangs my terminal until I hit ctrl+c. I'm trying to do a. poetry update. on a particular...
Read more >Poetry hangs when installing torch - python - Stack Overflow
When I've installed packages with Poetry, I've seen some packages, ... PyPI: 1 packages found for pylint Updating dependencies Resolving ...
Read more >Commands | master | Documentation | Poetry - Python ...
This will resolve all dependencies of the project and write the exact ... --outdated (-o) : Show the latest version but only for...
Read more >Song of Myself (1892 version) by Walt Whitman
The farmer stops by the bars as he walks on a First-day loafe and looks at the oats and rye,. The lunatic is...
Read more >Ask HN: Why Poetry did not become a mainstream package ...
do an smt solve and then install the wheels. Pip just starts installing packages, hopes for the best, sometimes backtracks, often gets stuck...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I ran into a similar issue today with poetry version 1.1.4. I was able to “solve” it by doing:
poetry cache clear --all .rm poetry.lockpoetry install -vvv(for some reason, I ran it without the-vvvflag before and it kept hanging, at least with-vvvI see what’s happening) 🤷🏻I hit the same and I can confirm that running:
poetry cache:clear --all .solves the problem