Skip to content

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

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

Closed
atsuoishimoto opened this issue Dec 19, 2024 · 3 comments
Assignees
Labels
extension-modules C modules in the Modules dir OS-mac type-bug An unexpected behavior, bug, or error

Comments

@atsuoishimoto
Copy link

atsuoishimoto commented Dec 19, 2024

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

@atsuoishimoto atsuoishimoto added the type-bug An unexpected behavior, bug, or error label Dec 19, 2024
@picnixz picnixz added extension-modules C modules in the Modules dir OS-mac labels Dec 20, 2024
@ned-deily ned-deily self-assigned this Dec 22, 2024
@picnixz
Copy link
Member

picnixz commented Dec 22, 2024

@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.

@ned-deily
Copy link
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.

@atsuoishimoto
Copy link
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
Labels
extension-modules C modules in the Modules dir OS-mac type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants