Skip to content

Commit

Permalink
HAVE_NCURSESW is present on macos (#12441)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jul 27, 2024
1 parent 5ade7d9 commit 1a8c7eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
5 changes: 0 additions & 5 deletions stdlib/@tests/stubtest_allowlists/darwin-py312.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
webbrowser.MacOSX.__init__

# TODO: fix
_curses.unget_wch
_curses.window.get_wch
curses.window.get_wch

# These entries looks like a `setup-python` bug:
(dbm.gnu)?
(_?locale.bind_textdomain_codeset)?
Expand Down
5 changes: 5 additions & 0 deletions stdlib/@tests/stubtest_allowlists/darwin-py313.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# new in py313
posixpath.splitroot

# Depends on HAVE_NCURSESW and how we install CPython,
# should be removed when 3.13 will be officially released:
_?curses.unget_wch
_?curses.window.get_wch

# Exists locally on MacOS but not on GitHub
(mmap.MAP_32BIT)?

Expand Down
17 changes: 5 additions & 12 deletions stdlib/_curses.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,7 @@ def tparm(
) -> bytes: ...
def typeahead(fd: int, /) -> None: ...
def unctrl(ch: _ChType, /) -> bytes: ...

if sys.version_info < (3, 12) or sys.platform != "darwin":
# The support for macos was dropped in 3.12
def unget_wch(ch: int | str, /) -> None: ...

def unget_wch(ch: int | str, /) -> None: ...
def ungetch(ch: _ChType, /) -> None: ...
def ungetmouse(id: int, x: int, y: int, z: int, bstate: int, /) -> None: ...
def update_lines_cols() -> None: ...
Expand Down Expand Up @@ -447,13 +443,10 @@ class _CursesWindow:
def getch(self) -> int: ...
@overload
def getch(self, y: int, x: int) -> int: ...
if sys.version_info < (3, 12) or sys.platform != "darwin":
# The support for macos was dropped in 3.12
@overload
def get_wch(self) -> int | str: ...
@overload
def get_wch(self, y: int, x: int) -> int | str: ...

@overload
def get_wch(self) -> int | str: ...
@overload
def get_wch(self, y: int, x: int) -> int | str: ...
@overload
def getkey(self) -> str: ...
@overload
Expand Down

0 comments on commit 1a8c7eb

Please sign in to comment.