# TODO: missing from stub
gevent.os.__all__
gevent.socket.__all__
gevent.ssl.__all__
gevent.subprocess.__all__

# Error: failed to find stubs
# =============================
# testing modules are not included in type stubs
gevent.testing
gevent.testing.*
gevent.tests
gevent.tests.*

# these are only present for monkey patching and should not be used directly
gevent.thread
gevent.threading

# deprecated module which should not be used anymore
gevent.builtins
gevent.contextvars
gevent.core

# part of internal API which is not needed for public type stubs
gevent._ffi.callback

# Error: is not present in stub
# =============================
# internal API stuff we dropped because it wasn't necessary
gevent._config.Config.subclass
gevent._ffi.CRITICAL
gevent._ffi.DEBUG
gevent._ffi.ERROR
gevent._ffi.GEVENT_DEBUG_LEVEL
gevent._ffi.TRACE
gevent._ffi.loop.AbstractLoop.async
gevent._fileobjectcommon.UniversalNewlineBytesWrapper
gevent._waiter.Waiter.switch_args

# loop local that wasn't deleted
gevent.resolver.blocking.Resolver.method

# isn't actually implemented for libuv, it just raises an exception
gevent.libuv.watcher.watcher.feed

# unnecessary python 2 compatibility stuff
gevent._config.Config.trace_malloc
gevent._imap.IMapUnordered.next
gevent.pywsgi.Environ.iteritems

# weird method that doesn't work with this being generic, so we removed it
# it's not necessary for public API
gevent.hub.Waiter.switch_args

# zope.interface related attributes we can ignore
gevent.[\w\.]+\.__implemented__
gevent.[\w\.]+\.__providedBy__
gevent.[\w\.]+\.__provides__

# these shouldn't be in __all__ they end up there, due to how gevent imports
# the globals from the stdlib ssl module, For ssl/subprocess we ignore all symbols
# that start with an underscore (i.e. internal symbols)
gevent\.ssl\._[A-Za-z0-9]\w*
gevent.ssl.base64
gevent.ssl.create_connection
gevent.ssl.errno
gevent.ssl.os
gevent.ssl.warnings
gevent\.subprocess\._[A-Za-z0-9]\w*

# Error: differs from runtime type
# ======================
# these are None in the base class, but all settings are a subclass
# so it makes sense to annotate this as not None
gevent._config.Setting.default
gevent._config.Setting.environment_key
gevent._config.Setting.name
gevent._config.Setting.value

# it is set to None on the class but always initialized in __init__
gevent.hub.Hub.thread_ident
gevent.pywsgi.WSGIServer.error_log
gevent.pywsgi.WSGIServer.log

# Error: is inconsistent
# ======================
# minor config validation implementation difference that don't matter for
# the actual subclasses, which are proper settings.
gevent._config.SettingType.__new__
gevent._config._PositiveValueMixin.validate

# internal API implementation detail we don't care about
gevent._ffi.watcher.AbstractWatcherType.__new__

# we don't care about write/writeall allowing a named parameter
gevent._fileobjectcommon.FlushingBufferedWriter.write
gevent._fileobjectcommon.WriteIsWriteallMixin.write
gevent._fileobjectcommon.WriteallMixin.writeall

# these are different because of Cython, without Cython these don't have
# any arguments, so it should be annotated that way
gevent._ident.IdentRegistry.__init__
gevent.event.AsyncResult.__init__
gevent.event.Event.__init__

# positional only arguments due to Cython?
gevent._abstract_linkable.AbstractLinkable.rawlink
gevent._abstract_linkable.AbstractLinkable.unlink

# removed undocumented arguments for internal use
gevent.greenlet.Greenlet.link
gevent.greenlet.Greenlet.link_exception
gevent.greenlet.Greenlet.link_value
gevent._threading.Queue.qsize

# removed deprecated argument
gevent._hub_primitives.wait_readwrite
gevent._hub_primitives.wait_write
gevent.pywsgi.WSGIHandler.__init__

# we have punted on socket, the gevent version of these functions sometimes use
# named parameters, while the base implementation only allows positional arguments
# we're fine with holding the geven implemenation to the same restrictions
# additionally there's some functions with additional optional arguments, that
# we are fine with ignoring for now as well
gevent.socket.cancel_wait

# gevent overwrites with a named parameter for fd, but we're fine with only
# supporting the API of the superclass
gevent.threadpool.ThreadPoolExecutor.submit

# Error: is not a type/function
# =====================
# zope.interface related errors, these shouldn't matter
gevent._monitor.implementer
gevent.events.implementer
gevent.events.IEventLoopBlocked
gevent.events.IGeventDidPatchAllEvent
gevent.events.IGeventDidPatchBuiltinModulesEvent
gevent.events.IGeventDidPatchEvent
gevent.events.IGeventDidPatchModuleEvent
gevent.events.IGeventPatchEvent
gevent.events.IGeventWillPatchAllEvent
gevent.events.IGeventWillPatchEvent
gevent.events.IGeventWillPatchModuleEvent
gevent.events.IMemoryUsageThresholdExceeded
gevent.events.IMemoryUsageUnderThreshold
gevent.events.IPeriodicMonitorThread
gevent.events.IPeriodicMonitorThreadStartedEvent

# Error: failed to import
# ======================
# internal use module for some complex protocols used across different modules
# so there wasn't really a great place for them
gevent._types

# The first parameter is technically positional-or-keyword but there's no
# useful way to use it as a keyword argument; we mark it positional-only.
gevent.pool.GroupMappingMixin.imap
gevent.pool.GroupMappingMixin.imap_unordered

# Importing gevent.monkey.__main__ leads to issues in stubtest, since gevent will
# try to monkeypatch stubtest
gevent.monkey.__main__
