From cc7ac01a3ec0f4e36280f88f7237f87fb3af44c0 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 10 Nov 2022 15:02:53 +0000 Subject: [PATCH] Stubtest: Don't allowlist `termios` and `posix` constants on Windows (#9150) --- tests/stubtest_allowlists/darwin.txt | 5 +++++ tests/stubtest_allowlists/linux.txt | 5 +++++ tests/stubtest_allowlists/py3_common.txt | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/stubtest_allowlists/darwin.txt b/tests/stubtest_allowlists/darwin.txt index e50de9e87..61b545641 100644 --- a/tests/stubtest_allowlists/darwin.txt +++ b/tests/stubtest_allowlists/darwin.txt @@ -21,6 +21,11 @@ select.POLLMSG # system dependent (posix.preadv)? (posix.pwritev)? +# Platform differences that cannot be captured by the type system +(posix.O_[A-Z_]+)? +(posix.ST_[A-Z]+)? +(termios.[A-Z0-9_]+)? + # Exists at runtime, but missing from stubs distutils.msvccompiler.MSVCCompiler.get_msvc_paths distutils.msvccompiler.MSVCCompiler.set_path_env_var diff --git a/tests/stubtest_allowlists/linux.txt b/tests/stubtest_allowlists/linux.txt index 3f5433052..a10c7fc8d 100644 --- a/tests/stubtest_allowlists/linux.txt +++ b/tests/stubtest_allowlists/linux.txt @@ -23,6 +23,11 @@ selectors.DefaultSelector.fileno spwd.struct_spwd.sp_nam spwd.struct_spwd.sp_pwd +# Platform differences that cannot be captured by the type system +(posix.O_[A-Z_]+)? +(posix.ST_[A-Z]+)? +(termios.[A-Z0-9_]+)? + _ctypes.dlclose _ctypes.dlopen _ctypes.dlsym diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 9c15ca214..6d04d25ad 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -544,10 +544,7 @@ xml.sax # Platform differences that cannot be captured by the type system os.O_[A-Z_]+ -(posix.O_[A-Z_]+)? -(posix.ST_[A-Z]+)? socket.AF_DECnet -(termios.[A-Z0-9_]+)? # Loadable SQLite extensions are disabled on GitHub runners (sqlite3(.dbapi2)?.Connection.enable_load_extension)?