homebrew-core icon indicating copy to clipboard operation
homebrew-core copied to clipboard

openstackclient: fix error for some with readline

Open cardoe opened this issue 8 months ago • 9 comments

When using the openstack CLI on some macOS machines users will get the following:

Readline features including tab completion have been disabled because no supported version of readline was found. To resolve this, install pyreadline3 on Windows or gnureadline on Linux/Mac.

This adds installing gnureadline.

  • [x] Have you followed the guidelines for contributing?
  • [x] Have you ensured that your commits follow the commit style guide?
  • [x] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [x] Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

cardoe avatar Apr 22 '25 14:04 cardoe

Why are they getting this? Is it because of a macOS bug?

SMillerDev avatar Apr 22 '25 15:04 SMillerDev

Why are they getting this? Is it because of a macOS bug?

Not sure. It seems so far when Python 3.13 was used that it's triggered. I can get some more folks to give me feedback.

cardoe avatar Apr 22 '25 20:04 cardoe

Do you have steps to reproduce? A common bug with tab completion we hear is code that does:

readline.parse_and_bind("tab:complete")

This is incorrect on macOS and should instead be:

if readline.backend == "editline":
    readline.parse_and_bind("bind ^I rl_complete")
else:
    readline.parse_and_bind("tab: complete")

Bo98 avatar Apr 22 '25 21:04 Bo98

Ah right I see it's from cmd2 using readline.set_completion_display_matches_hook. In that case this seems like the only solution, at least until cmd2 3.0.

Ideally we'd only do this on macOS though - don't think we support OS-specific packages yet but another maintainer might know for sure.

Bo98 avatar Apr 22 '25 21:04 Bo98

Is there something I should pursue to land this? Or suggest to OpenStack upstream a change?

cardoe avatar Apr 24 '25 04:04 cardoe

Happy to close or do the needful to land this. Just need some advice on direction.

cardoe avatar May 07 '25 22:05 cardoe

  • https://github.com/Homebrew/homebrew-core/issues/132854

daeho-ro avatar May 26 '25 14:05 daeho-ro

I don't know why it fails on intel macos 😥

daeho-ro avatar May 27 '25 07:05 daeho-ro

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jun 18 '25 00:06 github-actions[bot]