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

Use latest prompt_toolkit #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

J4NS-R
Copy link

@J4NS-R J4NS-R commented Nov 11, 2022

This resolves an import error in the collections library when using python 3.10 or higher.

ImportError: cannot import name 'Mapping' from 'collections' (/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)

@cdelahanty
Copy link

Love the 3.10 migration work! Forced the update to prompt_toolkit=3.0.32 on my machine and it introduces an import error. More work would need to resolve that:
image

bkus added a commit to HamWAN/packer-routeros that referenced this pull request Jan 21, 2023
There's a fix for the PyInquirer breakage:
  CITGuru/PyInquirer#194
But PyInquirer doesn't have a maintainer anymore:
  CITGuru/PyInquirer#159

The sudo bundle update is because some gems have native extensions, and those
don't get installed or recognized properly by the subsequent rake build.
@S4nd3sh
Copy link

S4nd3sh commented Jul 27, 2023

I know the PyPi is not up to date and forces users to install older prompt-toolkit.

The workaround for me that worked is to install from the latest commit. It did pull the prompt-toolkit 3.x.xx and didn't raise any errors when loading it.
'pyInquirer @ git+https://github.com/CITGuru/PyInquirer.git#7637373429bec66788650cda8091b7a6f12929ee'

The change I made in the code moving from PyPi install is change the import of prompt from PyInquirer,
from PyInquirer import prompt change to from PyInquirer.prompt import prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants