From f46492c27409f83fa7dc2f8da76d06e8675e9737 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 17 Aug 2020 11:20:38 -0700 Subject: [PATCH 1/3] stubtest: fix on windows Co-authored by: Akuli --- .github/workflows/stubtest.yml | 2 +- tests/stubtest_whitelists/win32.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stubtest.yml b/.github/workflows/stubtest.yml index dcb3991b44dd..179bcfe98b09 100644 --- a/.github/workflows/stubtest.yml +++ b/.github/workflows/stubtest.yml @@ -24,4 +24,4 @@ jobs: python -m pip install -U pip pip install -U mypy==0.780 - name: Run stubtest - run: ./tests/stubtest_test.py --ignore-unused-whitelist + run: python tests/stubtest_test.py --ignore-unused-whitelist diff --git a/tests/stubtest_whitelists/win32.txt b/tests/stubtest_whitelists/win32.txt index cc0e88fb2870..811ba83bd2ae 100644 --- a/tests/stubtest_whitelists/win32.txt +++ b/tests/stubtest_whitelists/win32.txt @@ -17,6 +17,7 @@ _posixsubprocess asyncio.unix_events crypt dbm.gnu +dbm.ndbm fcntl grp nis From 2e4093eaecab3f8a0cf7e269793f252a5beb3f2f Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 17 Aug 2020 11:26:35 -0700 Subject: [PATCH 2/3] time: fix windows availability of tm_gmtoff, tm_zone --- stdlib/2and3/time.pyi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stdlib/2and3/time.pyi b/stdlib/2and3/time.pyi index a31aee3b1150..a513a1f2952d 100644 --- a/stdlib/2and3/time.pyi +++ b/stdlib/2and3/time.pyi @@ -69,10 +69,11 @@ if sys.version_info >= (3, 3): ], _arg: Any = ..., ) -> struct_time: ... - @property - def tm_zone(self) -> str: ... - @property - def tm_gmtoff(self) -> int: ... + if sys.version_info >= (3, 6): + @property + def tm_zone(self) -> str: ... + @property + def tm_gmtoff(self) -> int: ... else: class struct_time(_struct_time): From 844369eb98fed9b5d2a2a463b872f87c04714834 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Mon, 17 Aug 2020 13:07:35 -0700 Subject: [PATCH 3/3] do it right --- stdlib/2and3/time.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/2and3/time.pyi b/stdlib/2and3/time.pyi index a513a1f2952d..efaf33d15ec4 100644 --- a/stdlib/2and3/time.pyi +++ b/stdlib/2and3/time.pyi @@ -69,7 +69,7 @@ if sys.version_info >= (3, 3): ], _arg: Any = ..., ) -> struct_time: ... - if sys.version_info >= (3, 6): + if sys.version_info >= (3, 6) or sys.platform != "win32": @property def tm_zone(self) -> str: ... @property