basedpyright 1.1.389 → 1.1.392
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.LICENSE.txt +42 -0
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +9 -0
- package/dist/typeshed-fallback/stdlib/__future__.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/__main__.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/_ast.pyi +149 -149
- package/dist/typeshed-fallback/stdlib/_asyncio.pyi +320 -342
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +189 -229
- package/dist/typeshed-fallback/stdlib/_blake2.pyi +137 -137
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_bz2.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/_codecs.pyi +247 -244
- package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +124 -115
- package/dist/typeshed-fallback/stdlib/_compat_pickle.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/_compression.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/_contextvars.pyi +146 -146
- package/dist/typeshed-fallback/stdlib/_csv.pyi +232 -172
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +435 -304
- package/dist/typeshed-fallback/stdlib/_curses.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +67 -0
- package/dist/typeshed-fallback/stdlib/_dbm.pyi +8 -19
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +80 -94
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +178 -178
- package/dist/typeshed-fallback/stdlib/_gdbm.pyi +2 -65
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +232 -0
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_imp.pyi +81 -83
- package/dist/typeshed-fallback/stdlib/_io.pyi +719 -719
- package/dist/typeshed-fallback/stdlib/_json.pyi +99 -92
- package/dist/typeshed-fallback/stdlib/_locale.pyi +155 -155
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/_lzma.pyi +158 -158
- package/dist/typeshed-fallback/stdlib/_markupbase.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
- package/dist/typeshed-fallback/stdlib/_multibytecodec.pyi +44 -0
- package/dist/typeshed-fallback/stdlib/_operator.pyi +261 -261
- package/dist/typeshed-fallback/stdlib/_osx_support.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +0 -1
- package/dist/typeshed-fallback/stdlib/_py_abc.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/_pydecimal.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/_queue.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_sitebuiltins.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/_socket.pyi +1367 -1317
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +360 -402
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +399 -406
- package/dist/typeshed-fallback/stdlib/_stat.pyi +257 -257
- package/dist/typeshed-fallback/stdlib/_struct.pyi +147 -147
- package/dist/typeshed-fallback/stdlib/_thread.pyi +266 -257
- package/dist/typeshed-fallback/stdlib/_threading_local.pyi +22 -18
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +165 -165
- package/dist/typeshed-fallback/stdlib/_tracemalloc.pyi +78 -78
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +98 -102
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/abc.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/argparse.pyi +769 -769
- package/dist/typeshed-fallback/stdlib/array.pyi +267 -281
- package/dist/typeshed-fallback/stdlib/ast.pyi +2049 -2049
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +41 -41
- package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +488 -488
- package/dist/typeshed-fallback/stdlib/asyncio/base_futures.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/asyncio/base_subprocess.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/asyncio/base_tasks.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/constants.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/asyncio/coroutines.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +653 -653
- package/dist/typeshed-fallback/stdlib/asyncio/exceptions.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/asyncio/format_helpers.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +127 -127
- package/dist/typeshed-fallback/stdlib/asyncio/log.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/asyncio/mixins.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/proactor_events.pyi +64 -64
- package/dist/typeshed-fallback/stdlib/asyncio/protocols.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +64 -64
- package/dist/typeshed-fallback/stdlib/asyncio/runners.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/asyncio/selector_events.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +165 -184
- package/dist/typeshed-fallback/stdlib/asyncio/staggered.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/asyncio/streams.pyi +157 -157
- package/dist/typeshed-fallback/stdlib/asyncio/subprocess.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/asyncio/taskgroups.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +459 -459
- package/dist/typeshed-fallback/stdlib/asyncio/threads.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/timeouts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/asyncio/transports.pyi +47 -47
- package/dist/typeshed-fallback/stdlib/asyncio/trsock.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/atexit.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/audioop.pyi +26 -78
- package/dist/typeshed-fallback/stdlib/base64.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/bdb.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -123
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/bisect.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/builtins.pyi +6481 -6560
- package/dist/typeshed-fallback/stdlib/bz2.pyi +132 -131
- package/dist/typeshed-fallback/stdlib/cProfile.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/calendar.pyi +208 -208
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/cmd.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/code.pyi +56 -56
- package/dist/typeshed-fallback/stdlib/codecs.pyi +301 -297
- package/dist/typeshed-fallback/stdlib/codeop.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +650 -650
- package/dist/typeshed-fallback/stdlib/collections/abc.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/colorsys.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/compileall.pyi +111 -111
- package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +51 -51
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +132 -132
- package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +234 -234
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/configparser.pyi +412 -404
- package/dist/typeshed-fallback/stdlib/contextlib.pyi +219 -213
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/copy.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/copyreg.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/crypt.pyi +9 -2
- package/dist/typeshed-fallback/stdlib/csv.pyi +169 -167
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +218 -198
- package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/dyld.pyi +8 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/dylib.pyi +14 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/framework.pyi +14 -0
- package/dist/typeshed-fallback/stdlib/ctypes/util.pyi +8 -6
- package/dist/typeshed-fallback/stdlib/ctypes/wintypes.pyi +304 -298
- package/dist/typeshed-fallback/stdlib/curses/__init__.pyi +19 -1
- package/dist/typeshed-fallback/stdlib/curses/panel.pyi +1 -34
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +322 -322
- package/dist/typeshed-fallback/stdlib/datetime.pyi +576 -575
- package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +104 -102
- package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +37 -37
- package/dist/typeshed-fallback/stdlib/decimal.pyi +849 -840
- package/dist/typeshed-fallback/stdlib/difflib.pyi +146 -146
- package/dist/typeshed-fallback/stdlib/dis.pyi +248 -248
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +176 -176
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +317 -317
- package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/log.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -6
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
- package/dist/typeshed-fallback/stdlib/doctest.pyi +262 -264
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/__init__.pyi +37 -29
- package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +398 -398
- package/dist/typeshed-fallback/stdlib/email/_policybase.pyi +77 -75
- package/dist/typeshed-fallback/stdlib/email/base64mime.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/email/charset.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/email/contentmanager.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/email/encoders.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/errors.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/email/feedparser.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/email/generator.pyi +77 -77
- package/dist/typeshed-fallback/stdlib/email/header.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +183 -183
- package/dist/typeshed-fallback/stdlib/email/iterators.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/email/message.pyi +172 -172
- package/dist/typeshed-fallback/stdlib/email/mime/application.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/audio.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/base.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/mime/image.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/message.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/mime/multipart.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/email/mime/nonmultipart.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/email/mime/text.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/email/parser.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/email/policy.pyi +77 -77
- package/dist/typeshed-fallback/stdlib/email/quoprimime.pyi +28 -28
- package/dist/typeshed-fallback/stdlib/email/utils.pyi +78 -78
- package/dist/typeshed-fallback/stdlib/encodings/__init__.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/encodings/aliases.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/encodings/ascii.pyi +30 -0
- package/dist/typeshed-fallback/stdlib/encodings/base64_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/big5.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/big5hkscs.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/bz2_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/charmap.pyi +33 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp037.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1006.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1026.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1125.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1140.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1250.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1251.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1252.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1253.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1254.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1255.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1256.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1257.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1258.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp273.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp424.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp437.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp500.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp720.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp737.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp775.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp850.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp852.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp855.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp856.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp857.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp858.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp860.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp861.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp862.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp863.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp864.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp865.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp866.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp869.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp874.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp875.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp932.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp949.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp950.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jis_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jisx0213.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jp.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_kr.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gb18030.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gb2312.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gbk.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/hex_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/hp_roman8.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/hz.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/idna.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_1.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_3.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_kr.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_1.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_10.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_11.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_13.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_14.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_15.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_16.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_2.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_3.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_4.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_5.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_6.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_7.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_8.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_9.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/johab.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_r.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_t.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_u.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/kz1048.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/latin_1.pyi +30 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_arabic.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_croatian.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_cyrillic.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_farsi.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_greek.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_iceland.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_latin2.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_roman.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_romanian.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_turkish.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mbcs.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/oem.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/palmos.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/ptcp154.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/punycode.pyi +33 -0
- package/dist/typeshed-fallback/stdlib/encodings/quopri_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/raw_unicode_escape.pyi +34 -0
- package/dist/typeshed-fallback/stdlib/encodings/rot_13.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jis.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jis_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jisx0213.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/tis_620.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/undefined.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/unicode_escape.pyi +34 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16_be.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16_le.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32_be.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32_le.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_7.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_8.pyi +26 -21
- package/dist/typeshed-fallback/stdlib/encodings/utf_8_sig.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/encodings/uu_codec.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/zlib_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/ensurepip/__init__.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/enum.pyi +348 -348
- package/dist/typeshed-fallback/stdlib/errno.pyi +237 -237
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/fcntl.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +74 -74
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +219 -219
- package/dist/typeshed-fallback/stdlib/fnmatch.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/fractions.pyi +162 -162
- package/dist/typeshed-fallback/stdlib/ftplib.pyi +178 -178
- package/dist/typeshed-fallback/stdlib/functools.pyi +270 -270
- package/dist/typeshed-fallback/stdlib/gc.pyi +144 -144
- package/dist/typeshed-fallback/stdlib/genericpath.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/getopt.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/getpass.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/gettext.pyi +171 -169
- package/dist/typeshed-fallback/stdlib/glob.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/gzip.pyi +162 -162
- package/dist/typeshed-fallback/stdlib/hashlib.pyi +104 -163
- package/dist/typeshed-fallback/stdlib/heapq.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/hmac.pyi +42 -65
- package/dist/typeshed-fallback/stdlib/html/__init__.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/html/entities.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/http/__init__.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/http/client.pyi +246 -246
- package/dist/typeshed-fallback/stdlib/http/cookiejar.pyi +159 -159
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +66 -66
- package/dist/typeshed-fallback/stdlib/http/server.pyi +83 -83
- package/dist/typeshed-fallback/stdlib/imaplib.pyi +168 -168
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/__init__.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/importlib/_abc.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/importlib/_bootstrap.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/_bootstrap_external.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +175 -175
- package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +342 -371
- package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/importlib/readers.pyi +68 -68
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +70 -70
- package/dist/typeshed-fallback/stdlib/importlib/resources/_common.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/importlib/resources/abc.pyi +14 -12
- package/dist/typeshed-fallback/stdlib/importlib/resources/readers.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/importlib/simple.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/importlib/util.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/inspect.pyi +642 -642
- package/dist/typeshed-fallback/stdlib/io.pyi +60 -60
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +509 -355
- package/dist/typeshed-fallback/stdlib/itertools.pyi +574 -574
- package/dist/typeshed-fallback/stdlib/json/__init__.pyi +61 -61
- package/dist/typeshed-fallback/stdlib/json/decoder.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/json/scanner.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/json/tool.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/keyword.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +2 -12
- package/dist/typeshed-fallback/stdlib/linecache.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/locale.pyi +156 -156
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +698 -698
- package/dist/typeshed-fallback/stdlib/logging/config.pyi +134 -134
- package/dist/typeshed-fallback/stdlib/logging/handlers.pyi +277 -277
- package/dist/typeshed-fallback/stdlib/lzma.pyi +174 -174
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +276 -276
- package/dist/typeshed-fallback/stdlib/marshal.pyi +128 -176
- package/dist/typeshed-fallback/stdlib/math.pyi +438 -442
- package/dist/typeshed-fallback/stdlib/mimetypes.pyi +56 -56
- package/dist/typeshed-fallback/stdlib/mmap.pyi +185 -185
- package/dist/typeshed-fallback/stdlib/modulefinder.pyi +68 -66
- package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
- package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/multiprocessing/__init__.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +89 -89
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +216 -215
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +79 -79
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/connection.pyi +39 -39
- package/dist/typeshed-fallback/stdlib/multiprocessing/forkserver.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/multiprocessing/heap.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +266 -266
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +109 -109
- package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +87 -87
- package/dist/typeshed-fallback/stdlib/multiprocessing/resource_sharer.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/multiprocessing/resource_tracker.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +129 -128
- package/dist/typeshed-fallback/stdlib/multiprocessing/spawn.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +59 -55
- package/dist/typeshed-fallback/stdlib/multiprocessing/util.pyi +98 -98
- package/dist/typeshed-fallback/stdlib/netrc.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
- package/dist/typeshed-fallback/stdlib/ntpath.pyi +126 -126
- package/dist/typeshed-fallback/stdlib/nturl2path.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/numbers.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/opcode.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/operator.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/optparse.pyi +257 -257
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +2946 -2491
- package/dist/typeshed-fallback/stdlib/os/path.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +329 -329
- package/dist/typeshed-fallback/stdlib/pdb.pyi +206 -206
- package/dist/typeshed-fallback/stdlib/pickle.pyi +459 -459
- package/dist/typeshed-fallback/stdlib/pickletools.pyi +167 -167
- package/dist/typeshed-fallback/stdlib/pkgutil.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/platform.pyi +97 -67
- package/dist/typeshed-fallback/stdlib/plistlib.pyi +113 -113
- package/dist/typeshed-fallback/stdlib/poplib.pyi +72 -72
- package/dist/typeshed-fallback/stdlib/posix.pyi +30 -10
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +182 -182
- package/dist/typeshed-fallback/stdlib/pprint.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/profile.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/pstats.pyi +98 -80
- package/dist/typeshed-fallback/stdlib/py_compile.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/pyclbr.pyi +74 -74
- package/dist/typeshed-fallback/stdlib/pydoc.pyi +333 -333
- package/dist/typeshed-fallback/stdlib/pydoc_data/topics.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +131 -129
- package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/queue.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/quopri.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/random.pyi +141 -141
- package/dist/typeshed-fallback/stdlib/re.pyi +476 -476
- package/dist/typeshed-fallback/stdlib/readline.pyi +1 -7
- package/dist/typeshed-fallback/stdlib/reprlib.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/rlcompleter.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/runpy.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/sched.pyi +52 -49
- package/dist/typeshed-fallback/stdlib/secrets.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/select.pyi +247 -247
- package/dist/typeshed-fallback/stdlib/selectors.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/shelve.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/shlex.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/shutil.pyi +230 -230
- package/dist/typeshed-fallback/stdlib/signal.pyi +263 -263
- package/dist/typeshed-fallback/stdlib/site.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/smtplib.pyi +204 -204
- package/dist/typeshed-fallback/stdlib/socket.pyi +1413 -856
- package/dist/typeshed-fallback/stdlib/socketserver.pyi +169 -169
- package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +785 -787
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +241 -241
- package/dist/typeshed-fallback/stdlib/sqlite3/dump.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/sre_compile.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/sre_constants.pyi +124 -124
- package/dist/typeshed-fallback/stdlib/sre_parse.pyi +104 -104
- package/dist/typeshed-fallback/stdlib/ssl.pyi +558 -560
- package/dist/typeshed-fallback/stdlib/stat.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/statistics.pyi +176 -176
- package/dist/typeshed-fallback/stdlib/string.pyi +83 -83
- package/dist/typeshed-fallback/stdlib/stringprep.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/struct.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +2640 -2640
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/symtable.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +773 -707
- package/dist/typeshed-fallback/stdlib/sysconfig.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/tabnanny.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +593 -593
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +497 -497
- package/dist/typeshed-fallback/stdlib/termios.pyi +108 -72
- package/dist/typeshed-fallback/stdlib/textwrap.pyi +103 -103
- package/dist/typeshed-fallback/stdlib/threading.pyi +279 -279
- package/dist/typeshed-fallback/stdlib/time.pyi +380 -380
- package/dist/typeshed-fallback/stdlib/timeit.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3900 -3847
- package/dist/typeshed-fallback/stdlib/tkinter/colorchooser.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/tkinter/commondialog.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/tkinter/constants.pyi +80 -80
- package/dist/typeshed-fallback/stdlib/tkinter/dialog.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/tkinter/dnd.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/tkinter/filedialog.pyi +151 -151
- package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +118 -116
- package/dist/typeshed-fallback/stdlib/tkinter/messagebox.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/tkinter/scrolledtext.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/tkinter/simpledialog.pyi +54 -54
- package/dist/typeshed-fallback/stdlib/tkinter/ttk.pyi +1207 -1207
- package/dist/typeshed-fallback/stdlib/token.pyi +160 -160
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +186 -184
- package/dist/typeshed-fallback/stdlib/tomllib.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/trace.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/traceback.pyi +300 -300
- package/dist/typeshed-fallback/stdlib/tracemalloc.pyi +124 -124
- package/dist/typeshed-fallback/stdlib/turtle.pyi +732 -721
- package/dist/typeshed-fallback/stdlib/types.pyi +909 -913
- package/dist/typeshed-fallback/stdlib/typing.pyi +1145 -1147
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +19 -47
- package/dist/typeshed-fallback/stdlib/unicodedata.pyi +303 -303
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +63 -68
- package/dist/typeshed-fallback/stdlib/unittest/_log.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/unittest/async_case.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +361 -361
- package/dist/typeshed-fallback/stdlib/unittest/loader.pyi +55 -55
- package/dist/typeshed-fallback/stdlib/unittest/main.pyi +73 -73
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +468 -468
- package/dist/typeshed-fallback/stdlib/unittest/result.pyi +47 -47
- package/dist/typeshed-fallback/stdlib/unittest/runner.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/unittest/signals.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/unittest/suite.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/unittest/util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/urllib/error.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +258 -258
- package/dist/typeshed-fallback/stdlib/urllib/request.pyi +408 -408
- package/dist/typeshed-fallback/stdlib/urllib/response.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/urllib/robotparser.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/uuid.pyi +100 -100
- package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +107 -107
- package/dist/typeshed-fallback/stdlib/warnings.pyi +127 -127
- package/dist/typeshed-fallback/stdlib/wave.pyi +85 -85
- package/dist/typeshed-fallback/stdlib/weakref.pyi +198 -198
- package/dist/typeshed-fallback/stdlib/webbrowser.pyi +78 -77
- package/dist/typeshed-fallback/stdlib/wsgiref/handlers.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/wsgiref/headers.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/wsgiref/simple_server.pyi +37 -37
- package/dist/typeshed-fallback/stdlib/wsgiref/types.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/wsgiref/validate.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/xml/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/xml/dom/NodeFilter.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/xml/dom/__init__.pyi +69 -69
- package/dist/typeshed-fallback/stdlib/xml/dom/domreg.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/xml/dom/expatbuilder.pyi +100 -100
- package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +426 -426
- package/dist/typeshed-fallback/stdlib/xml/dom/pulldom.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/xml/dom/xmlbuilder.pyi +108 -108
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementInclude.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementPath.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +347 -347
- package/dist/typeshed-fallback/stdlib/xml/etree/cElementTree.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xml/parsers/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/__init__.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/xml/sax/__init__.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/xml/sax/_exceptions.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +55 -55
- package/dist/typeshed-fallback/stdlib/xml/sax/saxutils.pyi +60 -60
- package/dist/typeshed-fallback/stdlib/xml/sax/xmlreader.pyi +87 -87
- package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +296 -296
- package/dist/typeshed-fallback/stdlib/xmlrpc/server.pyi +144 -144
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/zipapp.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +384 -384
- package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +103 -101
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +41 -70
- package/dist/typeshed-fallback/stdlib/zlib.pyi +162 -157
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +41 -47
- package/dist/typeshed-fallback/stdlib/zoneinfo/_common.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/zoneinfo/_tzpath.pyi +13 -13
- package/dist/typeshed-fallback/stubs/Deprecated/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
- package/dist/typeshed-fallback/stubs/bleach/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/core.pyi +216 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/writers/__init__.pyi +60 -2
- package/dist/typeshed-fallback/stubs/gevent/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/gevent/gevent/events.pyi +3 -1
- package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +6 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +14 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/alarms.pyi +54 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +137 -11
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/prop.pyi +8 -7
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/__init__.pyi +3 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids.pyi +15 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids_result.pyi +6 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzid.pyi +8 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +2 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/tools.pyi +12 -1
- package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +0 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +0 -31
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/drawing/layout.pyi +4 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi +0 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +12 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/text.pyi +1 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi +20 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/__init__.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/_writer.pyi +4 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/cell.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/workbook.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +5 -14
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +2 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_writer.pyi +4 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/merge.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +30 -19
- package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pysftp/pysftp/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pywin32/isapi/install.pyi +98 -0
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32clipboard.pyi +26 -24
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/distutils/spawn.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +6 -7
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +7 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +3 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +6 -7
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +12 -17
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/editable_wheel.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_egg_info.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/sdist.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/test.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/__init__.pyi +1 -14
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/setupcfg.pyi +7 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/depends.pyi +8 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/msvc.pyi +7 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/package_index.pyi +7 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/sandbox.pyi +2 -4
- package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/tqdm/tqdm/contrib/discord.pyi +14 -3
- package/dist/typeshed-fallback/stubs/waitress/waitress/runner.pyi +1 -5
- package/package.json +5 -3
|
@@ -1,1317 +1,1367 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Implementation module for socket operations.
|
|
3
|
-
|
|
4
|
-
See the socket module for documentation.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import sys
|
|
8
|
-
from _typeshed import ReadableBuffer, WriteableBuffer
|
|
9
|
-
from collections.abc import Iterable
|
|
10
|
-
from socket import error as error, gaierror as gaierror, herror as herror, timeout as timeout
|
|
11
|
-
from typing import Any, SupportsIndex, overload
|
|
12
|
-
from typing_extensions import TypeAlias
|
|
13
|
-
|
|
14
|
-
_CMSG: TypeAlias = tuple[int, int, bytes]
|
|
15
|
-
_CMSGArg: TypeAlias = tuple[int, int, ReadableBuffer]
|
|
16
|
-
|
|
17
|
-
# Addresses can be either tuples of varying lengths (AF_INET, AF_INET6,
|
|
18
|
-
# AF_NETLINK, AF_TIPC) or strings/buffers (AF_UNIX).
|
|
19
|
-
# See getsockaddrarg() in socketmodule.c.
|
|
20
|
-
_Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer
|
|
21
|
-
_RetAddress: TypeAlias = Any
|
|
22
|
-
|
|
23
|
-
# ===== Constants =====
|
|
24
|
-
# This matches the order in the CPython documentation
|
|
25
|
-
# https://docs.python.org/3/library/socket.html#constants
|
|
26
|
-
|
|
27
|
-
if sys.platform != "win32":
|
|
28
|
-
AF_UNIX: int
|
|
29
|
-
|
|
30
|
-
AF_INET: int
|
|
31
|
-
AF_INET6: int
|
|
32
|
-
|
|
33
|
-
AF_UNSPEC: int
|
|
34
|
-
|
|
35
|
-
SOCK_STREAM: int
|
|
36
|
-
SOCK_DGRAM: int
|
|
37
|
-
SOCK_RAW: int
|
|
38
|
-
SOCK_RDM: int
|
|
39
|
-
SOCK_SEQPACKET: int
|
|
40
|
-
|
|
41
|
-
if sys.platform == "linux":
|
|
42
|
-
# Availability: Linux >= 2.6.27
|
|
43
|
-
SOCK_CLOEXEC: int
|
|
44
|
-
SOCK_NONBLOCK: int
|
|
45
|
-
|
|
46
|
-
# --------------------
|
|
47
|
-
# Many constants of these forms, documented in the Unix documentation on
|
|
48
|
-
# sockets and/or the IP protocol, are also defined in the socket module.
|
|
49
|
-
# SO_*
|
|
50
|
-
# socket.SOMAXCONN
|
|
51
|
-
# MSG_*
|
|
52
|
-
# SOL_*
|
|
53
|
-
# SCM_*
|
|
54
|
-
# IPPROTO_*
|
|
55
|
-
# IPPORT_*
|
|
56
|
-
# INADDR_*
|
|
57
|
-
# IP_*
|
|
58
|
-
# IPV6_*
|
|
59
|
-
# EAI_*
|
|
60
|
-
# AI_*
|
|
61
|
-
# NI_*
|
|
62
|
-
# TCP_*
|
|
63
|
-
# --------------------
|
|
64
|
-
|
|
65
|
-
SO_ACCEPTCONN: int
|
|
66
|
-
SO_BROADCAST: int
|
|
67
|
-
SO_DEBUG: int
|
|
68
|
-
SO_DONTROUTE: int
|
|
69
|
-
SO_ERROR: int
|
|
70
|
-
SO_KEEPALIVE: int
|
|
71
|
-
SO_LINGER: int
|
|
72
|
-
SO_OOBINLINE: int
|
|
73
|
-
SO_RCVBUF: int
|
|
74
|
-
SO_RCVLOWAT: int
|
|
75
|
-
SO_RCVTIMEO: int
|
|
76
|
-
SO_REUSEADDR: int
|
|
77
|
-
SO_SNDBUF: int
|
|
78
|
-
SO_SNDLOWAT: int
|
|
79
|
-
SO_SNDTIMEO: int
|
|
80
|
-
SO_TYPE: int
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if sys.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if sys.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if sys.platform != "win32":
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if sys.platform == "
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
if sys.platform == "linux"
|
|
391
|
-
# Availability: Linux >=
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
if sys.platform == "linux":
|
|
427
|
-
# Availability: Linux >= 2.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
if sys.platform
|
|
587
|
-
#
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
if sys.
|
|
619
|
-
if sys.
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
# --------------------
|
|
627
|
-
#
|
|
628
|
-
#
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
#
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
"""
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
"""
|
|
814
|
-
...
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
"""
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
def
|
|
856
|
-
"""
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
"""
|
|
864
|
-
...
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
"""
|
|
874
|
-
...
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
data (
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
)
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
"""
|
|
1047
|
-
...
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
def
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
""
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
"""
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
"""
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
"""
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
"""
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
"""
|
|
1202
|
-
...
|
|
1203
|
-
def
|
|
1204
|
-
"""
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
"""
|
|
1233
|
-
...
|
|
1234
|
-
def
|
|
1235
|
-
"""
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
"""
|
|
1242
|
-
...
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
def
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1
|
+
"""
|
|
2
|
+
Implementation module for socket operations.
|
|
3
|
+
|
|
4
|
+
See the socket module for documentation.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
from _typeshed import ReadableBuffer, WriteableBuffer
|
|
9
|
+
from collections.abc import Iterable
|
|
10
|
+
from socket import error as error, gaierror as gaierror, herror as herror, timeout as timeout
|
|
11
|
+
from typing import Any, SupportsIndex, overload
|
|
12
|
+
from typing_extensions import CapsuleType, TypeAlias
|
|
13
|
+
|
|
14
|
+
_CMSG: TypeAlias = tuple[int, int, bytes]
|
|
15
|
+
_CMSGArg: TypeAlias = tuple[int, int, ReadableBuffer]
|
|
16
|
+
|
|
17
|
+
# Addresses can be either tuples of varying lengths (AF_INET, AF_INET6,
|
|
18
|
+
# AF_NETLINK, AF_TIPC) or strings/buffers (AF_UNIX).
|
|
19
|
+
# See getsockaddrarg() in socketmodule.c.
|
|
20
|
+
_Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer
|
|
21
|
+
_RetAddress: TypeAlias = Any
|
|
22
|
+
|
|
23
|
+
# ===== Constants =====
|
|
24
|
+
# This matches the order in the CPython documentation
|
|
25
|
+
# https://docs.python.org/3/library/socket.html#constants
|
|
26
|
+
|
|
27
|
+
if sys.platform != "win32":
|
|
28
|
+
AF_UNIX: int
|
|
29
|
+
|
|
30
|
+
AF_INET: int
|
|
31
|
+
AF_INET6: int
|
|
32
|
+
|
|
33
|
+
AF_UNSPEC: int
|
|
34
|
+
|
|
35
|
+
SOCK_STREAM: int
|
|
36
|
+
SOCK_DGRAM: int
|
|
37
|
+
SOCK_RAW: int
|
|
38
|
+
SOCK_RDM: int
|
|
39
|
+
SOCK_SEQPACKET: int
|
|
40
|
+
|
|
41
|
+
if sys.platform == "linux":
|
|
42
|
+
# Availability: Linux >= 2.6.27
|
|
43
|
+
SOCK_CLOEXEC: int
|
|
44
|
+
SOCK_NONBLOCK: int
|
|
45
|
+
|
|
46
|
+
# --------------------
|
|
47
|
+
# Many constants of these forms, documented in the Unix documentation on
|
|
48
|
+
# sockets and/or the IP protocol, are also defined in the socket module.
|
|
49
|
+
# SO_*
|
|
50
|
+
# socket.SOMAXCONN
|
|
51
|
+
# MSG_*
|
|
52
|
+
# SOL_*
|
|
53
|
+
# SCM_*
|
|
54
|
+
# IPPROTO_*
|
|
55
|
+
# IPPORT_*
|
|
56
|
+
# INADDR_*
|
|
57
|
+
# IP_*
|
|
58
|
+
# IPV6_*
|
|
59
|
+
# EAI_*
|
|
60
|
+
# AI_*
|
|
61
|
+
# NI_*
|
|
62
|
+
# TCP_*
|
|
63
|
+
# --------------------
|
|
64
|
+
|
|
65
|
+
SO_ACCEPTCONN: int
|
|
66
|
+
SO_BROADCAST: int
|
|
67
|
+
SO_DEBUG: int
|
|
68
|
+
SO_DONTROUTE: int
|
|
69
|
+
SO_ERROR: int
|
|
70
|
+
SO_KEEPALIVE: int
|
|
71
|
+
SO_LINGER: int
|
|
72
|
+
SO_OOBINLINE: int
|
|
73
|
+
SO_RCVBUF: int
|
|
74
|
+
SO_RCVLOWAT: int
|
|
75
|
+
SO_RCVTIMEO: int
|
|
76
|
+
SO_REUSEADDR: int
|
|
77
|
+
SO_SNDBUF: int
|
|
78
|
+
SO_SNDLOWAT: int
|
|
79
|
+
SO_SNDTIMEO: int
|
|
80
|
+
SO_TYPE: int
|
|
81
|
+
if sys.platform != "linux":
|
|
82
|
+
SO_USELOOPBACK: int
|
|
83
|
+
if sys.platform == "win32":
|
|
84
|
+
SO_EXCLUSIVEADDRUSE: int
|
|
85
|
+
if sys.platform != "win32":
|
|
86
|
+
SO_REUSEPORT: int
|
|
87
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
88
|
+
SO_BINDTODEVICE: int
|
|
89
|
+
SO_DOMAIN: int
|
|
90
|
+
SO_MARK: int
|
|
91
|
+
SO_PASSCRED: int
|
|
92
|
+
SO_PASSSEC: int
|
|
93
|
+
SO_PEERCRED: int
|
|
94
|
+
SO_PEERSEC: int
|
|
95
|
+
SO_PRIORITY: int
|
|
96
|
+
SO_PROTOCOL: int
|
|
97
|
+
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
|
98
|
+
SO_SETFIB: int
|
|
99
|
+
if sys.platform == "linux" and sys.version_info >= (3, 13):
|
|
100
|
+
SO_BINDTOIFINDEX: int
|
|
101
|
+
|
|
102
|
+
SOMAXCONN: int
|
|
103
|
+
|
|
104
|
+
MSG_CTRUNC: int
|
|
105
|
+
MSG_DONTROUTE: int
|
|
106
|
+
MSG_OOB: int
|
|
107
|
+
MSG_PEEK: int
|
|
108
|
+
MSG_TRUNC: int
|
|
109
|
+
MSG_WAITALL: int
|
|
110
|
+
if sys.platform != "win32":
|
|
111
|
+
MSG_DONTWAIT: int
|
|
112
|
+
MSG_EOR: int
|
|
113
|
+
MSG_NOSIGNAL: int # Sometimes this exists on darwin, sometimes not
|
|
114
|
+
if sys.platform != "darwin":
|
|
115
|
+
MSG_ERRQUEUE: int
|
|
116
|
+
if sys.platform == "win32":
|
|
117
|
+
MSG_BCAST: int
|
|
118
|
+
MSG_MCAST: int
|
|
119
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
120
|
+
MSG_CMSG_CLOEXEC: int
|
|
121
|
+
MSG_CONFIRM: int
|
|
122
|
+
MSG_FASTOPEN: int
|
|
123
|
+
MSG_MORE: int
|
|
124
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
125
|
+
MSG_EOF: int
|
|
126
|
+
if sys.platform != "win32" and sys.platform != "linux" and sys.platform != "darwin":
|
|
127
|
+
MSG_NOTIFICATION: int
|
|
128
|
+
MSG_BTAG: int # Not FreeBSD either
|
|
129
|
+
MSG_ETAG: int # Not FreeBSD either
|
|
130
|
+
|
|
131
|
+
SOL_IP: int
|
|
132
|
+
SOL_SOCKET: int
|
|
133
|
+
SOL_TCP: int
|
|
134
|
+
SOL_UDP: int
|
|
135
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
136
|
+
# Defined in socket.h for Linux, but these aren't always present for
|
|
137
|
+
# some reason.
|
|
138
|
+
SOL_ATALK: int
|
|
139
|
+
SOL_AX25: int
|
|
140
|
+
SOL_HCI: int
|
|
141
|
+
SOL_IPX: int
|
|
142
|
+
SOL_NETROM: int
|
|
143
|
+
SOL_ROSE: int
|
|
144
|
+
|
|
145
|
+
if sys.platform != "win32":
|
|
146
|
+
SCM_RIGHTS: int
|
|
147
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
148
|
+
SCM_CREDENTIALS: int
|
|
149
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
150
|
+
SCM_CREDS: int
|
|
151
|
+
|
|
152
|
+
IPPROTO_ICMP: int
|
|
153
|
+
IPPROTO_IP: int
|
|
154
|
+
IPPROTO_RAW: int
|
|
155
|
+
IPPROTO_TCP: int
|
|
156
|
+
IPPROTO_UDP: int
|
|
157
|
+
IPPROTO_AH: int
|
|
158
|
+
IPPROTO_DSTOPTS: int
|
|
159
|
+
IPPROTO_EGP: int
|
|
160
|
+
IPPROTO_ESP: int
|
|
161
|
+
IPPROTO_FRAGMENT: int
|
|
162
|
+
IPPROTO_HOPOPTS: int
|
|
163
|
+
IPPROTO_ICMPV6: int
|
|
164
|
+
IPPROTO_IDP: int
|
|
165
|
+
IPPROTO_IGMP: int
|
|
166
|
+
IPPROTO_IPV6: int
|
|
167
|
+
IPPROTO_NONE: int
|
|
168
|
+
IPPROTO_PIM: int
|
|
169
|
+
IPPROTO_PUP: int
|
|
170
|
+
IPPROTO_ROUTING: int
|
|
171
|
+
IPPROTO_SCTP: int
|
|
172
|
+
if sys.platform != "linux":
|
|
173
|
+
IPPROTO_GGP: int
|
|
174
|
+
IPPROTO_IPV4: int
|
|
175
|
+
IPPROTO_MAX: int
|
|
176
|
+
IPPROTO_ND: int
|
|
177
|
+
if sys.platform == "win32":
|
|
178
|
+
IPPROTO_CBT: int
|
|
179
|
+
IPPROTO_ICLFXBM: int
|
|
180
|
+
IPPROTO_IGP: int
|
|
181
|
+
IPPROTO_L2TP: int
|
|
182
|
+
IPPROTO_PGM: int
|
|
183
|
+
IPPROTO_RDP: int
|
|
184
|
+
IPPROTO_ST: int
|
|
185
|
+
if sys.platform != "win32":
|
|
186
|
+
IPPROTO_GRE: int
|
|
187
|
+
IPPROTO_IPIP: int
|
|
188
|
+
IPPROTO_RSVP: int
|
|
189
|
+
IPPROTO_TP: int
|
|
190
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
191
|
+
IPPROTO_EON: int
|
|
192
|
+
IPPROTO_HELLO: int
|
|
193
|
+
IPPROTO_IPCOMP: int
|
|
194
|
+
IPPROTO_XTP: int
|
|
195
|
+
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
|
196
|
+
IPPROTO_BIP: int # Not FreeBSD either
|
|
197
|
+
IPPROTO_MOBILE: int # Not FreeBSD either
|
|
198
|
+
IPPROTO_VRRP: int # Not FreeBSD either
|
|
199
|
+
if sys.version_info >= (3, 9) and sys.platform == "linux":
|
|
200
|
+
# Availability: Linux >= 2.6.20, FreeBSD >= 10.1
|
|
201
|
+
IPPROTO_UDPLITE: int
|
|
202
|
+
if sys.version_info >= (3, 10) and sys.platform == "linux":
|
|
203
|
+
IPPROTO_MPTCP: int
|
|
204
|
+
|
|
205
|
+
IPPORT_RESERVED: int
|
|
206
|
+
IPPORT_USERRESERVED: int
|
|
207
|
+
|
|
208
|
+
INADDR_ALLHOSTS_GROUP: int
|
|
209
|
+
INADDR_ANY: int
|
|
210
|
+
INADDR_BROADCAST: int
|
|
211
|
+
INADDR_LOOPBACK: int
|
|
212
|
+
INADDR_MAX_LOCAL_GROUP: int
|
|
213
|
+
INADDR_NONE: int
|
|
214
|
+
INADDR_UNSPEC_GROUP: int
|
|
215
|
+
|
|
216
|
+
IP_ADD_MEMBERSHIP: int
|
|
217
|
+
IP_DROP_MEMBERSHIP: int
|
|
218
|
+
IP_HDRINCL: int
|
|
219
|
+
IP_MULTICAST_IF: int
|
|
220
|
+
IP_MULTICAST_LOOP: int
|
|
221
|
+
IP_MULTICAST_TTL: int
|
|
222
|
+
IP_OPTIONS: int
|
|
223
|
+
if sys.platform != "linux":
|
|
224
|
+
IP_RECVDSTADDR: int
|
|
225
|
+
if sys.version_info >= (3, 10):
|
|
226
|
+
IP_RECVTOS: int
|
|
227
|
+
IP_TOS: int
|
|
228
|
+
IP_TTL: int
|
|
229
|
+
if sys.platform != "win32":
|
|
230
|
+
IP_DEFAULT_MULTICAST_LOOP: int
|
|
231
|
+
IP_DEFAULT_MULTICAST_TTL: int
|
|
232
|
+
IP_MAX_MEMBERSHIPS: int
|
|
233
|
+
IP_RECVOPTS: int
|
|
234
|
+
IP_RECVRETOPTS: int
|
|
235
|
+
IP_RETOPTS: int
|
|
236
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
237
|
+
IP_TRANSPARENT: int
|
|
238
|
+
if sys.platform != "win32" and sys.platform != "darwin" and sys.version_info >= (3, 11):
|
|
239
|
+
IP_BIND_ADDRESS_NO_PORT: int
|
|
240
|
+
if sys.version_info >= (3, 12):
|
|
241
|
+
IP_ADD_SOURCE_MEMBERSHIP: int
|
|
242
|
+
IP_BLOCK_SOURCE: int
|
|
243
|
+
IP_DROP_SOURCE_MEMBERSHIP: int
|
|
244
|
+
IP_PKTINFO: int
|
|
245
|
+
IP_UNBLOCK_SOURCE: int
|
|
246
|
+
|
|
247
|
+
IPV6_CHECKSUM: int
|
|
248
|
+
IPV6_JOIN_GROUP: int
|
|
249
|
+
IPV6_LEAVE_GROUP: int
|
|
250
|
+
IPV6_MULTICAST_HOPS: int
|
|
251
|
+
IPV6_MULTICAST_IF: int
|
|
252
|
+
IPV6_MULTICAST_LOOP: int
|
|
253
|
+
IPV6_RECVTCLASS: int
|
|
254
|
+
IPV6_TCLASS: int
|
|
255
|
+
IPV6_UNICAST_HOPS: int
|
|
256
|
+
IPV6_V6ONLY: int
|
|
257
|
+
if sys.version_info >= (3, 9) or sys.platform != "darwin":
|
|
258
|
+
IPV6_DONTFRAG: int
|
|
259
|
+
IPV6_HOPLIMIT: int
|
|
260
|
+
IPV6_HOPOPTS: int
|
|
261
|
+
IPV6_PKTINFO: int
|
|
262
|
+
IPV6_RECVRTHDR: int
|
|
263
|
+
IPV6_RTHDR: int
|
|
264
|
+
if sys.platform != "win32":
|
|
265
|
+
IPV6_RTHDR_TYPE_0: int
|
|
266
|
+
if sys.version_info >= (3, 9) or sys.platform != "darwin":
|
|
267
|
+
IPV6_DSTOPTS: int
|
|
268
|
+
IPV6_NEXTHOP: int
|
|
269
|
+
IPV6_PATHMTU: int
|
|
270
|
+
IPV6_RECVDSTOPTS: int
|
|
271
|
+
IPV6_RECVHOPLIMIT: int
|
|
272
|
+
IPV6_RECVHOPOPTS: int
|
|
273
|
+
IPV6_RECVPATHMTU: int
|
|
274
|
+
IPV6_RECVPKTINFO: int
|
|
275
|
+
IPV6_RTHDRDSTOPTS: int
|
|
276
|
+
|
|
277
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
278
|
+
if sys.version_info >= (3, 9) or sys.platform != "darwin":
|
|
279
|
+
IPV6_USE_MIN_MTU: int
|
|
280
|
+
|
|
281
|
+
EAI_AGAIN: int
|
|
282
|
+
EAI_BADFLAGS: int
|
|
283
|
+
EAI_FAIL: int
|
|
284
|
+
EAI_FAMILY: int
|
|
285
|
+
EAI_MEMORY: int
|
|
286
|
+
EAI_NODATA: int
|
|
287
|
+
EAI_NONAME: int
|
|
288
|
+
EAI_SERVICE: int
|
|
289
|
+
EAI_SOCKTYPE: int
|
|
290
|
+
if sys.platform != "win32":
|
|
291
|
+
EAI_ADDRFAMILY: int
|
|
292
|
+
EAI_OVERFLOW: int
|
|
293
|
+
EAI_SYSTEM: int
|
|
294
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
295
|
+
EAI_BADHINTS: int
|
|
296
|
+
EAI_MAX: int
|
|
297
|
+
EAI_PROTOCOL: int
|
|
298
|
+
|
|
299
|
+
AI_ADDRCONFIG: int
|
|
300
|
+
AI_ALL: int
|
|
301
|
+
AI_CANONNAME: int
|
|
302
|
+
AI_NUMERICHOST: int
|
|
303
|
+
AI_NUMERICSERV: int
|
|
304
|
+
AI_PASSIVE: int
|
|
305
|
+
AI_V4MAPPED: int
|
|
306
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
307
|
+
AI_DEFAULT: int
|
|
308
|
+
AI_MASK: int
|
|
309
|
+
AI_V4MAPPED_CFG: int
|
|
310
|
+
|
|
311
|
+
NI_DGRAM: int
|
|
312
|
+
NI_MAXHOST: int
|
|
313
|
+
NI_MAXSERV: int
|
|
314
|
+
NI_NAMEREQD: int
|
|
315
|
+
NI_NOFQDN: int
|
|
316
|
+
NI_NUMERICHOST: int
|
|
317
|
+
NI_NUMERICSERV: int
|
|
318
|
+
if sys.platform == "linux" and sys.version_info >= (3, 13):
|
|
319
|
+
NI_IDN: int
|
|
320
|
+
|
|
321
|
+
TCP_FASTOPEN: int
|
|
322
|
+
TCP_KEEPCNT: int
|
|
323
|
+
TCP_KEEPINTVL: int
|
|
324
|
+
TCP_MAXSEG: int
|
|
325
|
+
TCP_NODELAY: int
|
|
326
|
+
if sys.platform != "win32":
|
|
327
|
+
TCP_NOTSENT_LOWAT: int
|
|
328
|
+
if sys.platform != "darwin":
|
|
329
|
+
TCP_KEEPIDLE: int
|
|
330
|
+
if sys.version_info >= (3, 10) and sys.platform == "darwin":
|
|
331
|
+
TCP_KEEPALIVE: int
|
|
332
|
+
if sys.version_info >= (3, 11) and sys.platform == "darwin":
|
|
333
|
+
TCP_CONNECTION_INFO: int
|
|
334
|
+
|
|
335
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
336
|
+
TCP_CONGESTION: int
|
|
337
|
+
TCP_CORK: int
|
|
338
|
+
TCP_DEFER_ACCEPT: int
|
|
339
|
+
TCP_INFO: int
|
|
340
|
+
TCP_LINGER2: int
|
|
341
|
+
TCP_QUICKACK: int
|
|
342
|
+
TCP_SYNCNT: int
|
|
343
|
+
TCP_USER_TIMEOUT: int
|
|
344
|
+
TCP_WINDOW_CLAMP: int
|
|
345
|
+
if sys.platform == "linux" and sys.version_info >= (3, 12):
|
|
346
|
+
TCP_CC_INFO: int
|
|
347
|
+
TCP_FASTOPEN_CONNECT: int
|
|
348
|
+
TCP_FASTOPEN_KEY: int
|
|
349
|
+
TCP_FASTOPEN_NO_COOKIE: int
|
|
350
|
+
TCP_INQ: int
|
|
351
|
+
TCP_MD5SIG: int
|
|
352
|
+
TCP_MD5SIG_EXT: int
|
|
353
|
+
TCP_QUEUE_SEQ: int
|
|
354
|
+
TCP_REPAIR: int
|
|
355
|
+
TCP_REPAIR_OPTIONS: int
|
|
356
|
+
TCP_REPAIR_QUEUE: int
|
|
357
|
+
TCP_REPAIR_WINDOW: int
|
|
358
|
+
TCP_SAVED_SYN: int
|
|
359
|
+
TCP_SAVE_SYN: int
|
|
360
|
+
TCP_THIN_DUPACK: int
|
|
361
|
+
TCP_THIN_LINEAR_TIMEOUTS: int
|
|
362
|
+
TCP_TIMESTAMP: int
|
|
363
|
+
TCP_TX_DELAY: int
|
|
364
|
+
TCP_ULP: int
|
|
365
|
+
TCP_ZEROCOPY_RECEIVE: int
|
|
366
|
+
|
|
367
|
+
# --------------------
|
|
368
|
+
# Specifically documented constants
|
|
369
|
+
# --------------------
|
|
370
|
+
|
|
371
|
+
if sys.platform == "linux":
|
|
372
|
+
# Availability: Linux >= 2.6.25, NetBSD >= 8
|
|
373
|
+
AF_CAN: int
|
|
374
|
+
PF_CAN: int
|
|
375
|
+
SOL_CAN_BASE: int
|
|
376
|
+
SOL_CAN_RAW: int
|
|
377
|
+
CAN_EFF_FLAG: int
|
|
378
|
+
CAN_EFF_MASK: int
|
|
379
|
+
CAN_ERR_FLAG: int
|
|
380
|
+
CAN_ERR_MASK: int
|
|
381
|
+
CAN_RAW: int
|
|
382
|
+
CAN_RAW_FILTER: int
|
|
383
|
+
CAN_RAW_LOOPBACK: int
|
|
384
|
+
CAN_RAW_RECV_OWN_MSGS: int
|
|
385
|
+
CAN_RTR_FLAG: int
|
|
386
|
+
CAN_SFF_MASK: int
|
|
387
|
+
if sys.version_info < (3, 11):
|
|
388
|
+
CAN_RAW_ERR_FILTER: int
|
|
389
|
+
|
|
390
|
+
if sys.platform == "linux":
|
|
391
|
+
# Availability: Linux >= 2.6.25
|
|
392
|
+
CAN_BCM: int
|
|
393
|
+
CAN_BCM_TX_SETUP: int
|
|
394
|
+
CAN_BCM_TX_DELETE: int
|
|
395
|
+
CAN_BCM_TX_READ: int
|
|
396
|
+
CAN_BCM_TX_SEND: int
|
|
397
|
+
CAN_BCM_RX_SETUP: int
|
|
398
|
+
CAN_BCM_RX_DELETE: int
|
|
399
|
+
CAN_BCM_RX_READ: int
|
|
400
|
+
CAN_BCM_TX_STATUS: int
|
|
401
|
+
CAN_BCM_TX_EXPIRED: int
|
|
402
|
+
CAN_BCM_RX_STATUS: int
|
|
403
|
+
CAN_BCM_RX_TIMEOUT: int
|
|
404
|
+
CAN_BCM_RX_CHANGED: int
|
|
405
|
+
CAN_BCM_SETTIMER: int
|
|
406
|
+
CAN_BCM_STARTTIMER: int
|
|
407
|
+
CAN_BCM_TX_COUNTEVT: int
|
|
408
|
+
CAN_BCM_TX_ANNOUNCE: int
|
|
409
|
+
CAN_BCM_TX_CP_CAN_ID: int
|
|
410
|
+
CAN_BCM_RX_FILTER_ID: int
|
|
411
|
+
CAN_BCM_RX_CHECK_DLC: int
|
|
412
|
+
CAN_BCM_RX_NO_AUTOTIMER: int
|
|
413
|
+
CAN_BCM_RX_ANNOUNCE_RESUME: int
|
|
414
|
+
CAN_BCM_TX_RESET_MULTI_IDX: int
|
|
415
|
+
CAN_BCM_RX_RTR_FRAME: int
|
|
416
|
+
CAN_BCM_CAN_FD_FRAME: int
|
|
417
|
+
|
|
418
|
+
if sys.platform == "linux":
|
|
419
|
+
# Availability: Linux >= 3.6
|
|
420
|
+
CAN_RAW_FD_FRAMES: int
|
|
421
|
+
|
|
422
|
+
if sys.platform == "linux" and sys.version_info >= (3, 9):
|
|
423
|
+
# Availability: Linux >= 4.1
|
|
424
|
+
CAN_RAW_JOIN_FILTERS: int
|
|
425
|
+
|
|
426
|
+
if sys.platform == "linux":
|
|
427
|
+
# Availability: Linux >= 2.6.25
|
|
428
|
+
CAN_ISOTP: int
|
|
429
|
+
|
|
430
|
+
if sys.platform == "linux" and sys.version_info >= (3, 9):
|
|
431
|
+
# Availability: Linux >= 5.4
|
|
432
|
+
CAN_J1939: int
|
|
433
|
+
|
|
434
|
+
J1939_MAX_UNICAST_ADDR: int
|
|
435
|
+
J1939_IDLE_ADDR: int
|
|
436
|
+
J1939_NO_ADDR: int
|
|
437
|
+
J1939_NO_NAME: int
|
|
438
|
+
J1939_PGN_REQUEST: int
|
|
439
|
+
J1939_PGN_ADDRESS_CLAIMED: int
|
|
440
|
+
J1939_PGN_ADDRESS_COMMANDED: int
|
|
441
|
+
J1939_PGN_PDU1_MAX: int
|
|
442
|
+
J1939_PGN_MAX: int
|
|
443
|
+
J1939_NO_PGN: int
|
|
444
|
+
|
|
445
|
+
SO_J1939_FILTER: int
|
|
446
|
+
SO_J1939_PROMISC: int
|
|
447
|
+
SO_J1939_SEND_PRIO: int
|
|
448
|
+
SO_J1939_ERRQUEUE: int
|
|
449
|
+
|
|
450
|
+
SCM_J1939_DEST_ADDR: int
|
|
451
|
+
SCM_J1939_DEST_NAME: int
|
|
452
|
+
SCM_J1939_PRIO: int
|
|
453
|
+
SCM_J1939_ERRQUEUE: int
|
|
454
|
+
|
|
455
|
+
J1939_NLA_PAD: int
|
|
456
|
+
J1939_NLA_BYTES_ACKED: int
|
|
457
|
+
J1939_EE_INFO_NONE: int
|
|
458
|
+
J1939_EE_INFO_TX_ABORT: int
|
|
459
|
+
J1939_FILTER_MAX: int
|
|
460
|
+
|
|
461
|
+
if sys.version_info >= (3, 12) and sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin":
|
|
462
|
+
# Availability: FreeBSD >= 14.0
|
|
463
|
+
AF_DIVERT: int
|
|
464
|
+
PF_DIVERT: int
|
|
465
|
+
|
|
466
|
+
if sys.platform == "linux":
|
|
467
|
+
# Availability: Linux >= 2.2
|
|
468
|
+
AF_PACKET: int
|
|
469
|
+
PF_PACKET: int
|
|
470
|
+
PACKET_BROADCAST: int
|
|
471
|
+
PACKET_FASTROUTE: int
|
|
472
|
+
PACKET_HOST: int
|
|
473
|
+
PACKET_LOOPBACK: int
|
|
474
|
+
PACKET_MULTICAST: int
|
|
475
|
+
PACKET_OTHERHOST: int
|
|
476
|
+
PACKET_OUTGOING: int
|
|
477
|
+
|
|
478
|
+
if sys.version_info >= (3, 12) and sys.platform == "linux":
|
|
479
|
+
ETH_P_ALL: int
|
|
480
|
+
|
|
481
|
+
if sys.platform == "linux":
|
|
482
|
+
# Availability: Linux >= 2.6.30
|
|
483
|
+
AF_RDS: int
|
|
484
|
+
PF_RDS: int
|
|
485
|
+
SOL_RDS: int
|
|
486
|
+
# These are present in include/linux/rds.h but don't always show up
|
|
487
|
+
# here.
|
|
488
|
+
RDS_CANCEL_SENT_TO: int
|
|
489
|
+
RDS_CMSG_RDMA_ARGS: int
|
|
490
|
+
RDS_CMSG_RDMA_DEST: int
|
|
491
|
+
RDS_CMSG_RDMA_MAP: int
|
|
492
|
+
RDS_CMSG_RDMA_STATUS: int
|
|
493
|
+
RDS_CONG_MONITOR: int
|
|
494
|
+
RDS_FREE_MR: int
|
|
495
|
+
RDS_GET_MR: int
|
|
496
|
+
RDS_GET_MR_FOR_DEST: int
|
|
497
|
+
RDS_RDMA_DONTWAIT: int
|
|
498
|
+
RDS_RDMA_FENCE: int
|
|
499
|
+
RDS_RDMA_INVALIDATE: int
|
|
500
|
+
RDS_RDMA_NOTIFY_ME: int
|
|
501
|
+
RDS_RDMA_READWRITE: int
|
|
502
|
+
RDS_RDMA_SILENT: int
|
|
503
|
+
RDS_RDMA_USE_ONCE: int
|
|
504
|
+
RDS_RECVERR: int
|
|
505
|
+
|
|
506
|
+
# This is supported by CPython but doesn't seem to be a real thing.
|
|
507
|
+
# The closest existing constant in rds.h is RDS_CMSG_CONG_UPDATE
|
|
508
|
+
# RDS_CMSG_RDMA_UPDATE: int
|
|
509
|
+
|
|
510
|
+
if sys.platform == "win32":
|
|
511
|
+
SIO_RCVALL: int
|
|
512
|
+
SIO_KEEPALIVE_VALS: int
|
|
513
|
+
SIO_LOOPBACK_FAST_PATH: int
|
|
514
|
+
RCVALL_MAX: int
|
|
515
|
+
RCVALL_OFF: int
|
|
516
|
+
RCVALL_ON: int
|
|
517
|
+
RCVALL_SOCKETLEVELONLY: int
|
|
518
|
+
|
|
519
|
+
if sys.platform == "linux":
|
|
520
|
+
AF_TIPC: int
|
|
521
|
+
SOL_TIPC: int
|
|
522
|
+
TIPC_ADDR_ID: int
|
|
523
|
+
TIPC_ADDR_NAME: int
|
|
524
|
+
TIPC_ADDR_NAMESEQ: int
|
|
525
|
+
TIPC_CFG_SRV: int
|
|
526
|
+
TIPC_CLUSTER_SCOPE: int
|
|
527
|
+
TIPC_CONN_TIMEOUT: int
|
|
528
|
+
TIPC_CRITICAL_IMPORTANCE: int
|
|
529
|
+
TIPC_DEST_DROPPABLE: int
|
|
530
|
+
TIPC_HIGH_IMPORTANCE: int
|
|
531
|
+
TIPC_IMPORTANCE: int
|
|
532
|
+
TIPC_LOW_IMPORTANCE: int
|
|
533
|
+
TIPC_MEDIUM_IMPORTANCE: int
|
|
534
|
+
TIPC_NODE_SCOPE: int
|
|
535
|
+
TIPC_PUBLISHED: int
|
|
536
|
+
TIPC_SRC_DROPPABLE: int
|
|
537
|
+
TIPC_SUBSCR_TIMEOUT: int
|
|
538
|
+
TIPC_SUB_CANCEL: int
|
|
539
|
+
TIPC_SUB_PORTS: int
|
|
540
|
+
TIPC_SUB_SERVICE: int
|
|
541
|
+
TIPC_TOP_SRV: int
|
|
542
|
+
TIPC_WAIT_FOREVER: int
|
|
543
|
+
TIPC_WITHDRAWN: int
|
|
544
|
+
TIPC_ZONE_SCOPE: int
|
|
545
|
+
|
|
546
|
+
if sys.platform == "linux":
|
|
547
|
+
# Availability: Linux >= 2.6.38
|
|
548
|
+
AF_ALG: int
|
|
549
|
+
SOL_ALG: int
|
|
550
|
+
ALG_OP_DECRYPT: int
|
|
551
|
+
ALG_OP_ENCRYPT: int
|
|
552
|
+
ALG_OP_SIGN: int
|
|
553
|
+
ALG_OP_VERIFY: int
|
|
554
|
+
ALG_SET_AEAD_ASSOCLEN: int
|
|
555
|
+
ALG_SET_AEAD_AUTHSIZE: int
|
|
556
|
+
ALG_SET_IV: int
|
|
557
|
+
ALG_SET_KEY: int
|
|
558
|
+
ALG_SET_OP: int
|
|
559
|
+
ALG_SET_PUBKEY: int
|
|
560
|
+
|
|
561
|
+
if sys.platform == "linux":
|
|
562
|
+
# Availability: Linux >= 4.8 (or maybe 3.9, CPython docs are confusing)
|
|
563
|
+
AF_VSOCK: int
|
|
564
|
+
IOCTL_VM_SOCKETS_GET_LOCAL_CID: int
|
|
565
|
+
VMADDR_CID_ANY: int
|
|
566
|
+
VMADDR_CID_HOST: int
|
|
567
|
+
VMADDR_PORT_ANY: int
|
|
568
|
+
SO_VM_SOCKETS_BUFFER_MAX_SIZE: int
|
|
569
|
+
SO_VM_SOCKETS_BUFFER_SIZE: int
|
|
570
|
+
SO_VM_SOCKETS_BUFFER_MIN_SIZE: int
|
|
571
|
+
VM_SOCKETS_INVALID_VERSION: int # undocumented
|
|
572
|
+
|
|
573
|
+
if sys.platform != "win32" or sys.version_info >= (3, 9):
|
|
574
|
+
# Documented as only available on BSD, macOS, but empirically sometimes
|
|
575
|
+
# available on Windows
|
|
576
|
+
if sys.platform != "linux":
|
|
577
|
+
AF_LINK: int
|
|
578
|
+
|
|
579
|
+
has_ipv6: bool
|
|
580
|
+
|
|
581
|
+
if sys.platform != "darwin" and sys.platform != "linux":
|
|
582
|
+
if sys.platform != "win32" or sys.version_info >= (3, 9):
|
|
583
|
+
BDADDR_ANY: str
|
|
584
|
+
BDADDR_LOCAL: str
|
|
585
|
+
|
|
586
|
+
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
|
587
|
+
HCI_FILTER: int # not in NetBSD or DragonFlyBSD
|
|
588
|
+
HCI_TIME_STAMP: int # not in FreeBSD, NetBSD, or DragonFlyBSD
|
|
589
|
+
HCI_DATA_DIR: int # not in FreeBSD, NetBSD, or DragonFlyBSD
|
|
590
|
+
|
|
591
|
+
if sys.platform == "linux":
|
|
592
|
+
AF_QIPCRTR: int # Availability: Linux >= 4.7
|
|
593
|
+
|
|
594
|
+
if sys.version_info >= (3, 11) and sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin":
|
|
595
|
+
# FreeBSD
|
|
596
|
+
SCM_CREDS2: int
|
|
597
|
+
LOCAL_CREDS: int
|
|
598
|
+
LOCAL_CREDS_PERSISTENT: int
|
|
599
|
+
|
|
600
|
+
if sys.version_info >= (3, 11) and sys.platform == "linux":
|
|
601
|
+
SO_INCOMING_CPU: int # Availability: Linux >= 3.9
|
|
602
|
+
|
|
603
|
+
if sys.version_info >= (3, 12) and sys.platform == "win32":
|
|
604
|
+
# Availability: Windows
|
|
605
|
+
AF_HYPERV: int
|
|
606
|
+
HV_PROTOCOL_RAW: int
|
|
607
|
+
HVSOCKET_CONNECT_TIMEOUT: int
|
|
608
|
+
HVSOCKET_CONNECT_TIMEOUT_MAX: int
|
|
609
|
+
HVSOCKET_CONNECTED_SUSPEND: int
|
|
610
|
+
HVSOCKET_ADDRESS_FLAG_PASSTHRU: int
|
|
611
|
+
HV_GUID_ZERO: str
|
|
612
|
+
HV_GUID_WILDCARD: str
|
|
613
|
+
HV_GUID_BROADCAST: str
|
|
614
|
+
HV_GUID_CHILDREN: str
|
|
615
|
+
HV_GUID_LOOPBACK: str
|
|
616
|
+
HV_GUID_PARENT: str
|
|
617
|
+
|
|
618
|
+
if sys.version_info >= (3, 12):
|
|
619
|
+
if sys.platform != "win32":
|
|
620
|
+
# Availability: Linux, FreeBSD, macOS
|
|
621
|
+
ETHERTYPE_ARP: int
|
|
622
|
+
ETHERTYPE_IP: int
|
|
623
|
+
ETHERTYPE_IPV6: int
|
|
624
|
+
ETHERTYPE_VLAN: int
|
|
625
|
+
|
|
626
|
+
# --------------------
|
|
627
|
+
# Semi-documented constants
|
|
628
|
+
# These are alluded to under the "Socket families" section in the docs
|
|
629
|
+
# https://docs.python.org/3/library/socket.html#socket-families
|
|
630
|
+
# --------------------
|
|
631
|
+
|
|
632
|
+
if sys.platform == "linux":
|
|
633
|
+
# Netlink is defined by Linux
|
|
634
|
+
AF_NETLINK: int
|
|
635
|
+
NETLINK_CRYPTO: int
|
|
636
|
+
NETLINK_DNRTMSG: int
|
|
637
|
+
NETLINK_FIREWALL: int
|
|
638
|
+
NETLINK_IP6_FW: int
|
|
639
|
+
NETLINK_NFLOG: int
|
|
640
|
+
NETLINK_ROUTE: int
|
|
641
|
+
NETLINK_USERSOCK: int
|
|
642
|
+
NETLINK_XFRM: int
|
|
643
|
+
# Technically still supported by CPython
|
|
644
|
+
# NETLINK_ARPD: int # linux 2.0 to 2.6.12 (EOL August 2005)
|
|
645
|
+
# NETLINK_ROUTE6: int # linux 2.2 to 2.6.12 (EOL August 2005)
|
|
646
|
+
# NETLINK_SKIP: int # linux 2.0 to 2.6.12 (EOL August 2005)
|
|
647
|
+
# NETLINK_TAPBASE: int # linux 2.2 to 2.6.12 (EOL August 2005)
|
|
648
|
+
# NETLINK_TCPDIAG: int # linux 2.6.0 to 2.6.13 (EOL December 2005)
|
|
649
|
+
# NETLINK_W1: int # linux 2.6.13 to 2.6.17 (EOL October 2006)
|
|
650
|
+
|
|
651
|
+
if sys.platform == "darwin":
|
|
652
|
+
PF_SYSTEM: int
|
|
653
|
+
SYSPROTO_CONTROL: int
|
|
654
|
+
|
|
655
|
+
if sys.platform != "darwin" and sys.platform != "linux":
|
|
656
|
+
if sys.version_info >= (3, 9) or sys.platform != "win32":
|
|
657
|
+
AF_BLUETOOTH: int
|
|
658
|
+
|
|
659
|
+
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
|
660
|
+
# Linux and some BSD support is explicit in the docs
|
|
661
|
+
# Windows and macOS do not support in practice
|
|
662
|
+
BTPROTO_HCI: int
|
|
663
|
+
BTPROTO_L2CAP: int
|
|
664
|
+
BTPROTO_SCO: int # not in FreeBSD
|
|
665
|
+
if sys.platform != "darwin" and sys.platform != "linux":
|
|
666
|
+
if sys.version_info >= (3, 9) or sys.platform != "win32":
|
|
667
|
+
BTPROTO_RFCOMM: int
|
|
668
|
+
|
|
669
|
+
if sys.version_info >= (3, 9) and sys.platform == "linux":
|
|
670
|
+
UDPLITE_RECV_CSCOV: int
|
|
671
|
+
UDPLITE_SEND_CSCOV: int
|
|
672
|
+
|
|
673
|
+
# --------------------
|
|
674
|
+
# Documented under socket.shutdown
|
|
675
|
+
# --------------------
|
|
676
|
+
SHUT_RD: int
|
|
677
|
+
SHUT_RDWR: int
|
|
678
|
+
SHUT_WR: int
|
|
679
|
+
|
|
680
|
+
# --------------------
|
|
681
|
+
# Undocumented constants
|
|
682
|
+
# --------------------
|
|
683
|
+
|
|
684
|
+
# Undocumented address families
|
|
685
|
+
AF_APPLETALK: int
|
|
686
|
+
AF_DECnet: int
|
|
687
|
+
AF_IPX: int
|
|
688
|
+
AF_SNA: int
|
|
689
|
+
|
|
690
|
+
if sys.platform != "win32":
|
|
691
|
+
AF_ROUTE: int
|
|
692
|
+
|
|
693
|
+
if sys.platform == "darwin":
|
|
694
|
+
AF_SYSTEM: int
|
|
695
|
+
|
|
696
|
+
if sys.platform != "darwin":
|
|
697
|
+
AF_IRDA: int
|
|
698
|
+
|
|
699
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
700
|
+
AF_ASH: int
|
|
701
|
+
AF_ATMPVC: int
|
|
702
|
+
AF_ATMSVC: int
|
|
703
|
+
AF_AX25: int
|
|
704
|
+
AF_BRIDGE: int
|
|
705
|
+
AF_ECONET: int
|
|
706
|
+
AF_KEY: int
|
|
707
|
+
AF_LLC: int
|
|
708
|
+
AF_NETBEUI: int
|
|
709
|
+
AF_NETROM: int
|
|
710
|
+
AF_PPPOX: int
|
|
711
|
+
AF_ROSE: int
|
|
712
|
+
AF_SECURITY: int
|
|
713
|
+
AF_WANPIPE: int
|
|
714
|
+
AF_X25: int
|
|
715
|
+
|
|
716
|
+
# Miscellaneous undocumented
|
|
717
|
+
|
|
718
|
+
if sys.platform != "win32" and sys.platform != "linux":
|
|
719
|
+
LOCAL_PEERCRED: int
|
|
720
|
+
|
|
721
|
+
if sys.platform != "win32" and sys.platform != "darwin":
|
|
722
|
+
# Defined in linux socket.h, but this isn't always present for
|
|
723
|
+
# some reason.
|
|
724
|
+
IPX_TYPE: int
|
|
725
|
+
|
|
726
|
+
# ===== Classes =====
|
|
727
|
+
|
|
728
|
+
class socket:
|
|
729
|
+
"""
|
|
730
|
+
socket(family=AF_INET, type=SOCK_STREAM, proto=0) -> socket object
|
|
731
|
+
socket(family=-1, type=-1, proto=-1, fileno=None) -> socket object
|
|
732
|
+
|
|
733
|
+
Open a socket of the given type. The family argument specifies the
|
|
734
|
+
address family; it defaults to AF_INET. The type argument specifies
|
|
735
|
+
whether this is a stream (SOCK_STREAM, this is the default)
|
|
736
|
+
or datagram (SOCK_DGRAM) socket. The protocol argument defaults to 0,
|
|
737
|
+
specifying the default protocol. Keyword arguments are accepted.
|
|
738
|
+
The socket is created as non-inheritable.
|
|
739
|
+
|
|
740
|
+
When a fileno is passed in, family, type and proto are auto-detected,
|
|
741
|
+
unless they are explicitly set.
|
|
742
|
+
|
|
743
|
+
A socket object represents one endpoint of a network connection.
|
|
744
|
+
|
|
745
|
+
Methods of socket objects (keyword arguments not allowed):
|
|
746
|
+
|
|
747
|
+
_accept() -- accept connection, returning new socket fd and client address
|
|
748
|
+
bind(addr) -- bind the socket to a local address
|
|
749
|
+
close() -- close the socket
|
|
750
|
+
connect(addr) -- connect the socket to a remote address
|
|
751
|
+
connect_ex(addr) -- connect, return an error code instead of an exception
|
|
752
|
+
dup() -- return a new socket fd duplicated from fileno()
|
|
753
|
+
fileno() -- return underlying file descriptor
|
|
754
|
+
getpeername() -- return remote address [*]
|
|
755
|
+
getsockname() -- return local address
|
|
756
|
+
getsockopt(level, optname[, buflen]) -- get socket options
|
|
757
|
+
gettimeout() -- return timeout or None
|
|
758
|
+
listen([n]) -- start listening for incoming connections
|
|
759
|
+
recv(buflen[, flags]) -- receive data
|
|
760
|
+
recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)
|
|
761
|
+
recvfrom(buflen[, flags]) -- receive data and sender's address
|
|
762
|
+
recvfrom_into(buffer[, nbytes, [, flags])
|
|
763
|
+
-- receive data and sender's address (into a buffer)
|
|
764
|
+
sendall(data[, flags]) -- send all data
|
|
765
|
+
send(data[, flags]) -- send data, may not send all of it
|
|
766
|
+
sendto(data[, flags], addr) -- send data to a given address
|
|
767
|
+
setblocking(bool) -- set or clear the blocking I/O flag
|
|
768
|
+
getblocking() -- return True if socket is blocking, False if non-blocking
|
|
769
|
+
setsockopt(level, optname, value[, optlen]) -- set socket options
|
|
770
|
+
settimeout(None | float) -- set or clear the timeout
|
|
771
|
+
shutdown(how) -- shut down traffic in one or both directions
|
|
772
|
+
|
|
773
|
+
[*] not available on all platforms!
|
|
774
|
+
"""
|
|
775
|
+
@property
|
|
776
|
+
def family(self) -> int:
|
|
777
|
+
"""the socket family"""
|
|
778
|
+
...
|
|
779
|
+
@property
|
|
780
|
+
def type(self) -> int:
|
|
781
|
+
"""the socket type"""
|
|
782
|
+
...
|
|
783
|
+
@property
|
|
784
|
+
def proto(self) -> int:
|
|
785
|
+
"""the socket protocol"""
|
|
786
|
+
...
|
|
787
|
+
# F811: "Redefinition of unused `timeout`"
|
|
788
|
+
@property
|
|
789
|
+
def timeout(self) -> float | None:
|
|
790
|
+
"""the socket timeout"""
|
|
791
|
+
...
|
|
792
|
+
if sys.platform == "win32":
|
|
793
|
+
def __init__(
|
|
794
|
+
self, family: int = ..., type: int = ..., proto: int = ..., fileno: SupportsIndex | bytes | None = ...
|
|
795
|
+
) -> None: ...
|
|
796
|
+
else:
|
|
797
|
+
def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: SupportsIndex | None = ...) -> None: ...
|
|
798
|
+
|
|
799
|
+
def bind(self, address: _Address, /) -> None:
|
|
800
|
+
"""
|
|
801
|
+
bind(address)
|
|
802
|
+
|
|
803
|
+
Bind the socket to a local address. For IP sockets, the address is a
|
|
804
|
+
pair (host, port); the host must refer to the local host. For raw packet
|
|
805
|
+
sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
|
806
|
+
"""
|
|
807
|
+
...
|
|
808
|
+
def close(self) -> None:
|
|
809
|
+
"""
|
|
810
|
+
close()
|
|
811
|
+
|
|
812
|
+
Close the socket. It cannot be used after this call.
|
|
813
|
+
"""
|
|
814
|
+
...
|
|
815
|
+
def connect(self, address: _Address, /) -> None:
|
|
816
|
+
"""
|
|
817
|
+
connect(address)
|
|
818
|
+
|
|
819
|
+
Connect the socket to a remote address. For IP sockets, the address
|
|
820
|
+
is a pair (host, port).
|
|
821
|
+
"""
|
|
822
|
+
...
|
|
823
|
+
def connect_ex(self, address: _Address, /) -> int:
|
|
824
|
+
"""
|
|
825
|
+
connect_ex(address) -> errno
|
|
826
|
+
|
|
827
|
+
This is like connect(address), but returns an error code (the errno value)
|
|
828
|
+
instead of raising an exception when an error occurs.
|
|
829
|
+
"""
|
|
830
|
+
...
|
|
831
|
+
def detach(self) -> int:
|
|
832
|
+
"""
|
|
833
|
+
detach()
|
|
834
|
+
|
|
835
|
+
Close the socket object without closing the underlying file descriptor.
|
|
836
|
+
The object cannot be used after this call, but the file descriptor
|
|
837
|
+
can be reused for other purposes. The file descriptor is returned.
|
|
838
|
+
"""
|
|
839
|
+
...
|
|
840
|
+
def fileno(self) -> int:
|
|
841
|
+
"""
|
|
842
|
+
fileno() -> integer
|
|
843
|
+
|
|
844
|
+
Return the integer file descriptor of the socket.
|
|
845
|
+
"""
|
|
846
|
+
...
|
|
847
|
+
def getpeername(self) -> _RetAddress:
|
|
848
|
+
"""
|
|
849
|
+
getpeername() -> address info
|
|
850
|
+
|
|
851
|
+
Return the address of the remote endpoint. For IP sockets, the address
|
|
852
|
+
info is a pair (hostaddr, port).
|
|
853
|
+
"""
|
|
854
|
+
...
|
|
855
|
+
def getsockname(self) -> _RetAddress:
|
|
856
|
+
"""
|
|
857
|
+
getsockname() -> address info
|
|
858
|
+
|
|
859
|
+
Return the address of the local endpoint. The format depends on the
|
|
860
|
+
address family. For IPv4 sockets, the address info is a pair
|
|
861
|
+
(hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
|
|
862
|
+
(hostaddr, port, flowinfo, scope_id).
|
|
863
|
+
"""
|
|
864
|
+
...
|
|
865
|
+
@overload
|
|
866
|
+
def getsockopt(self, level: int, optname: int, /) -> int:
|
|
867
|
+
"""
|
|
868
|
+
getsockopt(level, option[, buffersize]) -> value
|
|
869
|
+
|
|
870
|
+
Get a socket option. See the Unix manual for level and option.
|
|
871
|
+
If a nonzero buffersize argument is given, the return value is a
|
|
872
|
+
string of that length; otherwise it is an integer.
|
|
873
|
+
"""
|
|
874
|
+
...
|
|
875
|
+
@overload
|
|
876
|
+
def getsockopt(self, level: int, optname: int, buflen: int, /) -> bytes:
|
|
877
|
+
"""
|
|
878
|
+
getsockopt(level, option[, buffersize]) -> value
|
|
879
|
+
|
|
880
|
+
Get a socket option. See the Unix manual for level and option.
|
|
881
|
+
If a nonzero buffersize argument is given, the return value is a
|
|
882
|
+
string of that length; otherwise it is an integer.
|
|
883
|
+
"""
|
|
884
|
+
...
|
|
885
|
+
def getblocking(self) -> bool:
|
|
886
|
+
"""
|
|
887
|
+
getblocking()
|
|
888
|
+
|
|
889
|
+
Returns True if socket is in blocking mode, or False if it
|
|
890
|
+
is in non-blocking mode.
|
|
891
|
+
"""
|
|
892
|
+
...
|
|
893
|
+
def gettimeout(self) -> float | None:
|
|
894
|
+
"""
|
|
895
|
+
gettimeout() -> timeout
|
|
896
|
+
|
|
897
|
+
Returns the timeout in seconds (float) associated with socket
|
|
898
|
+
operations. A timeout of None indicates that timeouts on socket
|
|
899
|
+
operations are disabled.
|
|
900
|
+
"""
|
|
901
|
+
...
|
|
902
|
+
if sys.platform == "win32":
|
|
903
|
+
def ioctl(self, control: int, option: int | tuple[int, int, int] | bool, /) -> None: ...
|
|
904
|
+
|
|
905
|
+
def listen(self, backlog: int = ..., /) -> None:
|
|
906
|
+
"""
|
|
907
|
+
listen([backlog])
|
|
908
|
+
|
|
909
|
+
Enable a server to accept connections. If backlog is specified, it must be
|
|
910
|
+
at least 0 (if it is lower, it is set to 0); it specifies the number of
|
|
911
|
+
unaccepted connections that the system will allow before refusing new
|
|
912
|
+
connections. If not specified, a default reasonable value is chosen.
|
|
913
|
+
"""
|
|
914
|
+
...
|
|
915
|
+
def recv(self, bufsize: int, flags: int = ..., /) -> bytes:
|
|
916
|
+
"""
|
|
917
|
+
recv(buffersize[, flags]) -> data
|
|
918
|
+
|
|
919
|
+
Receive up to buffersize bytes from the socket. For the optional flags
|
|
920
|
+
argument, see the Unix manual. When no data is available, block until
|
|
921
|
+
at least one byte is available or until the remote end is closed. When
|
|
922
|
+
the remote end is closed and all data is read, return the empty string.
|
|
923
|
+
"""
|
|
924
|
+
...
|
|
925
|
+
def recvfrom(self, bufsize: int, flags: int = ..., /) -> tuple[bytes, _RetAddress]:
|
|
926
|
+
"""
|
|
927
|
+
recvfrom(buffersize[, flags]) -> (data, address info)
|
|
928
|
+
|
|
929
|
+
Like recv(buffersize, flags) but also return the sender's address info.
|
|
930
|
+
"""
|
|
931
|
+
...
|
|
932
|
+
if sys.platform != "win32":
|
|
933
|
+
def recvmsg(self, bufsize: int, ancbufsize: int = ..., flags: int = ..., /) -> tuple[bytes, list[_CMSG], int, Any]:
|
|
934
|
+
"""
|
|
935
|
+
recvmsg(bufsize[, ancbufsize[, flags]]) -> (data, ancdata, msg_flags, address)
|
|
936
|
+
|
|
937
|
+
Receive normal data (up to bufsize bytes) and ancillary data from the
|
|
938
|
+
socket. The ancbufsize argument sets the size in bytes of the
|
|
939
|
+
internal buffer used to receive the ancillary data; it defaults to 0,
|
|
940
|
+
meaning that no ancillary data will be received. Appropriate buffer
|
|
941
|
+
sizes for ancillary data can be calculated using CMSG_SPACE() or
|
|
942
|
+
CMSG_LEN(), and items which do not fit into the buffer might be
|
|
943
|
+
truncated or discarded. The flags argument defaults to 0 and has the
|
|
944
|
+
same meaning as for recv().
|
|
945
|
+
|
|
946
|
+
The return value is a 4-tuple: (data, ancdata, msg_flags, address).
|
|
947
|
+
The data item is a bytes object holding the non-ancillary data
|
|
948
|
+
received. The ancdata item is a list of zero or more tuples
|
|
949
|
+
(cmsg_level, cmsg_type, cmsg_data) representing the ancillary data
|
|
950
|
+
(control messages) received: cmsg_level and cmsg_type are integers
|
|
951
|
+
specifying the protocol level and protocol-specific type respectively,
|
|
952
|
+
and cmsg_data is a bytes object holding the associated data. The
|
|
953
|
+
msg_flags item is the bitwise OR of various flags indicating
|
|
954
|
+
conditions on the received message; see your system documentation for
|
|
955
|
+
details. If the receiving socket is unconnected, address is the
|
|
956
|
+
address of the sending socket, if available; otherwise, its value is
|
|
957
|
+
unspecified.
|
|
958
|
+
|
|
959
|
+
If recvmsg() raises an exception after the system call returns, it
|
|
960
|
+
will first attempt to close any file descriptors received via the
|
|
961
|
+
SCM_RIGHTS mechanism.
|
|
962
|
+
"""
|
|
963
|
+
...
|
|
964
|
+
def recvmsg_into(
|
|
965
|
+
self, buffers: Iterable[WriteableBuffer], ancbufsize: int = ..., flags: int = ..., /
|
|
966
|
+
) -> tuple[int, list[_CMSG], int, Any]:
|
|
967
|
+
"""
|
|
968
|
+
recvmsg_into(buffers[, ancbufsize[, flags]]) -> (nbytes, ancdata, msg_flags, address)
|
|
969
|
+
|
|
970
|
+
Receive normal data and ancillary data from the socket, scattering the
|
|
971
|
+
non-ancillary data into a series of buffers. The buffers argument
|
|
972
|
+
must be an iterable of objects that export writable buffers
|
|
973
|
+
(e.g. bytearray objects); these will be filled with successive chunks
|
|
974
|
+
of the non-ancillary data until it has all been written or there are
|
|
975
|
+
no more buffers. The ancbufsize argument sets the size in bytes of
|
|
976
|
+
the internal buffer used to receive the ancillary data; it defaults to
|
|
977
|
+
0, meaning that no ancillary data will be received. Appropriate
|
|
978
|
+
buffer sizes for ancillary data can be calculated using CMSG_SPACE()
|
|
979
|
+
or CMSG_LEN(), and items which do not fit into the buffer might be
|
|
980
|
+
truncated or discarded. The flags argument defaults to 0 and has the
|
|
981
|
+
same meaning as for recv().
|
|
982
|
+
|
|
983
|
+
The return value is a 4-tuple: (nbytes, ancdata, msg_flags, address).
|
|
984
|
+
The nbytes item is the total number of bytes of non-ancillary data
|
|
985
|
+
written into the buffers. The ancdata item is a list of zero or more
|
|
986
|
+
tuples (cmsg_level, cmsg_type, cmsg_data) representing the ancillary
|
|
987
|
+
data (control messages) received: cmsg_level and cmsg_type are
|
|
988
|
+
integers specifying the protocol level and protocol-specific type
|
|
989
|
+
respectively, and cmsg_data is a bytes object holding the associated
|
|
990
|
+
data. The msg_flags item is the bitwise OR of various flags
|
|
991
|
+
indicating conditions on the received message; see your system
|
|
992
|
+
documentation for details. If the receiving socket is unconnected,
|
|
993
|
+
address is the address of the sending socket, if available; otherwise,
|
|
994
|
+
its value is unspecified.
|
|
995
|
+
|
|
996
|
+
If recvmsg_into() raises an exception after the system call returns,
|
|
997
|
+
it will first attempt to close any file descriptors received via the
|
|
998
|
+
SCM_RIGHTS mechanism.
|
|
999
|
+
"""
|
|
1000
|
+
...
|
|
1001
|
+
|
|
1002
|
+
def recvfrom_into(self, buffer: WriteableBuffer, nbytes: int = ..., flags: int = ...) -> tuple[int, _RetAddress]:
|
|
1003
|
+
"""
|
|
1004
|
+
recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
|
1005
|
+
|
|
1006
|
+
Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
|
1007
|
+
"""
|
|
1008
|
+
...
|
|
1009
|
+
def recv_into(self, buffer: WriteableBuffer, nbytes: int = ..., flags: int = ...) -> int:
|
|
1010
|
+
"""
|
|
1011
|
+
recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
|
1012
|
+
|
|
1013
|
+
A version of recv() that stores its data into a buffer rather than creating
|
|
1014
|
+
a new string. Receive up to buffersize bytes from the socket. If buffersize
|
|
1015
|
+
is not specified (or 0), receive up to the size available in the given buffer.
|
|
1016
|
+
|
|
1017
|
+
See recv() for documentation about the flags.
|
|
1018
|
+
"""
|
|
1019
|
+
...
|
|
1020
|
+
def send(self, data: ReadableBuffer, flags: int = ..., /) -> int:
|
|
1021
|
+
"""
|
|
1022
|
+
send(data[, flags]) -> count
|
|
1023
|
+
|
|
1024
|
+
Send a data string to the socket. For the optional flags
|
|
1025
|
+
argument, see the Unix manual. Return the number of bytes
|
|
1026
|
+
sent; this may be less than len(data) if the network is busy.
|
|
1027
|
+
"""
|
|
1028
|
+
...
|
|
1029
|
+
def sendall(self, data: ReadableBuffer, flags: int = ..., /) -> None:
|
|
1030
|
+
"""
|
|
1031
|
+
sendall(data[, flags])
|
|
1032
|
+
|
|
1033
|
+
Send a data string to the socket. For the optional flags
|
|
1034
|
+
argument, see the Unix manual. This calls send() repeatedly
|
|
1035
|
+
until all data is sent. If an error occurs, it's impossible
|
|
1036
|
+
to tell how much data has been sent.
|
|
1037
|
+
"""
|
|
1038
|
+
...
|
|
1039
|
+
@overload
|
|
1040
|
+
def sendto(self, data: ReadableBuffer, address: _Address, /) -> int:
|
|
1041
|
+
"""
|
|
1042
|
+
sendto(data[, flags], address) -> count
|
|
1043
|
+
|
|
1044
|
+
Like send(data, flags) but allows specifying the destination address.
|
|
1045
|
+
For IP sockets, the address is a pair (hostaddr, port).
|
|
1046
|
+
"""
|
|
1047
|
+
...
|
|
1048
|
+
@overload
|
|
1049
|
+
def sendto(self, data: ReadableBuffer, flags: int, address: _Address, /) -> int:
|
|
1050
|
+
"""
|
|
1051
|
+
sendto(data[, flags], address) -> count
|
|
1052
|
+
|
|
1053
|
+
Like send(data, flags) but allows specifying the destination address.
|
|
1054
|
+
For IP sockets, the address is a pair (hostaddr, port).
|
|
1055
|
+
"""
|
|
1056
|
+
...
|
|
1057
|
+
if sys.platform != "win32":
|
|
1058
|
+
def sendmsg(
|
|
1059
|
+
self,
|
|
1060
|
+
buffers: Iterable[ReadableBuffer],
|
|
1061
|
+
ancdata: Iterable[_CMSGArg] = ...,
|
|
1062
|
+
flags: int = ...,
|
|
1063
|
+
address: _Address | None = ...,
|
|
1064
|
+
/,
|
|
1065
|
+
) -> int:
|
|
1066
|
+
"""
|
|
1067
|
+
sendmsg(buffers[, ancdata[, flags[, address]]]) -> count
|
|
1068
|
+
|
|
1069
|
+
Send normal and ancillary data to the socket, gathering the
|
|
1070
|
+
non-ancillary data from a series of buffers and concatenating it into
|
|
1071
|
+
a single message. The buffers argument specifies the non-ancillary
|
|
1072
|
+
data as an iterable of bytes-like objects (e.g. bytes objects).
|
|
1073
|
+
The ancdata argument specifies the ancillary data (control messages)
|
|
1074
|
+
as an iterable of zero or more tuples (cmsg_level, cmsg_type,
|
|
1075
|
+
cmsg_data), where cmsg_level and cmsg_type are integers specifying the
|
|
1076
|
+
protocol level and protocol-specific type respectively, and cmsg_data
|
|
1077
|
+
is a bytes-like object holding the associated data. The flags
|
|
1078
|
+
argument defaults to 0 and has the same meaning as for send(). If
|
|
1079
|
+
address is supplied and not None, it sets a destination address for
|
|
1080
|
+
the message. The return value is the number of bytes of non-ancillary
|
|
1081
|
+
data sent.
|
|
1082
|
+
"""
|
|
1083
|
+
...
|
|
1084
|
+
if sys.platform == "linux":
|
|
1085
|
+
def sendmsg_afalg(
|
|
1086
|
+
self, msg: Iterable[ReadableBuffer] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = ...
|
|
1087
|
+
) -> int: ...
|
|
1088
|
+
|
|
1089
|
+
def setblocking(self, flag: bool, /) -> None:
|
|
1090
|
+
"""
|
|
1091
|
+
setblocking(flag)
|
|
1092
|
+
|
|
1093
|
+
Set the socket to blocking (flag is true) or non-blocking (false).
|
|
1094
|
+
setblocking(True) is equivalent to settimeout(None);
|
|
1095
|
+
setblocking(False) is equivalent to settimeout(0.0).
|
|
1096
|
+
"""
|
|
1097
|
+
...
|
|
1098
|
+
def settimeout(self, value: float | None, /) -> None:
|
|
1099
|
+
"""
|
|
1100
|
+
settimeout(timeout)
|
|
1101
|
+
|
|
1102
|
+
Set a timeout on socket operations. 'timeout' can be a float,
|
|
1103
|
+
giving in seconds, or None. Setting a timeout of None disables
|
|
1104
|
+
the timeout feature and is equivalent to setblocking(1).
|
|
1105
|
+
Setting a timeout of zero is the same as setblocking(0).
|
|
1106
|
+
"""
|
|
1107
|
+
...
|
|
1108
|
+
@overload
|
|
1109
|
+
def setsockopt(self, level: int, optname: int, value: int | ReadableBuffer, /) -> None:
|
|
1110
|
+
"""
|
|
1111
|
+
setsockopt(level, option, value: int)
|
|
1112
|
+
setsockopt(level, option, value: buffer)
|
|
1113
|
+
setsockopt(level, option, None, optlen: int)
|
|
1114
|
+
|
|
1115
|
+
Set a socket option. See the Unix manual for level and option.
|
|
1116
|
+
The value argument can either be an integer, a string buffer, or
|
|
1117
|
+
None, optlen.
|
|
1118
|
+
"""
|
|
1119
|
+
...
|
|
1120
|
+
@overload
|
|
1121
|
+
def setsockopt(self, level: int, optname: int, value: None, optlen: int, /) -> None:
|
|
1122
|
+
"""
|
|
1123
|
+
setsockopt(level, option, value: int)
|
|
1124
|
+
setsockopt(level, option, value: buffer)
|
|
1125
|
+
setsockopt(level, option, None, optlen: int)
|
|
1126
|
+
|
|
1127
|
+
Set a socket option. See the Unix manual for level and option.
|
|
1128
|
+
The value argument can either be an integer, a string buffer, or
|
|
1129
|
+
None, optlen.
|
|
1130
|
+
"""
|
|
1131
|
+
...
|
|
1132
|
+
if sys.platform == "win32":
|
|
1133
|
+
def share(self, process_id: int, /) -> bytes: ...
|
|
1134
|
+
|
|
1135
|
+
def shutdown(self, how: int, /) -> None:
|
|
1136
|
+
"""
|
|
1137
|
+
shutdown(flag)
|
|
1138
|
+
|
|
1139
|
+
Shut down the reading side of the socket (flag == SHUT_RD), the writing side
|
|
1140
|
+
of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
|
1141
|
+
"""
|
|
1142
|
+
...
|
|
1143
|
+
|
|
1144
|
+
SocketType = socket
|
|
1145
|
+
|
|
1146
|
+
# ===== Functions =====
|
|
1147
|
+
|
|
1148
|
+
def close(fd: SupportsIndex, /) -> None:
|
|
1149
|
+
"""
|
|
1150
|
+
close(integer) -> None
|
|
1151
|
+
|
|
1152
|
+
Close an integer socket file descriptor. This is like os.close(), but for
|
|
1153
|
+
sockets; on some platforms os.close() won't work for socket file descriptors.
|
|
1154
|
+
"""
|
|
1155
|
+
...
|
|
1156
|
+
def dup(fd: SupportsIndex, /) -> int:
|
|
1157
|
+
"""
|
|
1158
|
+
dup(integer) -> integer
|
|
1159
|
+
|
|
1160
|
+
Duplicate an integer socket file descriptor. This is like os.dup(), but for
|
|
1161
|
+
sockets; on some platforms os.dup() won't work for socket file descriptors.
|
|
1162
|
+
"""
|
|
1163
|
+
...
|
|
1164
|
+
|
|
1165
|
+
# the 5th tuple item is an address
|
|
1166
|
+
def getaddrinfo(
|
|
1167
|
+
host: bytes | str | None,
|
|
1168
|
+
port: bytes | str | int | None,
|
|
1169
|
+
family: int = ...,
|
|
1170
|
+
type: int = ...,
|
|
1171
|
+
proto: int = ...,
|
|
1172
|
+
flags: int = ...,
|
|
1173
|
+
) -> list[tuple[int, int, int, str, tuple[str, int] | tuple[str, int, int, int]]]:
|
|
1174
|
+
"""
|
|
1175
|
+
getaddrinfo(host, port [, family, type, proto, flags])
|
|
1176
|
+
-> list of (family, type, proto, canonname, sockaddr)
|
|
1177
|
+
|
|
1178
|
+
Resolve host and port into addrinfo struct.
|
|
1179
|
+
"""
|
|
1180
|
+
...
|
|
1181
|
+
def gethostbyname(hostname: str, /) -> str:
|
|
1182
|
+
"""
|
|
1183
|
+
gethostbyname(host) -> address
|
|
1184
|
+
|
|
1185
|
+
Return the IP address (a string of the form '255.255.255.255') for a host.
|
|
1186
|
+
"""
|
|
1187
|
+
...
|
|
1188
|
+
def gethostbyname_ex(hostname: str, /) -> tuple[str, list[str], list[str]]:
|
|
1189
|
+
"""
|
|
1190
|
+
gethostbyname_ex(host) -> (name, aliaslist, addresslist)
|
|
1191
|
+
|
|
1192
|
+
Return the true host name, a list of aliases, and a list of IP addresses,
|
|
1193
|
+
for a host. The host argument is a string giving a host name or IP number.
|
|
1194
|
+
"""
|
|
1195
|
+
...
|
|
1196
|
+
def gethostname() -> str:
|
|
1197
|
+
"""
|
|
1198
|
+
gethostname() -> string
|
|
1199
|
+
|
|
1200
|
+
Return the current host name.
|
|
1201
|
+
"""
|
|
1202
|
+
...
|
|
1203
|
+
def gethostbyaddr(ip_address: str, /) -> tuple[str, list[str], list[str]]:
|
|
1204
|
+
"""
|
|
1205
|
+
gethostbyaddr(host) -> (name, aliaslist, addresslist)
|
|
1206
|
+
|
|
1207
|
+
Return the true host name, a list of aliases, and a list of IP addresses,
|
|
1208
|
+
for a host. The host argument is a string giving a host name or IP number.
|
|
1209
|
+
"""
|
|
1210
|
+
...
|
|
1211
|
+
def getnameinfo(sockaddr: tuple[str, int] | tuple[str, int, int, int], flags: int, /) -> tuple[str, str]:
|
|
1212
|
+
"""
|
|
1213
|
+
getnameinfo(sockaddr, flags) --> (host, port)
|
|
1214
|
+
|
|
1215
|
+
Get host and port for a sockaddr.
|
|
1216
|
+
"""
|
|
1217
|
+
...
|
|
1218
|
+
def getprotobyname(protocolname: str, /) -> int:
|
|
1219
|
+
"""
|
|
1220
|
+
getprotobyname(name) -> integer
|
|
1221
|
+
|
|
1222
|
+
Return the protocol number for the named protocol. (Rarely used.)
|
|
1223
|
+
"""
|
|
1224
|
+
...
|
|
1225
|
+
def getservbyname(servicename: str, protocolname: str = ..., /) -> int:
|
|
1226
|
+
"""
|
|
1227
|
+
getservbyname(servicename[, protocolname]) -> integer
|
|
1228
|
+
|
|
1229
|
+
Return a port number from a service name and protocol name.
|
|
1230
|
+
The optional protocol name, if given, should be 'tcp' or 'udp',
|
|
1231
|
+
otherwise any protocol will match.
|
|
1232
|
+
"""
|
|
1233
|
+
...
|
|
1234
|
+
def getservbyport(port: int, protocolname: str = ..., /) -> str:
|
|
1235
|
+
"""
|
|
1236
|
+
getservbyport(port[, protocolname]) -> string
|
|
1237
|
+
|
|
1238
|
+
Return the service name from a port number and protocol name.
|
|
1239
|
+
The optional protocol name, if given, should be 'tcp' or 'udp',
|
|
1240
|
+
otherwise any protocol will match.
|
|
1241
|
+
"""
|
|
1242
|
+
...
|
|
1243
|
+
def ntohl(x: int, /) -> int:
|
|
1244
|
+
"""
|
|
1245
|
+
ntohl(integer) -> integer
|
|
1246
|
+
|
|
1247
|
+
Convert a 32-bit integer from network to host byte order.
|
|
1248
|
+
"""
|
|
1249
|
+
...
|
|
1250
|
+
def ntohs(x: int, /) -> int:
|
|
1251
|
+
"""Convert a 16-bit unsigned integer from network to host byte order."""
|
|
1252
|
+
...
|
|
1253
|
+
def htonl(x: int, /) -> int:
|
|
1254
|
+
"""
|
|
1255
|
+
htonl(integer) -> integer
|
|
1256
|
+
|
|
1257
|
+
Convert a 32-bit integer from host to network byte order.
|
|
1258
|
+
"""
|
|
1259
|
+
...
|
|
1260
|
+
def htons(x: int, /) -> int:
|
|
1261
|
+
"""Convert a 16-bit unsigned integer from host to network byte order."""
|
|
1262
|
+
...
|
|
1263
|
+
def inet_aton(ip_addr: str, /) -> bytes:
|
|
1264
|
+
"""Convert an IP address in string format (123.45.67.89) to the 32-bit packed binary format used in low-level network functions."""
|
|
1265
|
+
...
|
|
1266
|
+
def inet_ntoa(packed_ip: ReadableBuffer, /) -> str:
|
|
1267
|
+
"""Convert an IP address from 32-bit packed binary format to string format."""
|
|
1268
|
+
...
|
|
1269
|
+
def inet_pton(address_family: int, ip_string: str, /) -> bytes:
|
|
1270
|
+
"""
|
|
1271
|
+
inet_pton(af, ip) -> packed IP address string
|
|
1272
|
+
|
|
1273
|
+
Convert an IP address from string format to a packed string suitable
|
|
1274
|
+
for use with low-level network functions.
|
|
1275
|
+
"""
|
|
1276
|
+
...
|
|
1277
|
+
def inet_ntop(address_family: int, packed_ip: ReadableBuffer, /) -> str:
|
|
1278
|
+
"""
|
|
1279
|
+
inet_ntop(af, packed_ip) -> string formatted IP address
|
|
1280
|
+
|
|
1281
|
+
Convert a packed IP address of the given family to string format.
|
|
1282
|
+
"""
|
|
1283
|
+
...
|
|
1284
|
+
def getdefaulttimeout() -> float | None:
|
|
1285
|
+
"""
|
|
1286
|
+
getdefaulttimeout() -> timeout
|
|
1287
|
+
|
|
1288
|
+
Returns the default timeout in seconds (float) for new socket objects.
|
|
1289
|
+
A value of None indicates that new socket objects have no timeout.
|
|
1290
|
+
When the socket module is first imported, the default is None.
|
|
1291
|
+
"""
|
|
1292
|
+
...
|
|
1293
|
+
|
|
1294
|
+
# F811: "Redefinition of unused `timeout`"
|
|
1295
|
+
def setdefaulttimeout(timeout: float | None, /) -> None:
|
|
1296
|
+
"""
|
|
1297
|
+
setdefaulttimeout(timeout)
|
|
1298
|
+
|
|
1299
|
+
Set the default timeout in seconds (float) for new socket objects.
|
|
1300
|
+
A value of None indicates that new socket objects have no timeout.
|
|
1301
|
+
When the socket module is first imported, the default is None.
|
|
1302
|
+
"""
|
|
1303
|
+
...
|
|
1304
|
+
|
|
1305
|
+
if sys.platform != "win32":
|
|
1306
|
+
def sethostname(name: str, /) -> None:
|
|
1307
|
+
"""
|
|
1308
|
+
sethostname(name)
|
|
1309
|
+
|
|
1310
|
+
Sets the hostname to name.
|
|
1311
|
+
"""
|
|
1312
|
+
...
|
|
1313
|
+
def CMSG_LEN(length: int, /) -> int:
|
|
1314
|
+
"""
|
|
1315
|
+
CMSG_LEN(length) -> control message length
|
|
1316
|
+
|
|
1317
|
+
Return the total length, without trailing padding, of an ancillary
|
|
1318
|
+
data item with associated data of the given length. This value can
|
|
1319
|
+
often be used as the buffer size for recvmsg() to receive a single
|
|
1320
|
+
item of ancillary data, but RFC 3542 requires portable applications to
|
|
1321
|
+
use CMSG_SPACE() and thus include space for padding, even when the
|
|
1322
|
+
item will be the last in the buffer. Raises OverflowError if length
|
|
1323
|
+
is outside the permissible range of values.
|
|
1324
|
+
"""
|
|
1325
|
+
...
|
|
1326
|
+
def CMSG_SPACE(length: int, /) -> int:
|
|
1327
|
+
"""
|
|
1328
|
+
CMSG_SPACE(length) -> buffer size
|
|
1329
|
+
|
|
1330
|
+
Return the buffer size needed for recvmsg() to receive an ancillary
|
|
1331
|
+
data item with associated data of the given length, along with any
|
|
1332
|
+
trailing padding. The buffer space needed to receive multiple items
|
|
1333
|
+
is the sum of the CMSG_SPACE() values for their associated data
|
|
1334
|
+
lengths. Raises OverflowError if length is outside the permissible
|
|
1335
|
+
range of values.
|
|
1336
|
+
"""
|
|
1337
|
+
...
|
|
1338
|
+
def socketpair(family: int = ..., type: int = ..., proto: int = ..., /) -> tuple[socket, socket]:
|
|
1339
|
+
"""
|
|
1340
|
+
socketpair([family[, type [, proto]]]) -> (socket object, socket object)
|
|
1341
|
+
|
|
1342
|
+
Create a pair of socket objects from the sockets returned by the platform
|
|
1343
|
+
socketpair() function.
|
|
1344
|
+
The arguments are the same as for socket() except the default family is
|
|
1345
|
+
AF_UNIX if defined on the platform; otherwise, the default is AF_INET.
|
|
1346
|
+
"""
|
|
1347
|
+
...
|
|
1348
|
+
|
|
1349
|
+
def if_nameindex() -> list[tuple[int, str]]:
|
|
1350
|
+
"""
|
|
1351
|
+
if_nameindex()
|
|
1352
|
+
|
|
1353
|
+
Returns a list of network interface information (index, name) tuples.
|
|
1354
|
+
"""
|
|
1355
|
+
...
|
|
1356
|
+
def if_nametoindex(oname: str, /) -> int:
|
|
1357
|
+
"""Returns the interface index corresponding to the interface name if_name."""
|
|
1358
|
+
...
|
|
1359
|
+
def if_indextoname(index: int, /) -> str:
|
|
1360
|
+
"""
|
|
1361
|
+
if_indextoname(if_index)
|
|
1362
|
+
|
|
1363
|
+
Returns the interface name corresponding to the interface index if_index.
|
|
1364
|
+
"""
|
|
1365
|
+
...
|
|
1366
|
+
|
|
1367
|
+
CAPI: CapsuleType
|