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

poetry 1.0.0b4 hangs #1565

Closed
jabbalaci opened this issue Nov 10, 2019 · 9 comments · Fixed by #1788
Closed

poetry 1.0.0b4 hangs #1565

jabbalaci opened this issue Nov 10, 2019 · 9 comments · Fixed by #1788
Labels
kind/bug Something isn't working as expected

Comments

@jabbalaci
Copy link

$ poetry self:update --preview
Updating to 1.0.0b4
 - Downloading poetry-1.0.0b4-linux.tar.gz 100%

Poetry (1.0.0b4) is installed now. Great!

When I try to start poetry, it hangs, nothing happens:

$ poetry

Then, if I terminate it with Ctrl+C, this is the output I get:

^CTraceback (most recent call last):
  File "/home/jabba/.poetry/bin/poetry", line 12, in <module>
    from poetry.console import main
  File "/home/jabba/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/jabba/.poetry/lib/poetry/console/application.py", line 5, in <module>
    from .commands.about import AboutCommand
  File "/home/jabba/.poetry/lib/poetry/console/commands/__init__.py", line 4, in <module>
    from .check import CheckCommand
  File "/home/jabba/.poetry/lib/poetry/console/commands/check.py", line 1, in <module>
    from poetry.factory import Factory
  File "/home/jabba/.poetry/lib/poetry/factory.py", line 17, in <module>
    from .packages.dependency import Dependency
  File "/home/jabba/.poetry/lib/poetry/packages/__init__.py", line 7, in <module>
    from .dependency import Dependency
  File "/home/jabba/.poetry/lib/poetry/packages/dependency.py", line 10, in <module>
    from poetry.utils.helpers import canonicalize_name
  File "/home/jabba/.poetry/lib/poetry/utils/helpers.py", line 11, in <module>
    from keyring import delete_password
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/core.py", line 189, in <module>
    init_backend()
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/core.py", line 91, in init_backend
    keyrings = filter(limit, backend.get_all_keyring())
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/util/__init__.py", line 22, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/backend.py", line 204, in get_all_keyring
    return list(rings)
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/util/__init__.py", line 33, in suppress_exceptions
    for callable in callables:
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/util/properties.py", line 26, in __get__
    return self.fget.__get__(None, owner)()
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/backend.py", line 64, in viable
    cls.priority
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/util/properties.py", line 26, in __get__
    return self.fget.__get__(None, owner)()
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/keyring/backends/SecretService.py", line 41, in priority
    list(secretstorage.get_all_collections(bus))
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/secretstorage/collection.py", line 153, in get_all_collections
    for collection_path in service.get_property('Collections'):
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/secretstorage/util.py", line 65, in get_property
    (signature, value), = self.send_and_get_reply(msg)
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/secretstorage/util.py", line 47, in send_and_get_reply
    return self._connection.send_and_get_reply(msg)
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/jeepney/integrate/blocking.py", line 67, in send_and_get_reply
    self.recv_messages()
  File "/home/jabba/.poetry/lib/poetry/_vendor/py3.7/jeepney/integrate/blocking.py", line 55, in recv_messages
    b = self.sock.recv(4096)
KeyboardInterrupt

Environment: Manjaro Linux, Python 3.7

@jabbalaci jabbalaci added the kind/bug Something isn't working as expected label Nov 10, 2019
@jabbalaci
Copy link
Author

Does anybody else have this problem?

@uhlajs
Copy link

uhlajs commented Dec 4, 2019

Yes, I do. I am using Arch (Sway/Wayland) and it seems to be some bug connected with Wayland, because when I use console this problem does not occure.

@jabbalaci
Copy link
Author

Version 1.0.0 came out. I updated poetry 0.12.17 to the stable 1.0.0 and it still hangs on Manjaro. Developers of poetry: how to solve this issue?

@janw
Copy link

janw commented Dec 12, 2019

This is a drive-by armchair comment, but maybe it helps: Looking at the traceback on where it’s at when interrupted, it looks to me like an issue with the keyring library that Poetry uses/vendors. Probably a connection error because dbus isn’t running or gnome-keyring not being installed or something? Maybe check its setup instructions and see if that works on its own first?

@Ivoz
Copy link

Ivoz commented Dec 13, 2019

Sure maybe keyring hasn't got all its proper dependencies that the user could manually fix, but if the poetry self-installer isn't automatically providing that or warning about it in the first place, this is a horrible UX for a default install.

@janw
Copy link

janw commented Dec 13, 2019

You’re definitely not wrong. I’d still regard this as an upstream bug in keyring or secretstorage, that is also difficult to run into in the first place. My above suggestion was more meant as an exploratory mission to find out if it is indeed that.


Implementation-wise when looking at the poetry/utils/helpers.py module, I think it’s not ideal that the imports from keyring are at its top of file. That causes the keyring’s init process to trigger, and look for backends etc. on every run of poetry, regardless if any used credentials in are actually stored in the system keyring, and more so without them being needed to perform the current command.

I’d move the components depending on from keyring … imports into a separate helpers module and in turn import those locally where specifically needed, what do you think @sdispater ?

@jabbalaci
Copy link
Author

jabbalaci commented Dec 28, 2019

I still have the hanging problem. I installed poetry using the preferred way (curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python), but after launch it still hangs.

Environment: Manjaro Linux, Python 3.8.0, poetry 1.0.0 .

Update: if I let it run, poetry executes after 90 seconds. So something still makes it wait for a very long time.

@jabbalaci
Copy link
Author

The issue got solved! Manjaro came out with a larger update and the new poetry doesn't hang. Current version of poetry is 1.0.2.

Copy link

github-actions bot commented Mar 3, 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 3, 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