Repository navigation
Restore ncurses widechar support on macOS #111460
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Oct 29, 2023 - addedbuildThe build process and cross-buildThe build process and cross-build
on Oct 29, 2023 - Reacted by Erlend E. Aasland
Yes, this is probably an unintended side effect. I can look into it tomorrow.
(cc. @corona10, if you are interested)
Reacted by Donghee NaYeah I will take a look too
Reacted by Erlend E. AaslandWould it be interesting to encode some platform expectations in tests?
This regression went under the radar because test_unget_wch is skipped with
@requires_curses_func('unget_wch'), among other reasons. Skipping makes sense in general. But in some build configurations (including macOS CI, macOS buildbots, and the official macOS installer) we know that we are building with ncurses, and unget_wch should exist.Since this functionality is documented to be generally available, should a test assert that it actually is?
- added a commit that references this issue
on Nov 9, 2023 Can this be closed?
@erlend-aasland if there is no need to test this, we're done here.
@erlend-aasland if there is no need to test this, we're done here.
There's always a need for accompanying tests.
I need help with this then. What is a test supposed to test? We could say that wide char support should always be there on Darwin, but it could fail on builds that bring their own curses (or not).
@erlend-aasland : What kind of tests do you want to see here? AFAIK we generally don't test if expected platform features are present, other than some tests I've added when working on the Universal 2 port to ensure that weak linking works as expected.
I did not have anything in particular in mind. If there is no particular need, let's just close this.
Reacted by Ronald Oussoren- addedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Dec 5, 2023 - removedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Dec 5, 2023
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
Python 3.12 dropped ncurses wide char support on macOS, so for example
curses.get_wch()is not available anymore.I believe this was an unintended consequence of #94452, because the change is not documented anywhere. After that PR, HAVE_NCURSESW is never defined on Darwin. It looks like this bit of logic was not ported from setup.py to configure.ac:
cpython/setup.py
Lines 1121 to 1124 in ec5e253
In fact, wide char support is always available when using Apple-provided ncurses, and it used to work correctly in the 3.11 builds that I tested.
@tiran can you confirm that this was unintended?
cc @sobolevn who interpreted this as an intended change in python/typeshed#10808.
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
macOS
Linked PRs