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

Some curses functions were removed in 3.12 for macos #10808

Merged
merged 2 commits into from
Sep 30, 2023
Merged

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 30, 2023

These two functions are under #ifdef HAVE_NCURSESW macro:

#ifdef HAVE_NCURSESW
/*[clinic input]
_curses.unget_wch

    ch: object
    /

Push ch so the next get_wch() will return it.
[clinic start generated code]*/

static PyObject *
_curses_unget_wch(PyObject *module, PyObject *ch)
/*[clinic end generated code: output=1974c9fb01d37863 input=0d56dc65a46feebb]*/
{
    wchar_t wch;

    PyCursesInitialised;

    if (!PyCurses_ConvertToWchar_t(ch, &wch))
        return NULL;
    return PyCursesCheckERR(unget_wch(wch), "unget_wch");
}
#endif

Which is set via configure:

  if test "$ac_sys_system" != "Darwin"; then
    dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
    PKG_CHECK_MODULES([CURSES], [ncursesw], [
      AC_DEFINE([HAVE_NCURSESW], [1])
      have_curses=ncursesw
    ], [
      WITH_SAVE_ENV([
        AC_CHECK_LIB([ncursesw], [initscr], [
          AC_DEFINE([HAVE_NCURSESW], [1])
          have_curses=ncursesw
          CURSES_CFLAGS=${CURSES_CFLAGS-""}
          CURSES_LIBS=${CURSES_LIBS-"-lncursesw"}
        ])
      ])
    ])
  fi

It says that macos is not supported anymore.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 4c5d3e5 into main Sep 30, 2023
67 checks passed
@srittau srittau deleted the py312-curses-macos branch September 30, 2023 09:28
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.

None yet

2 participants