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

Fix resize of menuconfig in Python 3 on MacOs #85

Closed
wants to merge 1 commit into from

Conversation

dobairoland
Copy link

Closes #84

@dobairoland
Copy link
Author

@ulfalizer @kumekay Please take a look. I think this is a sufficient fix.

@kumekay
Copy link

kumekay commented Jan 3, 2020

This looks good and works for me just fine

c = win.get_wch()
else:
# curses.error is thrown in Python 3 on MacOs
Copy link
Owner

@ulfalizer ulfalizer Jan 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could change the message to say

# Work around a crash where get_wch() raises curses.error on macOS when
# resizing the terminal, by falling back on getch(). This needs more
# investigation. It doesn't happen on all systems.

See #84 (comment) too. Would be nice to narrow down the configurations that have this issue.

ulfalizer added a commit that referenced this pull request Jan 12, 2020
get_wch() has started raising curses.error when resizing the terminal on
some macOS Python installations. Work around for now by falling back on
getch(), which still works.

See #84. Needs more
investigation, but I don't have a Mac handy.

Based on #85, but with some
more comments.
@ulfalizer
Copy link
Owner

Pushed out a release with a fix (same as this one, just with some more comments): 68bcecd

Would be nice to figure out and report the root issue at some point though.

Thanks.

@ulfalizer ulfalizer closed this Jan 12, 2020
ulfalizer added a commit to ulfalizer/zephyr that referenced this pull request Jan 13, 2020
Update menuconfig (and kconfiglib and guiconfig, just to sync) to
upstream revision 424d0d38e7, to get this commit in, which works around
a crash on some macOS Python installations.

    menuconfig: Work around crash on resize on some macOS systems

    get_wch() has started raising curses.error when resizing the
    terminal on some macOS Python installations. Work around for now by
    falling back on getch(), which still works.

    See ulfalizer/Kconfiglib#84. Needs more
    investigation, but I don't have a Mac handy.

    Based on ulfalizer/Kconfiglib#85, but with
    some more comments.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
carlescufi pushed a commit to zephyrproject-rtos/zephyr that referenced this pull request Jan 13, 2020
Update menuconfig (and kconfiglib and guiconfig, just to sync) to
upstream revision 424d0d38e7, to get this commit in, which works around
a crash on some macOS Python installations.

    menuconfig: Work around crash on resize on some macOS systems

    get_wch() has started raising curses.error when resizing the
    terminal on some macOS Python installations. Work around for now by
    falling back on getch(), which still works.

    See ulfalizer/Kconfiglib#84. Needs more
    investigation, but I don't have a Mac handy.

    Based on ulfalizer/Kconfiglib#85, but with
    some more comments.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
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

Successfully merging this pull request may close these issues.

Menuconfig fails in MacOs with Python 3 when the terminal is resized
3 participants