Skip to content

stubtest_stdlib: get rid of --ignore-missing-stub #6491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions stdlib/_csv.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from typing import Any, Iterable, Iterator, List, Protocol, Type, Union

# __version__ is deliberately not defined here or in csv.pyi,
# as it appears to have been hardcoded at "1.0" for a very long time!

QUOTE_ALL: int
QUOTE_MINIMAL: int
QUOTE_NONE: int
Expand Down
3 changes: 0 additions & 3 deletions stdlib/csv.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ if sys.version_info >= (3, 8):
else:
from collections import OrderedDict as _DictReadMapping

# __version__ is deliberately not defined here or in _csv.pyi,
# as it appears to have been hardcoded at "1.0" for a very long time!

_T = TypeVar("_T")

class excel(Dialect):
Expand Down
15 changes: 15 additions & 0 deletions tests/stubtest_allowlists/darwin-py310.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
_?curses.A_ITALIC
_curses.color_pair
curses.color_pair

# Exists at runtime, but missing from stubs
_curses.get_escdelay
_curses.get_tabsize
_curses.set_escdelay
_curses.set_tabsize
asyncio.PidfdChildWatcher
asyncio.unix_events.PidfdChildWatcher
os.CLD_KILLED
os.CLD_STOPPED
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
posix.register_at_fork
posix.waitstatus_to_exitcode
7 changes: 7 additions & 0 deletions tests/stubtest_allowlists/darwin-py36.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ ctypes.wintypes
pwd.getpwnam
ssl.PROTOCOL_SSLv3 # Depends on openssl compilation
ssl.RAND_egd # Depends on openssl compilation

# Exists at runtime, but missing from stubs
ftplib.FTP.trust_server_pasv_ipv4_address
ntpath.splitunc
posix.stat_float_times
ssl.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT
4 changes: 4 additions & 0 deletions tests/stubtest_allowlists/darwin-py37.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
_?curses.A_ITALIC
ctypes.wintypes
pwd.getpwnam

# Exists at runtime, but missing from stubs
ftplib.FTP.trust_server_pasv_ipv4_address
posix.register_at_fork
6 changes: 6 additions & 0 deletions tests/stubtest_allowlists/darwin-py38.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
_?curses.A_ITALIC

# Exists at runtime, but missing from stubs
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
posix.register_at_fork
15 changes: 15 additions & 0 deletions tests/stubtest_allowlists/darwin-py39.txt
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
_?curses.A_ITALIC

# Exists at runtime, but missing from stubs
_curses.get_escdelay
_curses.get_tabsize
_curses.set_escdelay
_curses.set_tabsize
asyncio.PidfdChildWatcher
asyncio.unix_events.PidfdChildWatcher
os.CLD_KILLED
os.CLD_STOPPED
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
posix.register_at_fork
posix.waitstatus_to_exitcode
153 changes: 153 additions & 0 deletions tests/stubtest_allowlists/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,156 @@ posix.SCHED_[A-Z_]+
# Loadable SQLite extensions are disabled on GitHub runners
(sqlite3(.dbapi2)?.Connection.enable_load_extension)?
(sqlite3(.dbapi2)?.Connection.load_extension)?

# Exists at runtime, but missing from stubs
distutils.msvccompiler.MSVCCompiler.get_msvc_paths
distutils.msvccompiler.MSVCCompiler.set_path_env_var
distutils.msvccompiler.MacroExpander
grp.struct_group.n_fields
grp.struct_group.n_sequence_fields
grp.struct_group.n_unnamed_fields
mimetypes.MimeTypes.read_windows_registry
os.ST_NOSUID
os.ST_RDONLY
os.uname_result.n_fields
os.uname_result.n_sequence_fields
os.uname_result.n_unnamed_fields
posix.DirEntry
posix.abort
posix.access
posix.chdir
posix.chflags
posix.chmod
posix.chown
posix.chroot
posix.close
posix.closerange
posix.confstr
posix.cpu_count
posix.ctermid
posix.device_encoding
posix.dup
posix.dup2
posix.execv
posix.execve
posix.fchdir
posix.fchmod
posix.fchown
posix.fork
posix.forkpty
posix.fpathconf
posix.fspath
posix.fstat
posix.fstatvfs
posix.fsync
posix.ftruncate
posix.get_blocking
posix.get_inheritable
posix.get_terminal_size
posix.getcwd
posix.getcwdb
posix.getegid
posix.geteuid
posix.getgid
posix.getgrouplist
posix.getgroups
posix.getloadavg
posix.getlogin
posix.getpgid
posix.getpgrp
posix.getpid
posix.getppid
posix.getpriority
posix.getsid
posix.getuid
posix.initgroups
posix.isatty
posix.kill
posix.killpg
posix.lchflags
posix.lchmod
posix.lchown
posix.link
posix.lockf
posix.lseek
posix.lstat
posix.major
posix.makedev
posix.minor
posix.mkdir
posix.mkfifo
posix.mknod
posix.nice
posix.open
posix.openpty
posix.pathconf
posix.pipe
posix.pread
posix.putenv
posix.pwrite
posix.read
posix.readlink
posix.readv
posix.remove
posix.rename
posix.replace
posix.rmdir
posix.scandir
posix.sched_get_priority_max
posix.sched_get_priority_min
posix.sched_yield
posix.sendfile
posix.set_blocking
posix.set_inheritable
posix.setegid
posix.seteuid
posix.setgid
posix.setgroups
posix.setpgid
posix.setpgrp
posix.setpriority
posix.setregid
posix.setreuid
posix.setsid
posix.setuid
posix.stat
posix.stat_result.n_fields
posix.stat_result.n_sequence_fields
posix.stat_result.n_unnamed_fields
posix.statvfs
posix.strerror
posix.symlink
posix.sync
posix.sysconf
posix.system
posix.tcgetpgrp
posix.tcsetpgrp
posix.times
posix.times_result.n_fields
posix.times_result.n_sequence_fields
posix.times_result.n_unnamed_fields
posix.truncate
posix.ttyname
posix.umask
posix.uname
posix.uname_result.n_fields
posix.uname_result.n_sequence_fields
posix.uname_result.n_unnamed_fields
posix.unlink
posix.unsetenv
posix.urandom
posix.utime
posix.wait
posix.wait3
posix.wait4
posix.waitpid
posix.write
posix.writev
resource.struct_rusage.n_fields
resource.struct_rusage.n_sequence_fields
resource.struct_rusage.n_unnamed_fields
selectors.DefaultSelector.fileno
socket.AddressInfo.AI_DEFAULT
socket.AddressInfo.AI_MASK
socket.AddressInfo.AI_V4MAPPED_CFG
socket.MsgFlag.MSG_EOF
45 changes: 45 additions & 0 deletions tests/stubtest_allowlists/linux-py310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,48 @@ os.sendfile
signal.sigtimedwait
signal.sigwaitinfo
select.epoll.register

# Exists at runtime, but missing from stubs
_curses.get_escdelay
_curses.get_tabsize
_curses.set_escdelay
_curses.set_tabsize
asyncio.PidfdChildWatcher
asyncio.unix_events.PidfdChildWatcher
os.CLD_KILLED
os.CLD_STOPPED
os.EFD_CLOEXEC
os.EFD_NONBLOCK
os.EFD_SEMAPHORE
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
os.P_PIDFD
os.RWF_APPEND
os.RWF_DSYNC
os.RWF_HIPRI
os.RWF_NOWAIT
os.RWF_SYNC
os.SPLICE_F_MORE
os.SPLICE_F_MOVE
os.SPLICE_F_NONBLOCK
os.copy_file_range
os.eventfd
os.eventfd_read
os.eventfd_write
os.pidfd_open
os.preadv
os.pwritev
os.splice
posix.copy_file_range
posix.eventfd
posix.eventfd_read
posix.eventfd_write
posix.memfd_create
posix.pidfd_open
posix.preadv
posix.pwritev
posix.register_at_fork
posix.splice
posix.waitstatus_to_exitcode
time.pthread_getcpuclockid
7 changes: 7 additions & 0 deletions tests/stubtest_allowlists/linux-py36.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ ctypes.wintypes
pwd.getpwnam
ssl.PROTOCOL_SSLv3 # Depends on openssl compilation
ssl.RAND_egd # Depends on openssl compilation

# Exists at runtime, but missing from stubs
ftplib.FTP.trust_server_pasv_ipv4_address
ntpath.splitunc
posix.stat_float_times
ssl.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT
13 changes: 13 additions & 0 deletions tests/stubtest_allowlists/linux-py37.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
ctypes.wintypes
pwd.getpwnam

# Exists at runtime, but missing from stubs
ftplib.FTP.trust_server_pasv_ipv4_address
os.RWF_DSYNC
os.RWF_HIPRI
os.RWF_NOWAIT
os.RWF_SYNC
os.preadv
os.pwritev
posix.preadv
posix.pwritev
posix.register_at_fork
time.pthread_getcpuclockid
18 changes: 18 additions & 0 deletions tests/stubtest_allowlists/linux-py38.txt
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
select.epoll.register

# Exists at runtime, but missing from stubs
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
os.RWF_DSYNC
os.RWF_HIPRI
os.RWF_NOWAIT
os.RWF_SYNC
os.copy_file_range
os.preadv
os.pwritev
posix.copy_file_range
posix.memfd_create
posix.preadv
posix.pwritev
posix.register_at_fork
time.pthread_getcpuclockid
30 changes: 30 additions & 0 deletions tests/stubtest_allowlists/linux-py39.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
os.sendfile
select.epoll.register

# Exists at runtime, but missing from stubs
_curses.get_escdelay
_curses.get_tabsize
_curses.set_escdelay
_curses.set_tabsize
asyncio.PidfdChildWatcher
asyncio.unix_events.PidfdChildWatcher
os.CLD_KILLED
os.CLD_STOPPED
os.POSIX_SPAWN_CLOSE
os.POSIX_SPAWN_DUP2
os.POSIX_SPAWN_OPEN
os.P_PIDFD
os.RWF_DSYNC
os.RWF_HIPRI
os.RWF_NOWAIT
os.RWF_SYNC
os.copy_file_range
os.pidfd_open
os.preadv
os.pwritev
posix.copy_file_range
posix.memfd_create
posix.pidfd_open
posix.preadv
posix.pwritev
posix.register_at_fork
posix.waitstatus_to_exitcode
time.pthread_getcpuclockid
Loading