GithubHelp home page GithubHelp logo

Upgrading to prompt_toolkit 2.0 about pyinquirer HOT 35 OPEN

citguru avatar citguru commented on September 26, 2024 10
Upgrading to prompt_toolkit 2.0

from pyinquirer.

Comments (35)

tmbo avatar tmbo commented on September 26, 2024 16

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.

from pyinquirer.

woile avatar woile commented on September 26, 2024 6

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.

from pyinquirer.

tecosaur avatar tecosaur commented on September 26, 2024 5

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

from pyinquirer.

oldboldpilot avatar oldboldpilot commented on September 26, 2024 2

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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024 2

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

from pyinquirer.

rednafi avatar rednafi commented on September 26, 2024 2

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.

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024 2

@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 πŸ˜ƒ

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024 1

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

from pyinquirer.

yanlend avatar yanlend commented on September 26, 2024 1

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?

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

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.

from pyinquirer.

rigogsilva avatar rigogsilva commented on September 26, 2024

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

from pyinquirer.

Apreche avatar Apreche commented on September 26, 2024

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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

@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

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

Yes, happy to help out as well - let’s get this going πŸš€

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

@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.

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

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

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

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.

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

@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

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

@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.

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

sure - I'll create WIP PR

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

@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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

@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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

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

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

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

from pyinquirer.

tmbo avatar tmbo commented on September 26, 2024

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.

from pyinquirer.

woile avatar woile commented on September 26, 2024

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

from pyinquirer.

rednafi avatar rednafi commented on September 26, 2024

@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...:)

from pyinquirer.

rednafi avatar rednafi commented on September 26, 2024

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

from pyinquirer.

doylejg avatar doylejg commented on September 26, 2024

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

from pyinquirer.

LuRenJiasWorld avatar LuRenJiasWorld commented on September 26, 2024

I'm glad to help developing PyInquirer2 as well.
Please feel free to contact me if you are ready to work.
My email is [email protected].

from pyinquirer.

jonathanslenders avatar jonathanslenders commented on September 26, 2024

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

from pyinquirer.

CITGuru avatar CITGuru commented on September 26, 2024

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

from pyinquirer.

o-nikolas avatar o-nikolas commented on September 26, 2024

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?

from pyinquirer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.