New version has import errors
See original GitHub issueHey there, I’m super excited about the new version of both prompt_toolkit and ptpython. I just installed the newest versions of both, as well as iPython (pip list shows prompt_toolkit==2.0.5
, ptpython==2.0.1
, ipython==7.0.1
). Upon trying to launch ptpython I get various import errors:
ImportError: cannot import name 'PathCompleter' from 'prompt_toolkit.contrib.completers'
since https://github.com/jonathanslenders/ptpython/blob/6c0b99ea2b4be963b42c1062b2f33880ba30b6d3/ptpython/ipython.py#L14 is still using the old path for PathCompleter
and WordCompleter
, and fixing that raises an issue with https://github.com/jonathanslenders/ptpython/blob/9b61c9941bd4a5dff61c7bbb03172b0a515ee83b/ptpython/ipython.py#L19 since CommandLineInterface
has been removed.
Is there a newer version of this file which supports prompt_toolkit 2.0?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:9 (5 by maintainers)
Thanks! I just realised this issue is about ptipython, which is broken indeed. IPython and ptpython should work in the same environment. I’ll fix it asap.
Thanks for reminding me! Give me a little more time. Yesterday I pushed a new prompt_toolkit release with some fixes for IPython itself (something that certain people were experiencing in iTerm2). Today, I’ve fixed another bug in prompt_toolkit that the pgcli/mycli people had. Another release will follow. This will come soon, I know you are a lot of people using ptipython.