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

Loosen the version constraint of prompt_toolkitto avoid dependency #75

Closed
NeolithEra opened this issue Aug 8, 2019 · 6 comments
Closed

Comments

@NeolithEra
Copy link

Hi, PyInquirer locked the version constraint of **prompt_toolkitto
**
as prompt_toolkitto==1.0.14, which leads to a troubling scenario that its direct downstream project [mqtt-sentinel,infraless, protomate] has to lock prompt_toolkitto.

Could you please loosen the version constraint of prompt_toolkitto?
Benefit of this is that users using both of [mqtt-sentinel,infraless, protomate] and prompt_toolkitto can upgrade their third party libraries in a timely manner to reduce technical debts.

Solution

The dependency trees of your project and affected downstream projects are shown as follows.
Taking the version constraints of upstream and downstream projects into comprehensive consideration, you can

  1. Loosen prompt_toolkitto==1.0.14 be prompt_toolkitto>=1.0.14.
  2. Loosen prompt_toolkitto==1.0.14 be prompt_toolkitto==*.
  3. Try to add an upper bound for prompt_toolkitto version constraint, according to your compatibility.

@CITGuru Please let me know your choice. I can submit a PR to fix this issue.

Thanks for your attention.
Best,
Neolith

@NeolithEra
Copy link
Author

Dependency tree-----

PyInquirer-1.0.3
| +-prompt-toolkit(version range:==1.0.14)
| | +-six(version range:>=1.9.0)
| | +-wcwidth(version range:*)
| +-pygments(version range:>=2.2.0)
| | +-coverage(version range:*)
| | +-nose(version range:*)
| | +-pyflakes(version range:*)
| | +-pylint(version range:*)
| | +-tox(version range:*)
| +-regex(version range:>=2016.11.21)
_**Direct downstream project:**_

mqtt-sentinel-0.8.2
| +-click(version range:==7.0)
| +-colorama(version range:==0.4.1)
| +-paho-mqtt(version range:==1.4.0)
| +-prompt-toolkit(version range:==1.0.14)
| | +-six(version range:>=1.9.0)
| | +-wcwidth(version range:*)
| +-pyinquirer(version range:==1.0.3)
| | +-prompt-toolkit(version range:==1.0.14)
| | | +-six(version range:>=1.9.0)
| | | +-wcwidth(version range:*)
| | +-pygments(version range:>=2.2.0)
| | | +-coverage(version range:*)
| | | +-nose(version range:*)
| | | +-pyflakes(version range:*)
| | | +-pylint(version range:*)
| | | +-tox(version range:*)
| | +-regex(version range:>=2016.11.21)
| +-requests(version range:==2.21.0)
| | +-certifi(version range:>=2017.4.17)
| | +-chardet(version range:<3.1.0,>=3.0.2)
| | +-idna(version range:>=2.5,<2.9)
| | +-urllib3(version range:>=1.21.1,<1.25)
infraless-0.0.6a0
| +-astroid(version range:==2.2.5)
| +-cement(version range:==3.0.4)
| +-colorama(version range:==0.4.1)
| +-colorlog(version range:==4.0.2)
| +-entrypoints(version range:==0.3)
| +-flake8(version range:==3.7.7)
| +-isort(version range:==4.3.20)
| | +-backports-functools-lru-cache(version range:*)
| | +-futures(version range:*)
| +-jinja2(version range:==2.10.1)
| | +-markupsafe(version range:>=0.23)
| +-lazy-object-proxy(version range:==1.4.1)
| +-markupsafe(version range:==1.1.1)
| +-mccabe(version range:==0.6.1)
| +-pprint(version range:==0.1)
| +-prompt-toolkit(version range:==1.0.14)
| | +-six(version range:>=1.9.0)
| | +-wcwidth(version range:*)
| +-pycodestyle(version range:==2.5.0)
| +-pyfiglet(version range:==0.8.post1)
| +-pyflakes(version range:==2.1.1)
| +-pygments(version range:==2.4.2)
| | +-coverage(version range:*)
| | +-nose(version range:*)
| | +-pyflakes(version range:*)
| | +-pylint(version range:*)
| | +-tox(version range:*)
| +-pyinquirer(version range:==1.0.3)
| | +-prompt-toolkit(version range:==1.0.14)
| | | +-six(version range:>=1.9.0)
| | | +-wcwidth(version range:*)
| | +-pygments(version range:>=2.2.0)
| | | +-coverage(version range:*)
| | | +-nose(version range:*)
| | | +-pyflakes(version range:*)
| | | +-pylint(version range:*)
| | | +-tox(version range:*)
| | +-regex(version range:>=2016.11.21)
| +-pylint(version range:==2.3.1)
| +-pyyaml(version range:==5.1.1)
| +-regex(version range:==2019.6.5)
| +-six(version range:==1.12.0)
| +-termcolor(version range:==1.1.0)
| +-typed-ast(version range:==1.4.0)
| +-wcwidth(version range:==0.1.7)
| +-wrapt(version range:==1.11.1)
| +-yapf(version range:==0.27.0)
protomate-0.4.8
| +-colorama(version range:==0.4.1)
| +-loguru(version range:==0.3.1)
| | +-colorama(version range:>=0.3.4)
| | +-win32-setctime(version range:>=1.0.0)
| +-prompt-toolkit(version range:==2.0.9)
| | +-six(version range:>=1.9.0)
| | +-wcwidth(version range:*)
| +-pyfiglet(version range:==0.8.post1)
| +-pygithub(version range:==1.43.7)
| +-questionary(version range:==1.1.1)
| | +-prompt-toolkit(version range:<3,>=2.0)
| | | +-six(version range:>=1.9.0)
| | | +-wcwidth(version range:*)
| +-termcolor(version range:==1.1.0)

@rickie95
Copy link

rickie95 commented Jan 7, 2020

Yeah, this is kind of annoying, ipython installation update prompt-toolkit and now it's impossible to use pyinquirer. I should use a virtual environment but this is a very tight constraint and should be relaxed.

@gbataille
Copy link

👍
Actually that's what will make me not use this lib. I started but I can't work with this old prompt-toolkit that is not compatible with up-to-date ipython (among other things)

I tried to upgrade it and make a contribution but it's not 100% straightforward and I can't seem to run the tests in the repo. Most fail in the "fake PTY". So I'm not at all at ease to even try and touch it.

My solution for the moment has been to "steal" the 2-3 elements (list and confirm) that I needed, upgrade them and use the code directly.
I'm not publishing a contribution because I have no idea if it works in the general case you are planning for. I just know it works in my specific one :(

@tmbo
Copy link
Contributor

tmbo commented Jan 22, 2020

@gbataille another option would be to use https://github.com/tmbo/questionary - pretty much the same but support for promt toolkit 2 and 3.

@gbataille
Copy link

@tmbo thanks! I'll have a look. In the meantime I took the code here, upgrade it (at least to my need) and added a filter search in the list control by typing a prefix on the keyboard.
You can see the code here https://github.com/gbataille/password-organizer/blob/master/password_organizer/cli_menu/prompts/listmenu.py
And you can see the filtering in action there
https://asciinema.org/a/AyujEPdjcDmSPoOK26pTozCiO

@CITGuru
Copy link
Owner

CITGuru commented Jul 8, 2020

This has been fixed now.

@CITGuru CITGuru closed this as completed Jul 8, 2020
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

5 participants