Skip to content

The _curses.window.get_wch() method is not available in Python 3.13 for macOS universal2 installer #128085

Closed as duplicate

Description

@atsuoishimoto

Bug report

Bug description:

With macOS 64-bit universal2 installer for Python 3.13(both 3.13.0 and 3.13.1), following code raises
error AttributeError: '_curses.window' object has no attribute 'get_wch'. Did you mean: 'getch'? .

from curses import wrapper

def main(stdscr):
    c = stdscr.get_wch()

wrapper(main)

However, it can be used on the same box if I build Python from source code myself.

Tested on MacOS Sequoia 15.0:

  • With macOS 64-bit universal2:

     python3.13 -c "import sysconfig; print(sysconfig.get_config_vars('HAVE_NCURSES', 'HAVE_NCURSESW'))"
     [0, 0]
    
  • Built from source:

     ./python.exe -c "import sysconfig; print(sysconfig.get_config_vars('HAVE_NCURSES', 'HAVE_NCURSESW'))"
     [0, 1]
    

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Activity

  1. self-assigned this
    on Dec 22, 2024
  2. picnixz commented on Dec 22, 2024

    @picnixz
    Member

    @ned-deily Thanks for taking it. I wanted to have a look since I was working on curses recently but my backlog keeps growing with more pressing tasks and you are much more knowledgable on macOS-related stuff.

  3. ned-deily commented on Apr 7, 2025

    @ned-deily
    Member

    As of the Python 3.14.0 alpha 5 pre-release and the upcoming 3.13.3 and 3.12.10 releases, python.org macOS installers now build and link with ncurses 6.5, the current stable release, which should resolve this issue.

  4. atsuoishimoto commented on Apr 7, 2025

    @atsuoishimoto
    Author

    Python 3.14.0 alpha 6 works fine. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OS-macextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions