Deduplicate stdlib stubtest allowlist entries (#10594)

This commit is contained in:
Alex Waygood
2023-08-17 00:11:59 +01:00
committed by GitHub
parent ef758b66c0
commit 6a8d653a67
12 changed files with 55 additions and 272 deletions

View File

@@ -1,16 +1,6 @@
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
_collections_abc.ItemsView.__reversed__
_collections_abc.KeysView.__reversed__
_collections_abc.ValuesView.__reversed__
_weakref.ProxyType.__reversed__ # Doesn't really exist
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.Future.__init__ # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
builtins.float.__setformat__ # Internal method for CPython test suite
builtins.property.__set_name__ # Doesn't actually exist
bz2.BZ2Decompressor.__init__ # function does not accept parameters but C signature is set
@@ -18,32 +8,21 @@ configparser.ParsingError.filename
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
gettext.install
gettext.translation
hmac.new # Stub is a white lie; see comments in the stub
importlib.abc.Finder.find_module
importlib.metadata._meta.SimplePath.__truediv__ # See comments in the stub
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
multiprocessing.spawn._main
pickle.Pickler.reducer_override # implemented in C pickler
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__match_args__
platform.uname_result.__new__
platform.uname_result.processor
sys.UnraisableHookArgs # Not exported from sys
tkinter.Tk.split
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
typing._SpecialForm.__mro_entries__
weakref.ProxyType.__reversed__ # Doesn't really exist
weakref.WeakValueDictionary.update
typing_extensions\.get_original_bases
# Exist at runtime for internal reasons, no need to put them in the stub
@@ -90,12 +69,6 @@ _csv.Writer
bdb.Breakpoint.clearBreakpoints
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
# ==========
# Related to positional-only arguments
@@ -151,20 +124,10 @@ pydoc.Helper.symbols_ # Loop variable in class https://github.com/python/typesh
pydoc.Helper.topic # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
# C signature is broader than what is actually accepted
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.ExtSlice.__new__
ast.Index.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
queue.SimpleQueue.__init__
xml.etree.ElementTree.XMLParser.__init__
xml.etree.cElementTree.XMLParser.__init__
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all PathLike classes to implement class_getitem
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
_ast.ImportFrom.level # None on the class, but never None on instances
ast.ImportFrom.level # None on the class, but never None on instances
@@ -181,7 +144,6 @@ typing_extensions\.reveal_type
typing.NewType.__call__
# Super-special typing primitives
typing_extensions\.Final
typing\.NamedTuple
typing\.Annotated
@@ -198,6 +160,3 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
# Omit internal _KEEP argument
tarfile.TarInfo.replace

View File

@@ -1,15 +1,8 @@
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.AsyncIterable.__class_getitem__
_collections_abc.Awaitable.__class_getitem__
_collections_abc.Container.__class_getitem__
_collections_abc.ItemsView.__reversed__
_collections_abc.Iterable.__class_getitem__
_collections_abc.KeysView.__reversed__
_collections_abc.MappingView.__class_getitem__
_collections_abc.ValuesView.__reversed__
_csv.Reader
_csv.Writer
bz2.BZ2Decompressor.__init__ # function does not accept parameters but C signature is set
@@ -20,24 +13,10 @@ enum.Enum._generate_next_value_
# Not strictly speaking a staticmethod on 3.11, but it acts like one:
enum.StrEnum._generate_next_value_
importlib.abc.Finder.find_module
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
multiprocessing.spawn._main
queue.SimpleQueue.__init__
sys.UnraisableHookArgs # Not exported from sys
tkinter._VersionInfoType.__doc__
typing_extensions\.get_original_bases
typing.NewType.__call__
typing.NewType.__mro_entries__
weakref.WeakValueDictionary.update
# ==========
# Related to positional-only arguments
@@ -82,41 +61,23 @@ _collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in
_weakref.ProxyType.__reversed__ # Doesn't really exist
ast.ImportFrom.level # None on the class, but never None on instances
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
builtins.property.__set_name__ # Doesn't actually exist
dataclasses.KW_ONLY # white lies around defaults
enum.auto.__init__ # The stub for enum.auto is nothing like the implementation
enum.auto.value # The stub for enum.auto is nothing like the implementation
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
hmac.new # Stub is a white lie; see comments in the stub
http.HTTPMethod.description # mutable instance attribute at runtime but we pretend it's a property
inspect._ParameterKind.description # Still exists, but stubtest can't see it
os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all PathLike classes to implement class_getitem
pickle.Pickler.reducer_override # implemented in C pickler
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
weakref.ProxyType.__reversed__ # Doesn't really exist
# C signature is broader than what is actually accepted
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.ExtSlice.__new__
ast.Index.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.futures.Future.__init__
asyncio.Future.__init__
contextvars.Context.__init__
queue.SimpleQueue.__init__
xml.etree.ElementTree.XMLParser.__init__
xml.etree.cElementTree.XMLParser.__init__
# Treated an alias of a typing class in the stubs,
# they are generic to type checkers anyway.
@@ -134,7 +95,6 @@ unittest.case.TestCase.__init_subclass__
# Super-special typing primitives
typing\._SpecialForm.*
typing_extensions\.Final
typing\.NamedTuple
typing\.LiteralString
typing\.Annotated
@@ -163,6 +123,3 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
# Omit internal _KEEP argument
tarfile.TarInfo.replace

View File

@@ -94,39 +94,18 @@ turtle.__all__
turtle.teleport
# Errors that also existed on Python 3.11
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.AsyncIterable.__class_getitem__
_collections_abc.Awaitable.__class_getitem__
_collections_abc.Container.__class_getitem__
_collections_abc.ItemsView.__reversed__
_collections_abc.Iterable.__class_getitem__
_collections_abc.KeysView.__reversed__
_collections_abc.MappingView.__class_getitem__
_collections_abc.ValuesView.__reversed__
_csv.Reader
_csv.Writer
configparser.LegacyInterpolation.__init__
enum.Enum.__init__
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
multiprocessing.spawn._main
queue.SimpleQueue.__init__
sys.UnraisableHookArgs # Not exported from sys
tkinter._VersionInfoType.__doc__
typing.NewType.__call__
typing.NewType.__mro_entries__
weakref.WeakValueDictionary.update
# ==========
# Related to positional-only arguments
@@ -174,41 +153,23 @@ _collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in
_weakref.ProxyType.__reversed__ # Doesn't really exist
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
ast.ImportFrom.level # None on the class, but never None on instances
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
builtins.property.__set_name__ # Doesn't actually exist
dataclasses.KW_ONLY # white lies around defaults
enum.auto.__init__ # The stub for enum.auto is nothing like the implementation
enum.auto.value # The stub for enum.auto is nothing like the implementation
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
hmac.new # Stub is a white lie; see comments in the stub
http.HTTPMethod.description # mutable instance attribute at runtime but we pretend it's a property
inspect._ParameterKind.description # Still exists, but stubtest can't see it
os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all PathLike classes to implement class_getitem
pickle.Pickler.reducer_override # implemented in C pickler
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
weakref.ProxyType.__reversed__ # Doesn't really exist
# C signature is broader than what is actually accepted
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.ExtSlice.__new__
ast.Index.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.futures.Future.__init__
asyncio.Future.__init__
contextvars.Context.__init__
queue.SimpleQueue.__init__
xml.etree.ElementTree.XMLParser.__init__
xml.etree.cElementTree.XMLParser.__init__
# Treated an alias of a typing class in the stubs,
# they are generic to type checkers anyway.
@@ -226,10 +187,6 @@ unittest.case.TestCase.__init_subclass__
# Super-special typing primitives
typing\._SpecialForm.*
typing_extensions\.Final
typing\.NamedTuple
typing\.LiteralString
typing\.Annotated
# Omit internal _KEEP argument
tarfile.TarInfo.replace

View File

@@ -1,20 +1,4 @@
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.ItemsView.__reversed__
_collections_abc.KeysView.__reversed__
_collections_abc.ValuesView.__reversed__
_dummy_threading
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.Future.__init__ # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself
@@ -43,34 +27,20 @@ dummy_threading.Event.isSet
dummy_threading.Thread.native_id
dummy_threading.local.__new__
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
gettext.install # codeset default value is ['unspecified'] so can't be specified
gettext.translation # codeset default value is ['unspecified'] so can't be specified
hmac.new # Stub is a white lie; see comments in the stub
importlib.abc.Finder.find_module
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
multiprocessing.spawn._main
pickle.Pickler.reducer_override # implemented in C pickler
random.Random.randrange # missing undocumented arg _int
sched.Event.__doc__ # __slots__ is overridden
sys.UnraisableHookArgs # Not exported from sys
typing.NamedTuple.__new__
typing.NamedTuple._asdict
typing.NamedTuple._make
typing.NamedTuple._replace
typing._SpecialForm.__new__
weakref.WeakValueDictionary.update
xml.etree.ElementTree.TreeBuilder.start # Discrepancy between Python and C modules, fixed in bpo-39495
xml.etree.ElementTree.XMLParser.__init__ # Defined in C so has general signature
xml.etree.cElementTree.TreeBuilder.start # bpo-39495
xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signature
typing_extensions\.get_original_bases
# Exist at runtime for internal reasons, no need to put them in the stub
@@ -108,12 +78,6 @@ dummy_threading.ExceptHookArgs
dummy_threading.Lock
dummy_threading.RLock
html.parser.HTMLParser.unescape
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
plistlib.Data.asBase64
plistlib.Data.fromBase64
tempfile.SpooledTemporaryFile.softspace
@@ -164,11 +128,6 @@ collections.Set.__rxor__
builtins.memoryview.__iter__ # C type that implements __getitem__
builtins.memoryview.cast # inspect.signature is incorrect about shape being kw-only
# C signature is broader than what is actually accepted
queue.SimpleQueue.__init__
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
# Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
builtins.classmethod.__get__
builtins.property.__get__
@@ -186,9 +145,6 @@ typing_extensions\.assert_never
typing_extensions\.assert_type
typing_extensions\.reveal_type
# Super-special typing primitives
typing_extensions\.Final
# We lie about the existence of these methods
.*.__buffer__
.*.__release_buffer__
@@ -202,6 +158,3 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
# Omit internal _KEEP argument
tarfile.TarInfo.replace

View File

@@ -1,22 +1,6 @@
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.ItemsView.__reversed__
_collections_abc.KeysView.__reversed__
_collections_abc.ValuesView.__reversed__
_weakref.ProxyType.__reversed__ # Doesn't really exist
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.ExtSlice.__new__
ast.Index.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.Future.__init__ # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
builtins.float.__setformat__ # Internal method for CPython test suite
builtins.input # Incorrect default value in text signature, fixed in 3.10
bz2.BZ2Decompressor.__init__ # function does not accept parameters but C signature is set
@@ -38,33 +22,21 @@ configparser.ParsingError.filename
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
functools._lru_cache_wrapper.cache_parameters # Cannot be detected statically
gettext.install
gettext.translation
hmac.new # Stub is a white lie; see comments in the stub
importlib.abc.Finder.find_module
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
multiprocessing.spawn._main
pickle.Pickler.reducer_override # implemented in C pickler
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__new__
platform.uname_result._fields
platform.uname_result.processor
sched.Event.__doc__ # __slots__ is overridden
sys.UnraisableHookArgs # Not exported from sys
tkinter.Tk.split
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
types.GenericAlias.__getattr__
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
weakref.ProxyType.__reversed__ # Doesn't really exist
weakref.WeakValueDictionary.update
typing_extensions\.get_original_bases
# Exist at runtime for internal reasons, no need to put them in the stub
@@ -98,12 +70,6 @@ collections.MappingView.__class_getitem__
hmac.HMAC.digest_cons
hmac.HMAC.inner
hmac.HMAC.outer
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
types.GenericAlias.__mro_entries__
typing._SpecialForm.__mro_entries__
@@ -142,17 +108,11 @@ collections.Set.__rxor__
builtins.memoryview.__iter__ # C type that implements __getitem__
builtins.memoryview.cast # inspect.signature is incorrect about shape being kw-only
# C signature is broader than what is actually accepted
queue.SimpleQueue.__init__
xml.etree.ElementTree.XMLParser.__init__
xml.etree.cElementTree.XMLParser.__init__
ast.FormattedValue.conversion # None on the class, but never None on instances
_ast.FormattedValue.conversion # None on the class, but never None on instances
_ast.ImportFrom.level # None on the class, but never None on instances
ast.ImportFrom.level # None on the class, but never None on instances
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all PathLike classes to implement class_getitem
# Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
@@ -173,7 +133,6 @@ typing_extensions\.assert_type
typing_extensions\.reveal_type
# Super-special typing primitives
typing_extensions\.Final
typing\.NamedTuple
typing\.Annotated
@@ -190,6 +149,3 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
# Omit internal _KEEP argument
tarfile.TarInfo.replace

View File

@@ -4,9 +4,25 @@
# Please keep sorted alphabetically
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.ItemsView.__reversed__
_collections_abc.KeysView.__reversed__
_collections_abc.ValuesView.__reversed__
_csv.Dialect.__init__ # C __init__ signature is inaccurate
_ctypes.CFuncPtr # stubtest erroneously thinks it can't be subclassed
_threading_local.local.__new__
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
asyncio.Future.__init__ # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
builtins.dict.get
builtins.ellipsis # type is not exposed anywhere
builtins.function
@@ -24,6 +40,10 @@ ctypes.memmove # CFunctionType
ctypes.memset # CFunctionType
ctypes.string_at # docstring argument name is wrong
ctypes.wstring_at # docstring argument name is wrong
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154
functools.cached_property.__set__ # Stub is a white lie; see comments in the stub
hmac.new # Stub is a white lie; see comments in the stub
http.HTTPStatus.description # set in __new__
http.HTTPStatus.phrase # set in __new__
http.client.HTTPConnection.response_class # the actual type at runtime is abc.ABCMeta
@@ -44,6 +64,10 @@ io.FileIO.seek
io.StringIO.seek
io.StringIO.truncate
io.TextIOWrapper.truncate
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
ipaddress._BaseAddress.is_global
ipaddress._BaseAddress.is_link_local
ipaddress._BaseAddress.is_loopback
@@ -74,6 +98,7 @@ multiprocessing.managers.SyncManager.RLock
multiprocessing.queues.JoinableQueue.__init__
multiprocessing.queues.Queue.__init__
multiprocessing.queues.SimpleQueue.__init__
multiprocessing.spawn._main
multiprocessing.synchronize.Barrier.__init__
multiprocessing.synchronize.Condition.acquire
multiprocessing.synchronize.Condition.release
@@ -82,6 +107,7 @@ multiprocessing.synchronize.SemLock.acquire
multiprocessing.synchronize.SemLock.release
numbers.Number.__hash__ # typeshed marks this as abstract but code just sets this as None
optparse.Values.__getattr__ # Some attributes are set in __init__ using setattr
pickle.Pickler.reducer_override # implemented in C pickler
poplib.POP3_SSL.stls # bad declaration of inherited function. See poplib.pyi
pyexpat.expat_CAPI
select.poll # Depends on configuration
@@ -91,6 +117,7 @@ socketserver.BaseServer.fileno # implemented in derived classes
socketserver.BaseServer.get_request # implemented in derived classes
socketserver.BaseServer.server_bind # implemented in derived classes
ssl.Purpose.__new__ # the multiple inheritance confuses mypy
sys.UnraisableHookArgs # Not exported from sys
tarfile.TarFile.errors # errors is initialized for some reason as None even though it really only accepts str
tkinter.simpledialog.[A-Z_]+
tkinter.simpledialog.TclVersion
@@ -106,6 +133,9 @@ urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ # Args are passed as is to
weakref.WeakKeyDictionary.get
weakref.WeakKeyDictionary.update
weakref.WeakValueDictionary.get
weakref.WeakValueDictionary.update
xml.etree.ElementTree.XMLParser.__init__ # Defined in C so has general signature
xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signature
xml.parsers.expat.expat_CAPI
# ==========
@@ -151,6 +181,12 @@ multiprocessing.managers.Server.number_of_objects
multiprocessing.managers.Server.public
multiprocessing.managers.Server.serve_client
multiprocessing.managers.Server.shutdown
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments
multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
multiprocessing.managers.SyncManager.Barrier
multiprocessing.managers.SyncManager.JoinableQueue
multiprocessing.managers.SyncManager.Pool
@@ -321,10 +357,6 @@ csv.Dialect.skipinitialspace
csv.DictReader.__init__ # runtime sig has *args but will error if more than 5 positional args are supplied
csv.DictWriter.__init__ # runtime sig has *args but will error if more than 5 positional args are supplied
# Removed undocumented and often mistakenly used _normalize parameter that was removed in 3.12
# On 3.12, stubtest doesn't correctly combine the overload because parameter names mismatch
fractions.Fraction.__new__
contextvars.Context.__init__ # C signature is broader than what is actually accepted
dataclasses.field # White lies around defaults
hashlib.sha3_\d+ # Can be a class or a built-in function, can't be subclassed at runtime
@@ -364,6 +396,9 @@ multiprocessing.(dummy|managers).Namespace.__[gs]etattr__ # Any field can be se
# but stubtest infers the runtime type as <class ForkingPickler>
multiprocessing.reduction.AbstractReducer.ForkingPickler
# C signature is broader than what is actually accepted
queue.SimpleQueue.__init__
# Items that depend on the existence and flags of SSL
imaplib.IMAP4_SSL.ssl
ssl.PROTOCOL_SSLv2
@@ -390,6 +425,7 @@ typing_extensions\._TypedDict\..*
# Special primitives
typing_extensions\.Annotated
typing_extensions\.Final
typing_extensions\.NamedTuple
typing_extensions\.LiteralString
typing_extensions\.Coroutine
@@ -620,3 +656,8 @@ typing(_extensions)?\.IO\.__iter__ # See https://github.com/python/typeshed/com
(tarfile.AbsolutePathError)?
(tarfile.AbsoluteLinkError)?
(shutil.unpack_archive)?
# Omit internal _KEEP argument
tarfile.TarInfo.replace
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime

View File

@@ -1,14 +1,5 @@
# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.recvfrom
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.sendto
msvcrt.GetErrorMode
subprocess.STARTUPINFO.copy
# pathlib methods that exist on Windows, but always raise NotImplementedError,
# so are omitted from the stub

View File

@@ -1,17 +1,8 @@
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.recvfrom
# Exists at runtime, missing from the stubs
asyncio.IocpProactor.recvfrom_into
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.recvfrom_into
asyncio.windows_events.IocpProactor.sendto
msvcrt.GetErrorMode
os.EX_OK
subprocess.STARTUPINFO.copy
# pathlib methods that exist on Windows, but always raise NotImplementedError,
# so are omitted from the stub

View File

@@ -1,16 +1,8 @@
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.NeedCurrentDirectoryForExePath
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.finish_socket_func
asyncio.IocpProactor.recvfrom
asyncio.IocpProactor.recvfrom_into
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.finish_socket_func
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.recvfrom_into
asyncio.windows_events.IocpProactor.sendto
msvcrt.GetErrorMode
ntpath.isdir
os.EX_OK
@@ -22,4 +14,3 @@ os.path.isdir
os.set_blocking
os.stat_result.st_birthtime
os.stat_result.st_birthtime_ns
subprocess.STARTUPINFO.copy

View File

@@ -1,14 +1,3 @@
# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.recvfrom
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.sendto
subprocess.STARTUPINFO.copy
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========

View File

@@ -1,14 +1,3 @@
# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.recvfrom
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.sendto
subprocess.STARTUPINFO.copy
# pathlib methods that exist on Windows, but always raise NotImplementedError,
# so are omitted from the stub
pathlib.Path.is_mount

View File

@@ -14,10 +14,19 @@ winsound.SND_APPLICATION
# Exists at runtime, but missing from stubs
_msi.MSIError
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize
asyncio.IocpProactor.recvfrom
asyncio.IocpProactor.sendto
asyncio.windows_events.IocpProactor.recvfrom
asyncio.windows_events.IocpProactor.sendto
msvcrt.SetErrorMode
ssl.SSLSocket.recvmsg
ssl.SSLSocket.recvmsg_into
ssl.SSLSocket.sendmsg
subprocess.STARTUPINFO.copy
winreg.HKEYType.handle
_ctypes.FreeLibrary
_ctypes.LoadLibrary