From be9b2eff50c64c3c94611abe8be14f273ae62c41 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 25 Mar 2017 12:12:34 -0700 Subject: [PATCH 1/3] Sync typeshed --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index 48920fea7ee6..ec83ed90ebd8 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit 48920fea7ee6c1d413fba12fe709c652da065393 +Subproject commit ec83ed90ebd80316141db964613ac7d95ffba02a From 988d145ce75651cc72030c2b9b568be9cf37852f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 26 Mar 2017 17:04:44 -0700 Subject: [PATCH 2/3] Fix type for WTERMSIG, WEXITSTATUS; revert casts for select() args. --- test-data/stdlib-samples/3.2/subprocess.py | 6 +++--- test-data/stdlib-samples/3.2/test/test_subprocess.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test-data/stdlib-samples/3.2/subprocess.py b/test-data/stdlib-samples/3.2/subprocess.py index 5f2ed29116be..70f5c8d700b6 100644 --- a/test-data/stdlib-samples/3.2/subprocess.py +++ b/test-data/stdlib-samples/3.2/subprocess.py @@ -1403,9 +1403,9 @@ def _dup2(a: int, b: int) -> None: def _handle_exitstatus( self, sts: int, _WIFSIGNALED: Callable[[int], bool] = os.WIFSIGNALED, - _WTERMSIG: Callable[[int], bool] = os.WTERMSIG, + _WTERMSIG: Callable[[int], int] = os.WTERMSIG, _WIFEXITED: Callable[[int], bool] = os.WIFEXITED, - _WEXITSTATUS: Callable[[int], bool] = os.WEXITSTATUS) -> None: + _WEXITSTATUS: Callable[[int], int] = os.WEXITSTATUS) -> None: # This method is called (indirectly) by __del__, so it cannot # refer to anything outside of its local scope.""" if _WIFSIGNALED(sts): @@ -1583,7 +1583,7 @@ def _communicate_with_select(self, input: Any) -> Tuple[List[bytes], input_offset = 0 while read_set or write_set: try: - rlist, wlist, xlist = select.select(read_set, write_set, cast(List[object], [])) + rlist, wlist, xlist = select.select(read_set, write_set, []) except select.error as e: if e.args[0] == errno.EINTR: continue diff --git a/test-data/stdlib-samples/3.2/test/test_subprocess.py b/test-data/stdlib-samples/3.2/test/test_subprocess.py index d0d5ebe9d8e9..772d8cc416e4 100644 --- a/test-data/stdlib-samples/3.2/test/test_subprocess.py +++ b/test-data/stdlib-samples/3.2/test/test_subprocess.py @@ -1291,7 +1291,7 @@ def kill_p2() -> None: p1.stdin.write(data) p1.stdin.close() - readfiles, ignored1, ignored2 = select.select([p2.stdout], cast(List[object], []), cast(List[object], []), 10) + readfiles, ignored1, ignored2 = select.select([p2.stdout], [], [], 10) self.assertTrue(readfiles, "The child hung") self.assertEqual(p2.stdout.read(), data) From 120044ecbe4d5b3949a1831ee2e0996156f17581 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 28 Mar 2017 08:28:36 -0700 Subject: [PATCH 3/3] Sync further --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index ec83ed90ebd8..03bfcee0b85d 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit ec83ed90ebd80316141db964613ac7d95ffba02a +Subproject commit 03bfcee0b85d27018ad0a71a8b5b4439fa99cb80