Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invoking poetry with no arguments takes up to two minutes to complete #1779

Closed
2 of 3 tasks
matthewfranglen opened this issue Dec 20, 2019 · 3 comments · Fixed by #1788
Closed
2 of 3 tasks

Invoking poetry with no arguments takes up to two minutes to complete #1779

matthewfranglen opened this issue Dec 20, 2019 · 3 comments · Fixed by #1788
Labels
kind/bug Something isn't working as expected

Comments

@matthewfranglen
Copy link

  • 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 (-vvv option).

  • OS version and name: Ubuntu 18.04.3

  • Poetry version: 1.0.0

  • Link of a Gist with the contents of your pyproject.toml file: This can occur without a project.

Issue

I have installed poetry in pipx which is using python 3.7.4 using the command:

pipx install poetry

When I invoke poetry it takes up to 2 minutes to print the default help text.
If I cancel it while it is doing this then the stack trace shows it using jeepney to load secrets?

➜ poetry
^CTraceback (most recent call last):
  File "/home/matthew/.local/bin/poetry", line 5, in <module>
    from poetry.console import main
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/console/application.py", line 5, in <module>
    from .commands.about import AboutCommand
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/console/commands/__init__.py", line 4, in <module>
    from .check import CheckCommand
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/console/commands/check.py", line 1, in <module>
    from poetry.factory import Factory
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/factory.py", line 17, in <module>
    from .packages.dependency import Dependency
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/packages/__init__.py", line 7, in <module>
    from .dependency import Dependency
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/packages/dependency.py", line 10, in <module>
    from poetry.utils.helpers import canonicalize_name
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/utils/helpers.py", line 11, in <module>
    from keyring import delete_password
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/core.py", line 192, in <module>
    init_backend()
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/core.py", line 96, in init_backend
    filter(limit, backend.get_all_keyring()),
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/util/__init__.py", line 22, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/backend.py", line 219, in get_all_keyring
    return list(rings)
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/util/__init__.py", line 33, in suppress_exceptions
    for callable in callables:
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/util/properties.py", line 26, in __get__
    return self.fget.__get__(None, owner)()
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/backend.py", line 68, in viable
    cls.priority
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/util/properties.py", line 26, in __get__
    return self.fget.__get__(None, owner)()
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 41, in priority
    list(secretstorage.get_all_collections(bus))
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/secretstorage/collection.py", line 153, in get_all_collections
    for collection_path in service.get_property('Collections'):
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/secretstorage/util.py", line 65, in get_property
    (signature, value), = self.send_and_get_reply(msg)
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/secretstorage/util.py", line 47, in send_and_get_reply
    return self._connection.send_and_get_reply(msg)
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/jeepney/integrate/blocking.py", line 67, in send_and_get_reply
    self.recv_messages()
  File "/home/matthew/.local/pipx/venvs/poetry/lib/python3.7/site-packages/jeepney/integrate/blocking.py", line 55, in recv_messages
    b = self.sock.recv(4096)
KeyboardInterrupt
@matthewfranglen matthewfranglen added the kind/bug Something isn't working as expected label Dec 20, 2019
@matthewfranglen
Copy link
Author

If I insert return None as the first line in the get_all_collections method in .../.local/pipx/venvs/poetry/lib/python3.7/site-packages/secretstorage/collection.py (line 152) then poetry works as fast as I would expect.

Presumably the DBus stuff is used to support installing from protected sources, so this is just a hack to get things working rather than a long term solution.

@matthewfranglen
Copy link
Author

I can create a project and install pypi dependencies (I tested it using requests) without needing the DBus functionality.

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

Successfully merging a pull request may close this issue.

1 participant