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

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

Closed
whophil opened this issue May 13, 2021 · 7 comments
Closed

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

whophil opened this issue May 13, 2021 · 7 comments
Milestone

Comments

@whophil
Copy link

whophil commented May 13, 2021

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

Thanks for upgrade

@daviddavis
Copy link

@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
Copy link
Contributor

@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
Copy link
Owner

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

@clarkperkins
Copy link
Owner

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.

@clarkperkins clarkperkins added this to the 2.1 milestone Jun 28, 2021
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