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

Any chance to port to prompt_toolkit 3? #184

Open
Flexximilian opened this issue Nov 27, 2020 · 7 comments
Open

Any chance to port to prompt_toolkit 3? #184

Flexximilian opened this issue Nov 27, 2020 · 7 comments

Comments

@Flexximilian
Copy link

Hi!

I just learned about this little gem today and ended up trying to write a Gentoo Ebuild for http-prompt, but one thing missing from the official Gentoo tree is a prompt_toolkit < 2.0.0... Is there a chance to support prompt_toolkit 2 or 3, or are there tons of work to migrate? (Hmm... The "Why all the breaking changes?" header on their migration page isn't a good sign I guess... ;) )

AFAIK, Gentoo is trying to move on from Python <3.6 (or <2.7), so overlaying a prompt_toolkit version < 2.0.0 isn't really a good option...

But since I'm not at all a Python coder, I am a bit wary of even trying myself to be honest.

@D4N
Copy link

D4N commented Jun 23, 2021

I'd like to add a +1 to this request, as I ran into exactly this issue when trying to package http-prompt for Fedora, where we have prompt_toolkit version 3.

@BoboTiG
Copy link
Contributor

BoboTiG commented Aug 5, 2021

Done with 6943959.

@BoboTiG BoboTiG closed this as completed Aug 5, 2021
@llchan
Copy link

llchan commented Oct 12, 2021

Sorry if I'm misreading something, but I think that commit bumps to prompt-toolkit v2 but this issue is about prompt-toolkit v3?

@rixx
Copy link

rixx commented Nov 9, 2021

Yeah, +1 – I can't use http-prompt on my laptop anymore, because the system version of prompt_toolkit is v3, and http-prompt doesn't work with that one:

ImportError: cannot import name 'AbortAction' from 'prompt_toolkit' (/usr/lib/python3.9/site-packages/prompt_toolkit/__init__.py)

In the meantime, it would be nice to have an easy way to start http-prompt via Python, like python -m http_prompt or python -m http_prompt.cli, because that makes running http-prompt from a virtualenv much easier. If you want to do this, find your cli.py file and add two lines at the bottom:

if __name__ == "__main__":
    cli()

@BoboTiG BoboTiG reopened this Nov 9, 2021
@alcir
Copy link

alcir commented Jan 8, 2022

bump

@uda
Copy link

uda commented Mar 9, 2022

I didn't install in the system level, rather through pyenv, and I usually install ipython as part of adding a python version, but ipython and http-prompt can't be in the same venv or pyenv because of this dependency clash

So updating to v3 would really help

But since http-prompt does not involve python coding, I opted for using it as a tool and not another python package, so installing with pipx did the trick:

pip uninstall -y http-prompt
pip install -U pipx
pipx install http-prompt

@Rabbit9090
Copy link

Rabbit9090 commented Mar 10, 2022

@#
Duplicate of #mm mail

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

No branches or pull requests

8 participants