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

Upgrading to prompt_toolkit 2.0 #14

Open
oldboldpilot opened this issue Sep 22, 2018 · 35 comments
Open

Upgrading to prompt_toolkit 2.0 #14

oldboldpilot opened this issue Sep 22, 2018 · 35 comments

Comments

@oldboldpilot
Copy link

Will it take a lot to upgrade this to work with prompt_toolkit 2.0?
Is there any help I can render to make that happen?

@CITGuru
Copy link
Owner

CITGuru commented Sep 22, 2018

I am afraid to say that won't happen anytime soon. Cos upgrading to 2.0, will require a lot of work and rewiring. prompt_toolkit 2.0 was rewritten from scratch and they totally ditch Token and many other things PyInquirer depends on. What I could suggest is we create PyInquirer2 from scratch that will work with prompt_toolkit 2.0. And that will only happen once I am able to complete all TODO we still have left. I have thought of this sometime ago and that's the only solution. So people could choose the version they want.

@oldboldpilot
Copy link
Author

That sounds fair, will be willing to work on PyInquirer2 then, it does not seem like a bad idea. Thanks for responding so quickly 👍

@CITGuru
Copy link
Owner

CITGuru commented Sep 23, 2018

You welcome, I'll be glad to work with you in the nearest future 🤝

@rigogsilva
Copy link

rigogsilva commented Nov 17, 2018

Let's get this going. I'd be willing to help out. Mostly to get the autocomplete functionality.

@Apreche
Copy link

Apreche commented Nov 18, 2018

Just discovered PyInquirer, and it's not working for me because iPython uses prompt-toolkit 2, and that causes a conflict.

@CITGuru
Copy link
Owner

CITGuru commented Nov 20, 2018

@rigogsilva Thanks for that, I'd be glad if we could work on it. @Apreche Yeah, you can't use PyInquirer on iPython cos, PyInquirer still uses Prompt toolkit 1.0

@CITGuru
Copy link
Owner

CITGuru commented Nov 20, 2018

And talking about Pompt toolkit 2.0, I actually devoted my free time to read the doc and went through the source code. Though some huge changes are made but not as I expected, PyInquirer rely on Token which is from prompt toolkit Pygments for coloring alot. In 2.0 we can still use it in a better and creative. I actually like the way they structure the new style_from_dict. Off course there are some other changes I need to point out.

I have been busy lately cos my remote company is pushing out new products these past months and has not been easy for core Python and Rust developers.

So PyInquirer 1.0.3 will be released soon, I'll already draft the release, I just need time to fix some issues. You can check out https://github.com/CITGuru/PyInquirer/issues/ and look at the ones you can suggest fix for.

The dev branch commits has been merged into master. So you can now install from master.

PyInquirer 2 development will be pushed to github for contribution on the release date of PyInquirer 1.0.3.

Read about Prompt toolkit 2.0 - https://python-prompt-toolkit.readthedocs.io/

Thanks

@tmbo
Copy link
Contributor

tmbo commented Nov 20, 2018

Yes, happy to help out as well - let’s get this going 🚀

@tmbo
Copy link
Contributor

tmbo commented Nov 22, 2018

@CITGuru how willing are you to move quick on this? We depend on this library for one of our larger projects, but the usage of prompt_toolkit is a dealbreaker because of ipythons dependency on prompt_toolkit2.

As said, I am very happy to help out. I've been looking into it and it is actually rather straight forward. I don't understand why the development for this is waiting for a minor release (why not create a bugfix branch for 1.0.x) instead of going full steam on this.

I know this is a side project for you, therefore I completely understand if you let me know that you just do not have enough time to move this project forward.

My team needs to move fast on this, but since you have been putting so much work into maintaining this library, I also do not want to step on your tows. We'll have a prompt toolkit 2 ready version by the end of the week, the question is if it is going to be part of this project or a fork.

@CITGuru
Copy link
Owner

CITGuru commented Nov 22, 2018

I really appreciate your concerns and understanding. I know how we feel when our projects depend on a good and promising project. But what turn us off is when the project is poorly maintained, I mean, that was the whole idea of PyInquirer. So I am looking at the best way to create time for managing this project.

While we wait for PyInquirer 2, I decided to release PyInquirer 1.0.3 bugfix release earlier as expected. @tmbo Its out now

@CITGuru CITGuru closed this as completed Nov 22, 2018
@CITGuru CITGuru reopened this Nov 22, 2018
@tmbo
Copy link
Contributor

tmbo commented Nov 23, 2018

That's great news 🚀 and I'd be way happier keeping this project going then to create a fork.

I know it is challenging to balance open source, your job and your private life - so let's find ways to make this work.

You mentioned that you already started working on prompt toolkit 2 support, do you mind pushing that code so that we can properly branch of from there? If not thats fine as well, and I'll just create a PR against master.

@CITGuru
Copy link
Owner

CITGuru commented Nov 23, 2018

@tmbo I'll be working on it this weekend so I should be able to push up what I have by monday, if all goes as scheduled

@tmbo
Copy link
Contributor

tmbo commented Nov 23, 2018

I did convert the list and confirm views locally, so let me know if you need them.

@CITGuru
Copy link
Owner

CITGuru commented Nov 23, 2018

@tmbo Really, can you push up to a branch, so I can look at your approach. Trying to create a style where we could use prompt_toolkit plugin.

@tmbo
Copy link
Contributor

tmbo commented Nov 23, 2018

sure - I'll create WIP PR

@tmbo
Copy link
Contributor

tmbo commented Nov 23, 2018

@CITGuru I've pushed the list & confirm prompts as part of #31

@CITGuru
Copy link
Owner

CITGuru commented Nov 24, 2018

@tmbo Thanks. I found something weird, still don't know how, but it seems prompt_toolkit 1 works with the changes you made for prompt_toolkit

@CITGuru
Copy link
Owner

CITGuru commented Nov 24, 2018

@tmbo Was able to convert input, editor to prompt_toolkit2. So no standard design yet, still converting others, rawlist,expand, password (this should be fairly easy), checkbox

@CITGuru
Copy link
Owner

CITGuru commented Nov 24, 2018

I should be done by tomorrow, its weekend here Saturday precisely, wanna rest more and back to it as soon as wake up. See ya

@tmbo
Copy link
Contributor

tmbo commented Nov 25, 2018

Let me know if you need help converting any one of these.

@tmbo
Copy link
Contributor

tmbo commented Nov 27, 2018

It would be great if you share your code so we can help you and collaborate on this project. Do you mind pushing your changes to a branch?

If you can't do all the work on your own, e.g. because you are short on time, you need to make sure others can help you.

@tmbo
Copy link
Contributor

tmbo commented Dec 14, 2018

Because I could not wait for this to drag on further, I created a separate library https://github.com/tmbo/questionary based on prompt toolkit 2. I tried to avoid this, but we needed to move faster for our project https://github.com/rasahq/rasa_core which uses the library.

@woile
Copy link

woile commented Dec 16, 2018

fantastic @tmbo I was also needing something like that. Thanks a lot!

@tecosaur
Copy link

is PyInquirer going to move to prompt toolkit 2 any time soon? Or should I stop holding out hope and more to questionary?

@rednafi
Copy link

rednafi commented Jul 14, 2019

Prompt toolkit 0.1.14 is completely breaking ipython notebook. Pyinquirer 2.0 is nowhere to be found and the library already seems fragmented. Then there is questionary. Thanks for your awesome work nonetheless.

@woile
Copy link

woile commented Jul 14, 2019

For people with problems with prompt toolkit < 2.0, there are currently 2 solutions which kinda fit:

  • questionary which supports prompt toolkit > 2.0
  • bullet which has no dependencies as far as I can tell, but doesn't work as well as questionary, specially when handling the Ctrl+ C.

@rednafi
Copy link

rednafi commented Jul 15, 2019

@woile questionary seems awesome, built on Pyinquirer. It can directly be adopted as pyinquirer 2.0. However, the development seems slow there which is quite understandable. Maybe we can create some traction there. Thanks for the info...:)

@tmbo
Copy link
Contributor

tmbo commented Jul 29, 2019

@rednafi well, development is "slow" as there isn't a lot to develop at the moment. if there are features / bugs you are running into please create an issue 😃

@rednafi
Copy link

rednafi commented Jul 29, 2019

@tmbo questionary is working like a charm. Doesn't conflict with jupyter notebook which has a prompt_toolkit 2.0.9 dependency. Thanks!!

@doylejg
Copy link

doylejg commented Jan 8, 2020

Just wanted to bump this thread. Are we still waiting on pyinquirer2.0 or is the accepted solution to just move to questionary ?

@LuRenJiasWorld
Copy link

I'm glad to help developing PyInquirer2 as well.
Please feel free to contact me if you are ready to work.
My email is loli@lurenjia.in.

@yanlend
Copy link

yanlend commented Apr 21, 2020

Upgrading the dependency to newer versions of prompt_toolkit would be required for us. Is it still going to happen or are you recommending the move to questionary?

@jonathanslenders
Copy link

Hi everyone, this PR should upgrade to prompt_toolkit 3: #118
Note that it also means that Python 2 support will be dropped.

@CITGuru
Copy link
Owner

CITGuru commented Apr 14, 2021

Please read this, Looking for maintainer/successor. #159

@o-nikolas
Copy link

Hey folks, now that @jonathanslenders's PR to support prompt_toolkit 3 has been merged, can a release be cut so that we can make use of this contribution?

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