_weakref.ProxyType.__reversed__  # Doesn't really exist
ast.ExtSlice.__new__
ast.Index.__new__
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
collections.AsyncGenerator.asend  # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
collections.AsyncGenerator.__anext__  # async at runtime, deliberately not in the stub, see #7491
collections.AsyncGenerator.aclose  # async at runtime, deliberately not in the stub, see #7491
collections.AsyncIterator.__anext__  # async at runtime, deliberately not in the stub, see #7491
collections.AsyncGenerator.ag_await
collections.AsyncGenerator.ag_code
collections.AsyncGenerator.ag_frame
collections.AsyncGenerator.ag_running
collections.ByteString  # see comments in py3_common.txt
collections.Callable
collections.Mapping.__reversed__  # Set to None at runtime for a better error message
collections.ItemsView.__reversed__
collections.KeysView.__reversed__
collections.ValuesView.__reversed__
configparser.ParsingError.filename
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__
email.contentmanager.typ
enum.Enum._generate_next_value_
functools._lru_cache_wrapper.cache_parameters  # Cannot be detected statically
gettext.install
gettext.translation
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
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
lib2to3.pgen2.grammar.Grammar.loads
# 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
tkinter.Tk.split
tkinter.tix.[A-Z_]+
tkinter.tix.TclVersion
tkinter.tix.TkVersion
tkinter.tix.CObjView
tkinter.tix.DialogShell
tkinter.tix.ExFileSelectDialog
tkinter.tix.FileSelectDialog
tkinter.tix.FileTypeList
tkinter.tix.Grid
tkinter.tix.NoteBookFrame
tkinter.tix.OptionName
tkinter.tix.ResizeHandle
tkinter.tix.ScrolledGrid
tkinter.tix.ScrolledHList
tkinter.tix.ScrolledListBox
tkinter.tix.ScrolledTList
tkinter.tix.ScrolledText
tkinter.tix.ScrolledWindow
tkinter.tix.Shell
types.GenericAlias.__getattr__
types.GenericAlias.__call__  # Would be complicated to fix properly, Any could silence problems. #6392
weakref.ProxyType.__reversed__  # Doesn't really exist
xxsubtype  # module missing from the stubs

xml.etree.ElementTree.Element.__bool__  # Doesn't really exist; see comments in stub
xml.etree.cElementTree.Element.__bool__  # Doesn't really exist; see comments in stub

# Exist at runtime for internal reasons, no need to put them in the stub
typing_extensions\.TypeAliasType\.__call__
typing_extensions\.TypeAliasType\.__init_subclass__
# We call them read-only properties, runtime implementation is slightly different
typing_extensions\.TypeAliasType\.__(parameters|type_params|name|module|value)__

collections.Coroutine.cr_await
collections.Coroutine.cr_code
collections.Coroutine.cr_frame
collections.Coroutine.cr_running
collections.Generator.gi_code
collections.Generator.gi_frame
collections.Generator.gi_running
collections.Generator.gi_yieldfrom
collections.Mapping.get  # Adding None to the Union messed up mypy
collections.Sequence.index  # Supporting None in end is not mandatory

# Modules that exist at runtime, but shouldn't be added to typeshed
ctypes.test
ctypes\.test\..+
lib2to3.tests
lib2to3\.tests\..+
sqlite3.test
sqlite3\.test\..+
test
tkinter.test
tkinter\.test\..+
unittest.test
unittest\.test\..+

# Exists at runtime, but missing from stubs
_collections_abc.AsyncIterable.__class_getitem__
_collections_abc.Awaitable.__class_getitem__
_collections_abc.Container.__class_getitem__
_collections_abc.Iterable.__class_getitem__
_collections_abc.MappingView.__class_getitem__
collections.AsyncIterable.__class_getitem__
collections.Awaitable.__class_getitem__
collections.Container.__class_getitem__
collections.Iterable.__class_getitem__
collections.MappingView.__class_getitem__
hmac.HMAC.digest_cons
hmac.HMAC.inner
hmac.HMAC.outer
types.GenericAlias.__mro_entries__
typing._SpecialForm.__mro_entries__
lib2to3.btm_utils
lib2to3.fixer_util
lib2to3.patcomp

# SpooledTemporaryFile implements IO except these methods before Python 3.11
# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918
tempfile.SpooledTemporaryFile.__next__
tempfile.SpooledTemporaryFile.readable
tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable

# ==========
# Allowlist entries that cannot or should not be fixed
# ==========

# Factory function at runtime
# but that wouldn't let us use it in type hints
threading.Lock
multiprocessing.dummy.Lock

# 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
poplib.POP3_SSL.stls  # bad declaration of inherited function. See poplib.pyi
pydoc.Helper.symbol  # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
pydoc.Helper.symbols_  # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
pydoc.Helper.topic  # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522

# Undocumented implementation details
cgi.FieldStorage.bufsize
cgi.FieldStorage.read_binary
cgi.FieldStorage.read_lines
cgi.FieldStorage.read_lines_to_eof
cgi.FieldStorage.read_lines_to_outerboundary
cgi.FieldStorage.read_multi
cgi.FieldStorage.read_single
cgi.FieldStorage.read_urlencoded
cgi.FieldStorage.skip_lines
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w
sunau.Au_read.initfp
sunau.Au_write.initfp
typing_extensions\.Annotated

# Adding these reflected dunders to `typing.AbstractSet` causes a large number of false-positives. See #7414.
collections.Set.__rand__
collections.Set.__ror__
collections.Set.__rsub__
collections.Set.__rxor__

builtins.memoryview.__iter__  # C type that implements __getitem__
builtins.memoryview.cast  # inspect.signature is incorrect about shape being kw-only

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

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)
builtins.classmethod.__get__
builtins.property.__get__
builtins.staticmethod.__get__
types.FunctionType.__get__
types.LambdaType.__get__
types.ClassMethodDescriptorType.__get__
types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
multiprocessing.managers.DictProxy.clear
multiprocessing.managers.DictProxy.popitem

# Problematic protocol signature at runtime, see source code comments.
importlib.abc.Traversable.open

# Super-special typing primitives
typing\.NamedTuple
typing\.Annotated

# We lie about the existence of these methods
.*.__buffer__
.*.__release_buffer__

# Removed in 3.12
distutils\..*
asyncore.dispatcher.addr
asyncore.dispatcher.handle_accepted
asynchat.async_chat.encoding
asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*

types.CodeType.replace  # stubtest thinks default values are None but None doesn't work at runtime
types.SimpleNamespace.__init__  # class doesn't accept positional arguments but has default C signature

# These enums derive from (str, Enum)
pstats.SortKey.__new__
tkinter.EventType.__new__
