_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
_operator.attrgetter.__vectorcalloffset__
_operator.itemgetter.__vectorcalloffset__
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group
asynchat.__warningregistry__  # Removal planned for 3.12, can add if someone needs this
configparser.LegacyInterpolation.__init__
enum.Enum.__init__
fractions.Fraction.__new__  # overload is too complicated for stubtest to resolve
ftplib.FTP.trust_server_pasv_ipv4_address
functools.partial.__vectorcalloffset__
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.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
operator.attrgetter.__vectorcalloffset__
operator.itemgetter.__vectorcalloffset__
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__match_args__
platform.uname_result.__new__
platform.uname_result._fields
platform.uname_result.processor
queue.SimpleQueue.__init__
sys.UnraisableHookArgs  # Not exported from sys
tkinter._VersionInfoType.__doc__
typing.NewType.__call__
typing.NewType.__mro_entries__
weakref.WeakValueDictionary.update

# stubtest complains that in 3.10 the default argument is inconsistent with the annotation,
# but in 3.10+ calling the function without the default argument is in fact deprecated,
# so it's better to ignore stubtest
ssl.SSLContext.__new__
ssl._create_unverified_context

# ==========
# Related to positional-only arguments
# ==========

# These are not positional-only at runtime, but we treat them
# as positional-only to match dict.
_collections_abc.MutableMapping.pop
_collections_abc.MutableMapping.setdefault

# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
# to mark these as positional-only for compatibility with existing sub-classes.
typing.BinaryIO.write
typing.IO.read
typing.IO.readline
typing.IO.readlines
typing.IO.seek
typing.IO.truncate
typing.IO.write
typing.IO.writelines

# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
_collections_abc.Coroutine.send
_collections_abc.Coroutine.throw
_collections_abc.Generator.send
_collections_abc.Generator.throw

# typing.SupportsRound.__round__  # pos-or-kw at runtime, but we pretend it's pos-only in the stub so that e.g. float.__round__ satisfies the interface
types.DynamicClassAttribute..*  # In the stub we pretend it's an alias for property, but it has positional-only differences

# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
posixpath.join
ntpath.join
os.path.join

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

_collections_abc.AsyncGenerator.athrow  # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
_weakref.ProxyType.__reversed__  # Doesn't really exist
builtins.property.__set_name__  # Doesn't actually exist
enum.StrEnum.value  # read-only property at runtime but too magical for stubtest
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
pickle.Pickler.reducer_override  # implemented in C pickler
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
inspect._ParameterKind.description  # Still exists, but stubtest can't see it

# Inherits __init__ from typing.Protocol (https://github.com/python/mypy/issues/12820)
importlib.abc.Traversable.__init__
importlib.metadata.EntryPoint.__init__
importlib.metadata.PackageMetadata.__init__
importlib.metadata._meta.PackageMetadata.__init__
importlib.metadata._meta.SimplePath.__init__
typing.SupportsAbs.__init__
typing.SupportsBytes.__init__
typing.SupportsComplex.__init__
typing.SupportsFloat.__init__
typing.SupportsIndex.__init__
typing.SupportsInt.__init__
typing.SupportsRound.__init__
wsgiref.types.ErrorStream.__init__
wsgiref.types.FileWrapper.__init__
wsgiref.types.InputStream.__init__
wsgiref.types.StartResponse.__init__
wsgiref.types._Readable.__init__

# 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__

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

# Treated an alias of a typing class in the stubs,
# they are generic to type checkers anyway.
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__

# The argument to is_python_build() is deprecated since Python 3.11 and
# has a default value of None to check for its existence and warn if it's
# supplied. None is not supposed to be passed by user code and therefore
# not included in the stubs.
sysconfig.is_python_build

# Super-special typing primitives
typing._SpecialForm.__mro_entries__
typing._TypedDict.__delitem__
typing._TypedDict.__ior__
typing._TypedDict.__or__
typing._TypedDict.copy
typing._TypedDict.items
typing._TypedDict.keys
typing._TypedDict.pop
typing._TypedDict.setdefault
typing._TypedDict.update
typing._TypedDict.values

# White lies around defaults
dataclasses.KW_ONLY

# https://github.com/python/mypy/issues/13114
wsgiref.types.WSGIEnvironment

# https://github.com/python/mypy/issues/12821 (stubtest bug with Callable type alias)
wsgiref.types.WSGIApplication

# stubtest confuses stdlib distutils with setuptools-bundled distutils (#8410),
# and the whole directory is going to be removed in 3.12 anyway
distutils\..*
