clarkperkins / click-shell

An extension to click that easily turns your click app into a shell utility
BSD 3-Clause "New" or "Revised" License
88 stars 17 forks source link

click-shell is broken with click >= 8 #30

Closed whophil closed 3 years ago

whophil commented 3 years ago

There is an ImportError when decorating a function with @shell() using click 8. click._compat seems to have been reworked and raw_input is no longer available.

This is with click-shell==2.0 and click==8.0.0

ImportError: cannot import name 'raw_input' from 'click._compat' (/home/phil/repos/clicktest/lib/python3.7/site-packages/click/_compat.py)
gouttegd commented 3 years ago

That’s not the only problem. The shell completion code has also been reworked in a way that breaks click-shell.

I’ve submitted PR #31 to fix both problems.

gouttegd commented 3 years ago

I don’t like doing that, but… in light of the lack of any reaction from the original developer, and because click-shell is currently completely unusable with Click 8, I’ve forked this project and released a 2.1.0 version with Click 8 support.

The fork is available on PyPI under the name incenp.click-shell. It is used in exactly the same way as the original click-shell, simply import with from incenp.click_shell import shell instead of from click_shell import shell.

I plan to maintain that fork until/unless development of click-shell resumes.

(Full disclosure: I contacted Clark Perkins privately to let him know I was considering to fork. I got no reply.)

rajnathsah commented 3 years ago

Thanks for upgrade

daviddavis commented 3 years ago

@gouttegd thank you! this is awesome. We're going to be using incenp.click-shell in our project until click-shell is updated. Let me know if I can help to maintain it.

gouttegd commented 3 years ago

@daviddavis Thanks. I am still hoping that development will resume here and that my fork will be short-lived, but we’ll see. If you do have ideas for improvements or even pull requests, don’t hesitate to submit them to the forked repo.

clarkperkins commented 3 years ago

Hi all, apologies for the delay - I'm going to try to get a new version out over the next couple of days.

clarkperkins commented 3 years ago

click-shell 2.1 has been released to pypi! It was working with click 8 for my basic tests, but please comment back here or open a new issue if you run into any problems.