prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Problems with using pgcli

Open
#557 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

The following error occurs above the 1.0.0 version:
-> % pgcli -h localhost -p 5432 -U postgres -W
Password:
Traceback (most recent call last):
File "/usr/bin/pgcli", line 9, in
load_entry_point('pgcli==0.20.1', 'console_scripts', 'console')()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/share/pgcli/pgcli/main.py", line 595, in cli
pgcli.run_cli()
File "/usr/share/pgcli/pgcli/main.py", line 278, in run_cli
self.cli = self._build_cli()
File "/usr/share/pgcli/pgcli/main.py", line 408, in _build_cli
cli = CommandLineInterface(application=application)
File "/usr/local/lib/python3.5/dist-packages/prompt_toolkit/interface.py", line 67, in init
assert isinstance(eventloop, EventLoop)
AssertionError

When I install version 0.59, I can use it properly
sudo pip install prompt_toolkit==0.59
-> % pgcli -h localhost -p 5432 -U postgres -W
Password:
Version: 0.20.1
Chat: https://gitter.im/dbcli/pgcli
Mail: https://groups.google.com/forum/#!forum/pgcli
Home: http://pgcli.com
postgres>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the pgcli command shown and start at pgcli/main.py around run_cli and _build_cli, then inspect prompt_toolkit/interface.py where the EventLoop assertion fails. Compare the compatibility expectations for prompt-toolkit versions above 1.0.0; done means pgcli starts and connects successfully without requiring prompt-toolkit 0.59.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
cli, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.