Restore stubtest 0.930 (#6663)

This commit is contained in:
Sebastian Rittau
2021-12-23 05:18:19 +01:00
committed by GitHub
parent 9bf2ceb963
commit 3fb2bcd4c1
51 changed files with 478 additions and 123 deletions

View File

@@ -20,6 +20,7 @@ select.epoll.register
# Exists at runtime, but missing from stubs
asyncio.PidfdChildWatcher
asyncio.unix_events.PidfdChildWatcher
mmap.MAP_POPULATE
os.CLD_KILLED
os.CLD_STOPPED
os.EFD_CLOEXEC
@@ -45,6 +46,13 @@ os.pidfd_open
os.preadv
os.pwritev
os.splice
posix.CLD_KILLED
posix.CLD_STOPPED
posix.EFD_[A-Z]+
posix.P_PIDFD
posix.POSIX_SPAWN_[A-Z0-9]+
posix.RWF_[A-Z]+
posix.SPLICE_[A-Z_]+
posix.copy_file_range
posix.eventfd
posix.eventfd_read

View File

@@ -9,3 +9,4 @@ ntpath.splitunc
posix.stat_float_times
ssl.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT
uuid.lib

View File

@@ -9,6 +9,7 @@ os.RWF_NOWAIT
os.RWF_SYNC
os.preadv
os.pwritev
posix.RWF_[A-Z]+
posix.preadv
posix.pwritev
time.pthread_getcpuclockid

View File

@@ -11,6 +11,8 @@ os.RWF_SYNC
os.copy_file_range
os.preadv
os.pwritev
posix.POSIX_SPAWN_[A-Z0-9]+
posix.RWF_[A-Z]+
posix.copy_file_range
posix.preadv
posix.pwritev

View File

@@ -18,6 +18,11 @@ os.copy_file_range
os.pidfd_open
os.preadv
os.pwritev
posix.CLD_KILLED
posix.CLD_STOPPED
posix.P_PIDFD
posix.POSIX_SPAWN_[A-Z0-9]+
posix.RWF_[A-Z]+
posix.copy_file_range
posix.pidfd_open
posix.preadv

View File

@@ -11,6 +11,7 @@ os.SF_NODISKIO
os.SF_SYNC
os.plock
posix.EX_NOTFOUND
posix.NGROUPS_MAX
select.EPOLL_RDHUP
selectors.KqueueSelector
signal.SIGEMT

View File

@@ -156,7 +156,6 @@ distutils.dist.DistributionMetadata.set_classifiers
distutils.dist.DistributionMetadata.set_keywords
distutils.dist.DistributionMetadata.set_platforms
distutils.util.get_host_platform
lib2to3.pgen2.tokenize.COLONEQUAL
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public

View File

@@ -21,6 +21,11 @@ collections.AsyncGenerator.ag_running
collections.Callable
collections.UserString.maketrans
contextlib._GeneratorContextManager.__init__
datetime.datetime_CAPI
distutils.cygwinccompiler.RE_VERSION
distutils.dist.command_re
distutils.fancy_getopt.longopt_re
distutils.fancy_getopt.neg_alias_re
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
hmac.HMAC.__init__
@@ -38,6 +43,7 @@ pyexpat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - funct
random.Random.randrange # missing undocumented arg _int
random.randrange # missing undocumented arg _int
sched.Event.__doc__ # __slots__ is overridden
stringprep.unicodedata # re-exported from unicodedata
sre_compile.dis
typing.AsyncGenerator.ag_await
typing.AsyncGenerator.ag_code
@@ -64,11 +70,26 @@ typing\.\w+\.__new__
unittest._log # New in Python 3.9
unittest.async_case # Added in Python 3.8
uuid.UUID.int
uuid.libname
xml.etree.ElementTree.TreeBuilder.start # Discrepancy between Python and C modules, fixed in bpo-39495
xml.etree.cElementTree.TreeBuilder.start # bpo-39495
xml.parsers.expat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - function gets only positional args
# These enums derive from (int, IntEnum) or (str, Enum). See comment in py3_common.txt
tkinter.EventType.__new__
tkinter.commondialog.[A-Z_]+
tkinter.commondialog.TclVersion
tkinter.commondialog.TkVersion
tkinter.commondialog.wantobjects
tkinter.dialog.[A-Z_]+
tkinter.dialog.TclVersion
tkinter.dialog.TkVersion
tkinter.dialog.wantobjects
tkinter.filedialog.[A-Z_]+
tkinter.filedialog.TclVersion
tkinter.filedialog.TkVersion
tkinter.filedialog.wantobjects
tkinter.simpledialog.wantobjects
tkinter.tix.wantobjects
builtins.memoryview.__iter__ # C type that implements __getitem__
builtins.memoryview.cast # inspect.signature is incorrect about shape being kw-only

View File

@@ -91,6 +91,7 @@ _imp.source_hash
asyncio.BufferedProtocol.eof_received
asyncio.protocols.BufferedProtocol.eof_received
contextvars.ContextVar.__class_getitem__
datetime.datetime_CAPI
distutils.command.bdist_wininst
distutils.command.bdist_wininst.bdist_wininst
distutils.dist.DistributionMetadata.set_classifiers
@@ -98,6 +99,10 @@ distutils.dist.DistributionMetadata.set_keywords
distutils.dist.DistributionMetadata.set_platforms
distutils.sysconfig.expand_makefile_vars
distutils.sysconfig.get_python_version
distutils.cygwinccompiler.RE_VERSION
distutils.dist.command_re
distutils.fancy_getopt.longopt_re
distutils.fancy_getopt.neg_alias_re
dummy_threading.Barrier
dummy_threading.BoundedSemaphore
dummy_threading.BrokenBarrierError
@@ -120,7 +125,6 @@ dummy_threading.setprofile
dummy_threading.settrace
dummy_threading.stack_size
html.parser.HTMLParser.unescape
lib2to3.pgen2.tokenize.COLONEQUAL
platform.popen
plistlib.Data.asBase64
plistlib.Data.fromBase64
@@ -128,12 +132,27 @@ ssl.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.SSLObject.verify_client_post_handshake
ssl.SSLSocket.verify_client_post_handshake
stringprep.unicodedata # re-exported from unicodedata
sys.callstats
sys.get_coroutine_wrapper
sys.set_coroutine_wrapper
tempfile.SpooledTemporaryFile.softspace
tkinter.commondialog.[A-Z_]+
tkinter.commondialog.TclVersion
tkinter.commondialog.TkVersion
tkinter.commondialog.wantobjects
tkinter.dialog.[A-Z_]+
tkinter.dialog.TclVersion
tkinter.dialog.TkVersion
tkinter.dialog.wantobjects
tkinter.dnd.Icon
tkinter.dnd.Tester
tkinter.dnd.test
tkinter.filedialog.[A-Z_]+
tkinter.filedialog.TclVersion
tkinter.filedialog.TkVersion
tkinter.filedialog.wantobjects
tkinter.simpledialog.wantobjects
tkinter.tix.wantobjects
types.CoroutineType.cr_origin
typing._SpecialForm.__call__

View File

@@ -103,6 +103,7 @@ _imp.source_hash
asyncio.BufferedProtocol.eof_received
asyncio.protocols.BufferedProtocol.eof_received
contextvars.ContextVar.__class_getitem__
datetime.datetime_CAPI
distutils.command.bdist_wininst
distutils.command.bdist_wininst.bdist_wininst
distutils.dist.DistributionMetadata.set_classifiers
@@ -111,6 +112,10 @@ distutils.dist.DistributionMetadata.set_platforms
distutils.sysconfig.expand_makefile_vars
distutils.sysconfig.get_python_version
distutils.util.get_host_platform
distutils.cygwinccompiler.RE_VERSION
distutils.dist.command_re
distutils.fancy_getopt.longopt_re
distutils.fancy_getopt.neg_alias_re
dummy_threading.Barrier
dummy_threading.BoundedSemaphore
dummy_threading.BrokenBarrierError
@@ -135,7 +140,6 @@ dummy_threading.setprofile
dummy_threading.settrace
dummy_threading.stack_size
html.parser.HTMLParser.unescape
lib2to3.pgen2.tokenize.COLONEQUAL
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
@@ -146,11 +150,26 @@ plistlib.Data.asBase64
plistlib.Data.fromBase64
pyexpat.XMLParserType.SkippedEntityHandler
pyexpat.XMLParserType.intern
stringprep.unicodedata # re-exported from unicodedata
sys.callstats
tempfile.SpooledTemporaryFile.softspace
tkinter.commondialog.[A-Z_]+
tkinter.commondialog.TclVersion
tkinter.commondialog.TkVersion
tkinter.commondialog.wantobjects
tkinter.dialog.[A-Z_]+
tkinter.dialog.TclVersion
tkinter.dialog.TkVersion
tkinter.dialog.wantobjects
tkinter.dnd.Icon
tkinter.dnd.Tester
tkinter.dnd.test
tkinter.filedialog.[A-Z_]+
tkinter.filedialog.TclVersion
tkinter.filedialog.TkVersion
tkinter.filedialog.wantobjects
tkinter.simpledialog.wantobjects
tkinter.tix.wantobjects
types.CoroutineType.cr_origin
typing._SpecialForm.__call__
unicodedata.UCD.is_normalized

View File

@@ -138,10 +138,13 @@ distutils.dist.DistributionMetadata.set_platforms
distutils.sysconfig.expand_makefile_vars
distutils.sysconfig.get_python_version
distutils.util.get_host_platform
distutils.cygwinccompiler.RE_VERSION
distutils.dist.command_re
distutils.fancy_getopt.longopt_re
distutils.fancy_getopt.neg_alias_re
hmac.HMAC.digest_cons
hmac.HMAC.inner
hmac.HMAC.outer
lib2to3.pgen2.tokenize.COLONEQUAL
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
@@ -153,6 +156,7 @@ pstats.Stats.get_stats_profile
pstats.StatsProfile
pyexpat.XMLParserType.SkippedEntityHandler
pyexpat.XMLParserType.intern
stringprep.unicodedata # re-exported from unicodedata
types.CoroutineType.cr_origin
typing._SpecialForm.__call__
unicodedata.UCD.is_normalized

View File

@@ -1,4 +1,9 @@
_collections_abc.Callable # Some typecheckers need this as specialform
# ==========
# Allowlist entries that should be fixed
# ==========
# Please keep sorted alphabetically
# Coroutine and Generator properties are added programmatically
_collections_abc.Coroutine.cr_await
_collections_abc.Coroutine.cr_code
@@ -13,7 +18,6 @@ _collections_abc.Sequence.index # Supporting None in end is not mandatory
_csv.Dialect.__init__ # C __init__ signature is inaccurate
_socket.*
_threading_local.local.__new__
_typeshed.* # Utility types for typeshed, doesn't exist at runtime
_weakref.ref.__call__
abc.abstractclassmethod # Deprecated, unsupported by mypy, hard to fix. #6552
abc.abstractstaticmethod # Deprecated, unsupported by mypy, hard to fix. #6552
@@ -25,8 +29,6 @@ argparse.Namespace.__getattr__ # The whole point of this class is its attribute
asynchat.async_chat.encoding # Removal planned for 3.12, can add if someone needs this
asynchat.async_chat.use_encoding # Removal planned for 3.12, can add if someone needs this
asynchat.find_prefix_at_end # Removal planned for 3.12, can add if someone needs this
asyncore.dispatcher.addr # Removal planned for 3.12, can add if someone needs this
asyncore.dispatcher.handle_accepted # Removal planned for 3.12, can add if someone needs this
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
# Condition functions are exported in __init__
asyncio.Condition.acquire
@@ -169,6 +171,7 @@ pickle.Unpickler.persistent_load # C unpickler persistent_load is an attribute
pickle._Unpickler\..* # Best effort typing for undocumented internals
pickle._Pickler\..* # Best effort typing for undocumented internals
poplib.POP3_SSL.stls # bad declaration of inherited function. See poplib.pyi
pyexpat.expat_CAPI
select.poll # Depends on configuration
selectors.DevpollSelector # Depends on configuration
socketserver.BaseServer.fileno # implemented in derived classes
@@ -180,6 +183,7 @@ ssl._ASN1Object.__new__ # You cannot override __new__ in NamedTuple and runtime
subprocess.Popen.__init__
sys.gettotalrefcount # Available on python debug builds
sys.implementation # Actually SimpleNamespace but then you wouldn't have convenient attributes
sys.thread_info
tarfile.TarFile.errors # errors is initialized for some reason as None even though it really only accepts str
# SpooledTemporaryFile implements IO except these methods
# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918
@@ -189,6 +193,12 @@ tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable
threading.Condition.acquire # Condition functions are exported in __init__
threading.Condition.release # Condition functions are exported in __init__
tkinter.simpledialog.[A-Z_]+
tkinter.simpledialog.TclVersion
tkinter.simpledialog.TkVersion
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
multiprocessing.dummy.Condition.acquire
multiprocessing.dummy.Condition.release
threading.Lock # A factory function that returns 'most efficient lock'. Marking it as a function will make it harder for users to mark the Lock type.
@@ -226,6 +236,7 @@ webbrowser.UnixBrowser.remote_action # always overridden in inheriting class
webbrowser.UnixBrowser.remote_action_newtab # always overridden in inheriting class
webbrowser.UnixBrowser.remote_action_newwin # always overridden in inheriting class
wsgiref.types # Doesn't exist, see comments in file
xml.parsers.expat.expat_CAPI
# ==========
# Allowlist entries that cannot or should not be fixed
@@ -239,9 +250,6 @@ builtins.exit
builtins.help
builtins.license
builtins.quit
# Builtins that mypy pretends exist
builtins.reveal_locals
builtins.reveal_type
# GetSetDescriptor that always raises AttributeError
builtins.OSError.characters_written
# Aliases for OSError
@@ -282,6 +290,26 @@ codecs.StreamReaderWriter.\w+
codecs.StreamRecoder.\w+
urllib.response.addbase.\w+
# Unnecessary re-exports
asyncore\.E[A-Z]+ # re-exported from errno
asyncore.errorcode # re-exported from errno
email._header_value_parser.hexdigits
logging.handlers.ST_[A-Z]+
xml.dom.expatbuilder.EMPTY_NAMESPACE
xml.dom.expatbuilder.EMPTY_PREFIX
xml.dom.expatbuilder.XMLNS_NAMESPACE
xml.dom.minidom.EMPTY_NAMESPACE
xml.dom.minidom.EMPTY_PREFIX
xml.dom.minidom.XMLNS_NAMESPACE
xml.dom.minidom.StringTypes
# Typing-related weirdness
_collections_abc.Callable
_typeshed.* # Utility types for typeshed, doesn't exist at runtime
# Builtins that type checkers pretends exist
builtins.reveal_locals
builtins.reveal_type
# Platform differences that cannot be captured by the type system
errno.[A-Z0-9]+
os.O_[A-Z_]+
@@ -364,10 +392,28 @@ email.contentmanager.set_bytes_content
email.contentmanager.set_message_content
email.contentmanager.set_text_content
# Side effects from module initialization
_compat_pickle.excname
email.contentmanager.maintype
email.contentmanager.subtype
inspect.k
inspect.mod_dict
inspect.v
json.encoder.i
lib2to3.pgen2.grammar.line
lib2to3.pgen2.grammar.name
lib2to3.pgen2.grammar.op
# ==========
# Missing from distutils module (deprecated, to be removed in 3.12)
# Missing from deprecated modules
# Any of these can be added if someone needs them
# ==========
# Removal planned for 3.12
asyncore.dispatcher.addr
asyncore.dispatcher.handle_accepted
# Missing from distutils module (deprecated, to be removed in 3.12)
distutils.archive_util.ARCHIVE_FORMATS
distutils.archive_util.check_archive_formats
distutils.bcppcompiler.BCPPCompiler.compiler_type
distutils.bcppcompiler.BCPPCompiler.exe_extension
@@ -392,28 +438,19 @@ distutils.ccompiler.CCompiler.shared_lib_format
distutils.ccompiler.CCompiler.src_extensions
distutils.ccompiler.CCompiler.static_lib_extension
distutils.ccompiler.CCompiler.static_lib_format
distutils.ccompiler.compiler_class
distutils.cmd.Command.dump_options
distutils.cmd.Command.ensure_finalized
distutils.command.bdist
distutils.command.bdist_dumb
distutils.command.bdist_rpm
distutils.command.build
distutils.command.build_clib
distutils.command.build_ext
distutils.command.build_py
distutils.command.build_scripts
distutils.command.check
distutils.command.clean
distutils.command.install
distutils.command.install_data
distutils.command.install_headers
distutils.command.install_lib
distutils.command.install_scripts
distutils.command.register
distutils.command.sdist
distutils.command.upload
distutils.command.bdist_rpm.DEBUG
distutils.command.build_ext.USER_BASE
distutils.command.build_scripts.ST_MODE
distutils.command.install.*
distutils.command.install_scripts.ST_MODE
distutils.core.Command.dump_options
distutils.core.Command.ensure_finalized
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.Distribution.announce
distutils.core.Distribution.common_usage
distutils.core.Distribution.display_option_names
@@ -441,7 +478,13 @@ distutils.core.Distribution.print_commands
distutils.core.Distribution.reinitialize_command
distutils.core.Distribution.run_command
distutils.core.Distribution.run_commands
distutils.core.extension_keywords
distutils.core.gen_usage
distutils.core.setup_keywords
distutils.cygwinccompiler.CONFIG_H_NOTOK
distutils.cygwinccompiler.CONFIG_H_OK
distutils.cygwinccompiler.CONFIG_H_UNCERTAIN
distutils.cygwinccompiler.PIPE
distutils.cygwinccompiler.CygwinCCompiler.compiler_type
distutils.cygwinccompiler.CygwinCCompiler.exe_extension
distutils.cygwinccompiler.CygwinCCompiler.obj_extension
@@ -455,6 +498,7 @@ distutils.cygwinccompiler.get_msvcr
distutils.cygwinccompiler.get_versions
distutils.cygwinccompiler.is_cygwingcc
distutils.dir_util.ensure_relative
distutils.dist.DEBUG
distutils.dist.Distribution.announce
distutils.dist.Distribution.common_usage
distutils.dist.Distribution.display_option_names
@@ -484,6 +528,7 @@ distutils.dist.Distribution.run_command
distutils.dist.Distribution.run_commands
distutils.dist.fix_help_options
distutils.extension.read_setup_file
distutils.fancy_getopt.WS_TRANS
distutils.fancy_getopt.FancyGetopt.add_option
distutils.fancy_getopt.FancyGetopt.get_attr_name
distutils.fancy_getopt.FancyGetopt.has_option
@@ -491,6 +536,8 @@ distutils.fancy_getopt.FancyGetopt.print_help
distutils.fancy_getopt.FancyGetopt.set_aliases
distutils.fancy_getopt.FancyGetopt.set_negative_aliases
distutils.fancy_getopt.FancyGetopt.set_option_table
distutils.fancy_getopt.longopt_pat
distutils.fancy_getopt.longopt_xlate
distutils.fancy_getopt.translate_longopt
distutils.msvccompiler.MSVCCompiler.compiler_type
distutils.msvccompiler.MSVCCompiler.exe_extension
@@ -510,8 +557,14 @@ distutils.msvccompiler.get_build_version
distutils.msvccompiler.normalize_and_reduce_paths
distutils.msvccompiler.read_keys
distutils.msvccompiler.read_values
distutils.spawn.DEBUG
distutils.sysconfig.BASE_EXEC_PREFIX
distutils.sysconfig.BASE_PREFIX
distutils.sysconfig.build_flags
distutils.sysconfig.parse_config_h
distutils.sysconfig.parse_makefile
distutils.sysconfig.project_base
distutils.sysconfig.python_build
distutils.text_file.TextFile.default_options
distutils.text_file.TextFile.error
distutils.text_file.TextFile.gen_error

View File

@@ -1,3 +1,15 @@
_stat.IO_REPARSE_TAG_[A-Z_]+
_winapi.[A-Z_]+_PRIORITY_CLASS
_winapi.CREATE_[A-Z_]+
_winapi.DETACHED_PROCESS
_winapi.FILE_MAP_[A-Z_]+
_winapi.FILE_TYPE_[A-Z]+
_winapi.INVALID_HANDLE_VALUE
_winapi.MEM_[A-Z_]+
_winapi.PAGE_[A-Z_]+
_winapi.SEC_[A-Z_]+
_winapi.SYNCHRONIZE
_msi.CreateRecord
_msi.FCICreate
_msi.OpenDatabase

View File

@@ -1,3 +1,8 @@
_winapi.[A-Z_]+_PRIORITY_CLASS
_winapi.CREATE_[A-Z_]+
_winapi.DETACHED_PROCESS
_winapi.FILE_TYPE_[A-Z]+
# The following methods were changed in point releases from Python 3.6 to 3.9
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a

View File

@@ -1,3 +1,14 @@
_stat.IO_REPARSE_TAG_[A-Z_]+
_winapi.[A-Z_]+_PRIORITY_CLASS
_winapi.CREATE_[A-Z_]+
_winapi.DETACHED_PROCESS
_winapi.FILE_MAP_[A-Z_]+
_winapi.FILE_TYPE_[A-Z]+
_winapi.INVALID_HANDLE_VALUE
_winapi.MEM_[A-Z_]+
_winapi.PAGE_[A-Z_]+
_winapi.SEC_[A-Z_]+
_winapi.SYNCHRONIZE
# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping

View File

@@ -1,3 +1,14 @@
_stat.IO_REPARSE_TAG_[A-Z_]+
_winapi.[A-Z_]+_PRIORITY_CLASS
_winapi.CREATE_[A-Z_]+
_winapi.DETACHED_PROCESS
_winapi.FILE_MAP_[A-Z_]+
_winapi.FILE_TYPE_[A-Z]+
_winapi.INVALID_HANDLE_VALUE
_winapi.MEM_[A-Z_]+
_winapi.PAGE_[A-Z_]+
_winapi.SEC_[A-Z_]+
_winapi.SYNCHRONIZE
# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping

View File

@@ -1,9 +1,23 @@
_msi.MSI[A-Z_]+
_msi.PID_[A-Z_]+
_stat.FILE_ATTRIBUTE_[A-Z_]+
ctypes.GetLastError # Is actually a pointer
distutils.archive_util.getgrnam
distutils.archive_util.getpwnam
distutils.msvccompiler.HKEYS
locale.[A-Z0-9_]+ # Constants that should be moved to _locale and re-exported conditionally
locale.nl_langinfo # Function that should be moved to _locale and re-exported conditionally
mmap.PAGESIZE
msilib.MSI[A-Z_]+
msilib.text.dirname
msilib.PID_[A-Z_]+
msvcrt.CRT_ASSEMBLY_VERSION
msvcrt.SEM_[A-Z]+
selectors.KqueueSelector
signal.SIGEMT
signal.SIGINFO
locale.[A-Z0-9_]+ # Constants that should be moved to _locale and re-exported conditionally
locale.nl_langinfo # Function that should be moved to _locale and re-exported conditionally
winsound.SND_APPLICATION
xmlrpc.server.fcntl
# ==========
# Allowlist entries that cannot or should not be fixed