_collections_abc.Callable
_collections_abc.Coroutine.cr_await
_collections_abc.Coroutine.cr_code
_collections_abc.Coroutine.cr_frame
_collections_abc.Coroutine.cr_running
_collections_abc.Generator.gi_code
_collections_abc.Generator.gi_frame
_collections_abc.Generator.gi_running
_collections_abc.Generator.gi_yieldfrom
_collections_abc.Mapping.get
_collections_abc.MutableMapping.pop
_collections_abc.MutableMapping.setdefault
_collections_abc.MutableSequence.append
_collections_abc.MutableSequence.extend
_collections_abc.MutableSequence.insert
_collections_abc.MutableSequence.remove
_collections_abc.MutableSet.add
_collections_abc.MutableSet.discard
_collections_abc.MutableSet.remove
_collections_abc.Sequence.count
_collections_abc.Sequence.index
_collections_abc.Set.isdisjoint
_csv.Dialect.__init__  # C __init__ signature is inaccurate
_dummy_threading
_importlib_modulespec
_threading_local.local.__new__
_typeshed.*  # Utility types for typeshed, doesn't exist at runtime
_weakref.CallableProxyType.__getattr__
_weakref.ProxyType.__getattr__
_weakref.ReferenceType.__call__
abc.ABCMeta.__new__
abc.abstractclassmethod
abc.abstractmethod
abc.abstractstaticmethod
argparse.Namespace.__getattr__  # The whole point of this class is its attributes are dynamic
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
asyncio.Condition.locked
asyncio.Condition.release
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
# Condition functions are exported in __init__
asyncio.locks.Condition.acquire
asyncio.locks.Condition.locked
asyncio.locks.Condition.release
asyncio.proactor_events.BaseProactorEventLoop.sock_recv # nbytes parameter has different name 'n' in implementation
asyncio.selector_events.BaseSelectorEventLoop.sock_recv # nbytes parameter has different name 'n' in implementation
builtins.bytearray.__float__
builtins.bytearray.__int__
builtins.bytearray.append
builtins.bytearray.extend
builtins.bytearray.maketrans
builtins.bytes.__float__
builtins.bytes.__int__
builtins.bytes.maketrans
builtins.classmethod.__get__
builtins.ellipsis
builtins.filter  # not a function at runtime
builtins.function
builtins.map  # not a function at runtime
builtins.memoryview.__contains__
builtins.memoryview.__iter__
builtins.memoryview.cast  # inspect.signature is incorrect about shape being kw-only
builtins.object.__init__
builtins.property.__get__
builtins.property.fdel
builtins.property.fget
builtins.property.fset
builtins.reversed  # not a function at runtime
builtins.staticmethod.__get__
builtins.zip  # not a function at runtime
bz2.BZ2Decompressor.__init__  # function does not accept parameters but C signature is set
# 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
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
# The following CodecInfo properties are added in __new__
codecs.CodecInfo.decode
codecs.CodecInfo.encode
codecs.CodecInfo.incrementaldecoder
codecs.CodecInfo.incrementalencoder
codecs.CodecInfo.streamreader
codecs.CodecInfo.streamwriter
collections.Callable
collections.ChainMap.get
collections.ChainMap.maps
collections.ChainMap.new_child
collections.Coroutine.cr_await
collections.Coroutine.cr_code
collections.Coroutine.cr_frame
collections.Coroutine.cr_running
collections.Counter.fromkeys
collections.Generator.gi_code
collections.Generator.gi_frame
collections.Generator.gi_running
collections.Generator.gi_yieldfrom
collections.Mapping.get
collections.Sequence.index
collections.Set.isdisjoint
collections.abc.Callable
collections.abc.Coroutine.cr_await
collections.abc.Coroutine.cr_code
collections.abc.Coroutine.cr_frame
collections.abc.Coroutine.cr_running
collections.abc.Generator.gi_code
collections.abc.Generator.gi_frame
collections.abc.Generator.gi_running
collections.abc.Generator.gi_yieldfrom
collections.abc.Mapping.get
collections.abc.Sequence.index
collections.deque.__hash__
configparser.SectionProxy.__getattr__  # SectionProxy can have arbitrary attributes when custom converters are used
# SectionProxy get functions are set in __init__
configparser.SectionProxy.getboolean
configparser.SectionProxy.getfloat
configparser.SectionProxy.getint
# The Dialect properties are initialized as None in Dialect but their values are enforced in _Dialect
csv.Dialect.delimiter
csv.Dialect.doublequote
csv.Dialect.lineterminator
csv.Dialect.quoting
csv.Dialect.skipinitialspace
ctypes.Array.__iter__  # mypy doesn't support using __getitem__ instead of __iter__ so this is here https://github.com/python/mypy/issues/2220
ctypes.CDLL._FuncPtr  # None at class level but initialized in __init__ to this value
ctypes.memmove  # CFunctionType
ctypes.memset  # CFunctionType
ctypes.pointer  # imported C function
ctypes.string_at  # docstring argument name is wrong
ctypes.wstring_at  # docstring argument name is wrong
difflib.SequenceMatcher.__init__  # mypy default value for generic parameter issues. See https://github.com/python/mypy/issues/3737
distutils.command.bdist_packager  # It exists in docs as package name but not in code except as a mention in a comment.
distutils.version.Version._cmp  # class should have declared this
distutils.version.Version.parse  # class should have declared this
email.headerregistry.BaseHeader.max_count  # docs say subclasses should have this property
enum.EnumMeta.__call__
enum.EnumMeta.__new__
http.HTTPStatus.description  # set in __new__
http.HTTPStatus.phrase  # set in __new__
imaplib.IMAP4_SSL.ssl  # Dependent on SSL existence
importlib.abc.FileLoader.get_filename  # Wrapped with _check_name decorator which changes runtime signature
importlib.abc.FileLoader.load_module  # Wrapped with _check_name decorator which changes runtime signature
importlib.abc.Loader.exec_module  # See Lib/importlib/_abc.py. Might be defined for backwards compatability
importlib.abc.MetaPathFinder.find_spec  # Not defined on the actual class, but expected to exist.
importlib.abc.PathEntryFinder.find_spec  # Not defined on the actual class, but expected to exist.
importlib.machinery.ExtensionFileLoader.get_filename  # Wrapped with _check_name decorator which changes runtime signature
inspect.Parameter.KEYWORD_ONLY
inspect.Parameter.POSITIONAL_ONLY
inspect.Parameter.POSITIONAL_OR_KEYWORD
inspect.Parameter.VAR_KEYWORD
inspect.Parameter.VAR_POSITIONAL
inspect.Parameter.replace
inspect.Signature.replace
io.BufferedRandom.truncate
io.BufferedReader.seek
io.BufferedReader.truncate
io.BufferedWriter.seek
io.BufferedWriter.truncate
io.BytesIO.readlines
io.BytesIO.seek  # Parameter name for a positional-only param differs from its name in the inherited method
io.FileIO.seek
io.StringIO.seek
io.StringIO.truncate
io.TextIOWrapper.truncate
ipaddress._BaseAddress.is_global
ipaddress._BaseAddress.is_link_local
ipaddress._BaseAddress.is_loopback
ipaddress._BaseAddress.is_multicast
ipaddress._BaseAddress.is_private
ipaddress._BaseAddress.is_reserved
ipaddress._BaseAddress.is_unspecified
ipaddress._BaseAddress.max_prefixlen
ipaddress._BaseAddress.packed
ipaddress._BaseNetwork.max_prefixlen
lib2to3.pygram.pattern_symbols
lib2to3.pygram.python_symbols
lib2to3.pytree.Base.__new__
lib2to3.pytree.Base.children
lib2to3.pytree.Base.type
lib2to3.pytree.BasePattern.__new__
lib2to3.pytree.BasePattern.type
lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
mailbox.Babyl.__init__
mailbox.MH.__init__
mailbox.MMDF.__init__
mailbox._mboxMMDF.get_bytes
mailbox._mboxMMDF.get_file
mailbox._mboxMMDF.get_string
mailbox.mbox.__init__
mimetypes.read_mime_types
mmap.mmap.__iter__
multiprocessing.JoinableQueue
multiprocessing.Queue
multiprocessing.SimpleQueue
multiprocessing.managers.BaseManager.shutdown
multiprocessing.managers.SyncManager.Event
multiprocessing.managers.SyncManager.Lock
multiprocessing.managers.SyncManager.Namespace
multiprocessing.managers.SyncManager.RLock
multiprocessing.pool.ApplyResult.__init__
multiprocessing.pool.IMapIterator.__init__
multiprocessing.pool.MapResult.__init__
multiprocessing.queues.JoinableQueue.__init__
multiprocessing.queues.Queue.__init__
multiprocessing.queues.Queue.put_nowait
multiprocessing.queues.SimpleQueue.__init__
multiprocessing.queues.SimpleQueue.put
multiprocessing.synchronize.Barrier.__init__
multiprocessing.synchronize.Condition.acquire
multiprocessing.synchronize.Condition.release
multiprocessing.synchronize.Event.__init__
multiprocessing.synchronize.SemLock.__init__
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.persistent_id  # C pickler persistent_id is an attribute
pickle.Unpickler.persistent_load  # C unpickler persistent_load is an attribute
poplib.POP3_SSL.stls  # bad declaration of inherited function. See poplib.pyi
pydoc.HTMLDoc.docdata
pydoc.HTMLDoc.docproperty
pydoc.HTMLDoc.docroutine
pydoc.TextDoc.docdata
pydoc.TextDoc.docmodule
pydoc.TextDoc.docother
pydoc.TextDoc.docproperty
pydoc.TextDoc.docroutine
random.SystemRandom.getstate
re.error.__init__
runpy.run_path
sched.Event.__doc__
select.poll
selectors.DevpollSelector
selectors.KqueueSelector
shutil.register_unpack_format
signal.SIGEMT
signal.SIGINFO
smtpd.MailmanProxy.process_message
smtpd.PureProxy.process_message
smtplib.SMTP.send_message
socketserver.BaseServer.fileno
socketserver.BaseServer.get_request
socketserver.BaseServer.server_bind
sqlite3.Row.__len__
sqlite3.dbapi2.Row.__len__
sqlite3.dbapi2.version_info
sqlite3.version_info
sre_constants.error.__init__
ssl.PROTOCOL_SSLv2  # Defined only if compiled with ssl v2
ssl.Purpose.__new__  # You cannot override __new__ in NamedTuple and runtime uses namedtuple.
ssl._ASN1Object.__new__  # You cannot override __new__ in NamedTuple and runtime uses namedtuple.
subprocess.Popen.__init__
sunau.Au_write.getmark
sunau.Au_write.getmarkers
sunau.Au_write.setcomptype
sunau.Au_write.setmark
sys.gettotalrefcount  # Available on python debug builds
sys.implementation  # Actually SimpleNamespace but then you wouldn't have convenient attributes
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
tempfile.SpooledTemporaryFile.__next__
tempfile.SpooledTemporaryFile.readable
tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable
threading.Condition.acquire
threading.Condition.release
threading.Lock
threading.Semaphore.__enter__
threading.Semaphore.acquire
threading.Thread.__init__
timeit.main
tkinter.Misc.grid_propagate
tkinter.Misc.pack_propagate
tkinter.Tk.eval  # from __getattr__
tkinter.Tk.report_callback_exception  # A bit of a lie, since it's actually a method, but typing it as an attribute allows it to be assigned to
tkinter.Wm.wm_iconphoto  # Default value of argument can't be used without runtime error
tkinter.font.Font.__getitem__  # Argument name differs (doesn't matter for __dunder__ methods)
trace.CoverageResults.__init__
traceback.FrameSummary.__init__
traceback.TracebackException.__init__
traceback.TracebackException.from_exception
types.GetSetDescriptorType.__get__
types.GetSetDescriptorType.__set__
types.MemberDescriptorType.__get__
types.MemberDescriptorType.__set__
types.SimpleNamespace.__init__
types.coroutine
types.new_class
types.prepare_class
typing.AwaitableGenerator
typing.IO.__iter__
typing.IO.__next__
typing.type_check_only
unittest.mock.patch  # It's a complicated overload and I haven't been able to figure out why stubtest doesn't like it
urllib.error.ContentTooShortError.__init__
urllib.error.URLError.__init__
urllib.parse._DefragResultBase.__new__
# 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
# separator argument).
urllib.parse.parse_qs
urllib.parse.parse_qsl
urllib.request.BaseHandler.http_error_nnn
urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
urllib.robotparser.RobotFileParser.can_fetch
warnings.catch_warnings.__init__
weakref.CallableProxyType.__getattr__
weakref.ProxyType.__getattr__
weakref.ReferenceType.__call__
weakref.WeakKeyDictionary.get
weakref.WeakKeyDictionary.update
weakref.WeakValueDictionary.get
webbrowser.Mozilla.raise_opts
webbrowser.UnixBrowser.raise_opts
webbrowser.UnixBrowser.remote_action
webbrowser.UnixBrowser.remote_action_newtab
webbrowser.UnixBrowser.remote_action_newwin
wsgiref.types  # Doesn't exist, see comments in file
zipfile.ZipExtFile.read
zipfile.ZipExtFile.readline
zlib.compressobj

# These enums derive from (int, IntEnum) or (str, Enum). Strangely,
# at runtime, they inherit Enum.__new__, not int.__new__ or
# str.__new__ as the mro would dictate, which is why stubtest balks.
enum.IntEnum.__new__
http.HTTPStatus.__new__
inspect._ParameterKind.__new__
signal.Handlers.__new__
signal.Sigmasks.__new__
signal.Signals.__new__
socket.AddressFamily.__new__
socket.SocketKind.__new__

# ==========
# Whitelist entries that cannot or should not be fixed
# ==========
_pydecimal.*  # See comments in file
ast.NodeVisitor.visit_\w+  # Methods are discovered dynamically, see #3796
# Weird special builtins that are typed as functions, but aren't functions
builtins.copyright
builtins.credits
builtins.exit
builtins.help
builtins.license
builtins.quit
# Builtins that mypy pretends exist
builtins.reveal_locals
builtins.reveal_type
collections.abc.*  # Types are re-exported from _collections_abc, so errors should be fixed there
# Dynamically specified by __getattr__, and thus don't exist on the class
tempfile._TemporaryFileWrapper.[\w_]+
# Various classes in typing aren't types at runtime. In addition, mypy thinks some special forms are tautologically defined.
typing.[A-Z]\w+
# We can't distinguish not having a default value from having a default value of inspect.Parameter.empty
inspect.Parameter.__init__
inspect.Signature.__init__
# Any field can be set on Namespace
multiprocessing.(dummy|managers).Namespace.__[gs]etattr__
os.[a-z]+_(param|result)._(asdict|make|replace)  # NamedTuple like, but not actually NamedTuples
# sys attributes that are not always defined
sys.last_traceback
sys.last_type
sys.last_value
sys.ps1
sys.ps2
sys.tracebacklimit
# See comments in file. List out methods that are delegated by __getattr__ at runtime.
# Used to make the relevant class satisfy BinaryIO interface.
codecs.StreamReaderWriter.\w+
codecs.StreamRecoder.\w+
urllib.response.addbase.\w+

# Platform differences that cannot be captured by the type system
errno.[A-Z0-9]+
os.O_[A-Z_]+
(posix.O_[A-Z_]+)?
(posix.ST_[A-Z]+)?
socket.AF_DECnet
socket.[A-Z0-9_]+
(termios.[A-Z0-9_]+)?
