From 5c54e52e23f5338fc44cc08ed8a27f844bcfec66 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Thu, 16 Feb 2023 15:55:31 -0800 Subject: [PATCH] Fix default value of input, remove now unused allowlist entry for epoll (#9742) --- .github/workflows/daily.yml | 2 +- .github/workflows/stubtest_stdlib.yml | 2 +- stdlib/builtins.pyi | 2 +- tests/stubtest_allowlists/linux-py310.txt | 1 - tests/stubtest_allowlists/linux-py311.txt | 1 - tests/stubtest_allowlists/py37.txt | 1 + tests/stubtest_allowlists/py38.txt | 1 + tests/stubtest_allowlists/py39.txt | 1 + 8 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index e49787ba6..6008bb024 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -33,7 +33,7 @@ jobs: matrix: # tkinter doesn't import on macOS-12 os: ["ubuntu-latest", "windows-latest", "macos-11"] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10.10", "3.11.2"] # TODO: unpin micro versions fail-fast: false steps: diff --git a/.github/workflows/stubtest_stdlib.yml b/.github/workflows/stubtest_stdlib.yml index 3d0dd4a0d..3f7dc2713 100644 --- a/.github/workflows/stubtest_stdlib.yml +++ b/.github/workflows/stubtest_stdlib.yml @@ -32,7 +32,7 @@ jobs: matrix: # tkinter doesn't import on macOS 12 os: ["ubuntu-latest", "windows-latest", "macos-11"] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10.10", "3.11.2"] # TODO: unpin micro versions fail-fast: false steps: diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 66856d90a..a8bedc837 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1380,7 +1380,7 @@ def hash(__obj: object) -> int: ... def help(request: object = ...) -> None: ... def hex(__number: int | SupportsIndex) -> str: ... def id(__obj: object) -> int: ... -def input(__prompt: object = None) -> str: ... +def input(__prompt: object = "") -> str: ... class _GetItemIterable(Protocol[_T_co]): def __getitem__(self, __i: int) -> _T_co: ... diff --git a/tests/stubtest_allowlists/linux-py310.txt b/tests/stubtest_allowlists/linux-py310.txt index 7cbbe3653..541a04ed3 100644 --- a/tests/stubtest_allowlists/linux-py310.txt +++ b/tests/stubtest_allowlists/linux-py310.txt @@ -14,7 +14,6 @@ _?curses.color_pair (os|posix).splice signal.sigtimedwait signal.sigwaitinfo -select.epoll.register # ========== # Allowlist entries that cannot or should not be fixed diff --git a/tests/stubtest_allowlists/linux-py311.txt b/tests/stubtest_allowlists/linux-py311.txt index 785c4413c..fbc4c211d 100644 --- a/tests/stubtest_allowlists/linux-py311.txt +++ b/tests/stubtest_allowlists/linux-py311.txt @@ -17,5 +17,4 @@ signal.SIGSTKFLT signal.Signals.SIGSTKFLT signal.sigtimedwait signal.sigwaitinfo -select.epoll.register xxlimited.Xxo.x_exports diff --git a/tests/stubtest_allowlists/py37.txt b/tests/stubtest_allowlists/py37.txt index 78e7adbd2..2be7e1217 100644 --- a/tests/stubtest_allowlists/py37.txt +++ b/tests/stubtest_allowlists/py37.txt @@ -13,6 +13,7 @@ asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists asyncio.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself builtins.float.__set_format__ # Internal method for CPython test suite builtins.str.maketrans +builtins.input # Incorrect default value in text signature, fixed in 3.10 cmath.log collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also. collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in the stub, see #7491 diff --git a/tests/stubtest_allowlists/py38.txt b/tests/stubtest_allowlists/py38.txt index e9667438e..7066216fb 100644 --- a/tests/stubtest_allowlists/py38.txt +++ b/tests/stubtest_allowlists/py38.txt @@ -20,6 +20,7 @@ asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitt asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself asyncio.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself builtins.float.__set_format__ # Internal method for CPython test suite +builtins.input # Incorrect default value in text signature, fixed in 3.10 collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also. collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in the stub, see #7491 collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491 diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index 54b0f0813..a7937b3b9 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -18,6 +18,7 @@ asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several p asyncio.Future.__init__ # Usually initialized from c object asyncio.futures.Future.__init__ # Usually initialized from c object builtins.float.__setformat__ # Internal method for CPython test suite +builtins.input # Incorrect default value in text signature, fixed in 3.10 collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also. collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in the stub, see #7491 collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491