click-contrib / click-repl

Subcommand REPL for click apps
MIT License
215 stars 41 forks source link

click-repl does not work with Click 8.0.0 anymore #75

Closed andy-maier closed 3 years ago

andy-maier commented 3 years ago

Click 8.0.0 removed an internal name which click-repl depends upon:

E.g. on Python 3.8 on macOS:

$ python -c "import click; import click_repl"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/maiera/virtualenvs/pywbemtools38/lib/python3.8/site-packages/click_repl/__init__.py", line 6, in <module>
    import click._bashcomplete
ModuleNotFoundError: No module named 'click._bashcomplete'
andy-maier commented 3 years ago

In our projects using click-repl, we can mitigate this by pinning click to <8.0.0. At least until the desire to use the new autocompletion of click weighs in ;-)

anthraxx commented 3 years ago

@andy-maier that doesnt really work for all t he distro packages. with no click 8 support this will make a major problem for the click-repl distro package

jm66 commented 3 years ago

Hey @andy-maier take a look at this branch. I've tested it with Python 3.9.4 on macOS.

andy-maier commented 3 years ago

@jm66 I have tried your branch in one of our projects (https://github.com/zhmcclient/zhmccli/pull/173) and it installs fine with click 8.0. I did a few manual tests of using the repl mode of the command and used its auto-completion, and that all worked fine.

So from my perspective, this change is good to go forward.

andy-maier commented 3 years ago

@anthraxx I know. I was just trying to make a statement for our projects.

Hopefully the change by @jm66 gets accepted by the new maintainers and a release can be made.

thedrow commented 3 years ago

This is blocking Celery from upgrading to Click 8.

regisb commented 3 years ago

I think we can close this, now that v0.2.0 is out.

untitaker commented 3 years ago

Thank you!