mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 01:17:39 +08:00
Overhaul socket stubs on Windows and MacOS (#8106)
Reduce the `socket` allowlists for these platforms to a handful of missing constants
This commit is contained in:
@@ -2,3 +2,6 @@ _?curses.A_ITALIC
|
||||
_?curses.color_pair
|
||||
xxlimited.Xxo.x_exports
|
||||
distutils.util.__warningregistry__
|
||||
|
||||
# Exists at runtime, missing from stub
|
||||
socket.TCP_CONNECTION_INFO
|
||||
|
||||
@@ -10,12 +10,19 @@ select.KQ_FILTER_NETDEV # system dependent
|
||||
select.kqueue.__init__ # default C signature is wrong
|
||||
select.POLLMSG # system dependent
|
||||
|
||||
# Sometimes this exists on darwin, sometimes not
|
||||
(_socket.MSG_NOSIGNAL)?
|
||||
(socket.MsgFlag.MSG_NOSIGNAL)?
|
||||
(socket.MSG_NOSIGNAL)?
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
distutils.msvccompiler.MSVCCompiler.get_msvc_paths
|
||||
distutils.msvccompiler.MSVCCompiler.set_path_env_var
|
||||
distutils.msvccompiler.MacroExpander
|
||||
mimetypes.MimeTypes.read_windows_registry
|
||||
selectors.DefaultSelector.fileno
|
||||
socket.PF_SYSTEM
|
||||
socket.SYSPROTO_CONTROL
|
||||
|
||||
posix.NGROUPS_MAX
|
||||
posix.error.characters_written
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
_socket.*
|
||||
_posixsubprocess.cloexec_pipe
|
||||
os.EX_NOTFOUND
|
||||
os.SF_MNOWAIT
|
||||
@@ -10,6 +11,7 @@ select.EPOLL_RDHUP
|
||||
selectors.KqueueSelector
|
||||
signal.SIGEMT
|
||||
signal.SIGINFO
|
||||
socket.[A-Z0-9_]+
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
distutils.msvccompiler.MSVCCompiler.get_msvc_paths
|
||||
|
||||
@@ -24,7 +24,6 @@ _collections_abc.Set.__rsub__
|
||||
_collections_abc.Set.__rxor__
|
||||
|
||||
_csv.Dialect.__init__ # C __init__ signature is inaccurate
|
||||
_socket.*
|
||||
_threading_local.local.__new__
|
||||
_weakref.ref.* # Alias for _weakref.ReferenceType, problems should be fixed there
|
||||
_weakref.CallableProxyType.__getattr__ # Should have all attributes of proxy
|
||||
@@ -237,6 +236,7 @@ xml.etree.cElementTree.Element.__iter__ # Doesn't exist at runtime, but instanc
|
||||
# Exists at runtime, but missing from stubs
|
||||
# ==========
|
||||
_json.encode_basestring
|
||||
_socket.CAPI
|
||||
_thread.LockType.acquire_lock
|
||||
_thread.LockType.locked_lock
|
||||
_thread.LockType.release_lock
|
||||
@@ -290,6 +290,7 @@ multiprocessing.managers.SyncManager.Pool
|
||||
multiprocessing.pool.Pool.Process
|
||||
multiprocessing.pool.ThreadPool.Process
|
||||
multiprocessing.synchronize.Semaphore.get_value
|
||||
socket.CAPI
|
||||
tkinter.Misc.config
|
||||
tkinter.font.Font.counter
|
||||
tkinter.simpledialog.Dialog.apply
|
||||
@@ -404,6 +405,7 @@ multiprocessing.managers.DictProxy.values
|
||||
# GetSetDescriptor that always raises AttributeError
|
||||
builtins.OSError.characters_written
|
||||
# Aliases for OSError
|
||||
_socket.error.characters_written
|
||||
builtins.EnvironmentError.characters_written
|
||||
builtins.IOError.characters_written
|
||||
dbm.dumb.error.characters_written
|
||||
@@ -522,7 +524,6 @@ os.O_[A-Z_]+
|
||||
(posix.O_[A-Z_]+)?
|
||||
(posix.ST_[A-Z]+)?
|
||||
socket.AF_DECnet
|
||||
socket.[A-Z0-9_]+
|
||||
(termios.[A-Z0-9_]+)?
|
||||
|
||||
# Loadable SQLite extensions are disabled on GitHub runners
|
||||
|
||||
Reference in New Issue
Block a user