basedpyright 1.22.0 → 1.22.1

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.
Files changed (280) hide show
  1. package/dist/971.js +3 -0
  2. package/dist/971.js.LICENSE.txt +27 -0
  3. package/dist/971.js.map +1 -0
  4. package/dist/pyright-langserver.js +1 -1
  5. package/dist/pyright-langserver.js.LICENSE.txt +0 -28
  6. package/dist/pyright-langserver.js.map +1 -1
  7. package/dist/pyright.js +1 -1
  8. package/dist/pyright.js.LICENSE.txt +0 -28
  9. package/dist/pyright.js.map +1 -1
  10. package/dist/typeshed-fallback/commit.txt +1 -1
  11. package/dist/typeshed-fallback/stdlib/VERSIONS +9 -0
  12. package/dist/typeshed-fallback/stdlib/_codecs.pyi +4 -1
  13. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +9 -0
  14. package/dist/typeshed-fallback/stdlib/_csv.pyi +88 -14
  15. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +186 -55
  16. package/dist/typeshed-fallback/stdlib/_curses.pyi +2 -6
  17. package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +67 -0
  18. package/dist/typeshed-fallback/stdlib/_dbm.pyi +7 -6
  19. package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
  20. package/dist/typeshed-fallback/stdlib/_hashlib.pyi +253 -0
  21. package/dist/typeshed-fallback/stdlib/_json.pyi +7 -0
  22. package/dist/typeshed-fallback/stdlib/_multibytecodec.pyi +44 -0
  23. package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +0 -1
  24. package/dist/typeshed-fallback/stdlib/_socket.pyi +92 -42
  25. package/dist/typeshed-fallback/stdlib/_thread.pyi +16 -0
  26. package/dist/typeshed-fallback/stdlib/_threading_local.pyi +4 -0
  27. package/dist/typeshed-fallback/stdlib/builtins.pyi +21 -2
  28. package/dist/typeshed-fallback/stdlib/bz2.pyi +1 -0
  29. package/dist/typeshed-fallback/stdlib/codecs.pyi +5 -1
  30. package/dist/typeshed-fallback/stdlib/configparser.pyi +17 -9
  31. package/dist/typeshed-fallback/stdlib/contextlib.pyi +9 -3
  32. package/dist/typeshed-fallback/stdlib/crypt.pyi +9 -2
  33. package/dist/typeshed-fallback/stdlib/csv.pyi +6 -4
  34. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +32 -12
  35. package/dist/typeshed-fallback/stdlib/ctypes/macholib/__init__.pyi +1 -0
  36. package/dist/typeshed-fallback/stdlib/ctypes/macholib/dyld.pyi +8 -0
  37. package/dist/typeshed-fallback/stdlib/ctypes/macholib/dylib.pyi +14 -0
  38. package/dist/typeshed-fallback/stdlib/ctypes/macholib/framework.pyi +14 -0
  39. package/dist/typeshed-fallback/stdlib/ctypes/util.pyi +2 -0
  40. package/dist/typeshed-fallback/stdlib/ctypes/wintypes.pyi +11 -5
  41. package/dist/typeshed-fallback/stdlib/curses/__init__.pyi +19 -1
  42. package/dist/typeshed-fallback/stdlib/curses/panel.pyi +1 -34
  43. package/dist/typeshed-fallback/stdlib/datetime.pyi +15 -6
  44. package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +3 -1
  45. package/dist/typeshed-fallback/stdlib/decimal.pyi +10 -1
  46. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +1 -1
  47. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
  48. package/dist/typeshed-fallback/stdlib/doctest.pyi +7 -9
  49. package/dist/typeshed-fallback/stdlib/email/__init__.pyi +23 -15
  50. package/dist/typeshed-fallback/stdlib/email/_policybase.pyi +2 -0
  51. package/dist/typeshed-fallback/stdlib/encodings/aliases.pyi +1 -0
  52. package/dist/typeshed-fallback/stdlib/encodings/ascii.pyi +30 -0
  53. package/dist/typeshed-fallback/stdlib/encodings/base64_codec.pyi +26 -0
  54. package/dist/typeshed-fallback/stdlib/encodings/big5.pyi +23 -0
  55. package/dist/typeshed-fallback/stdlib/encodings/big5hkscs.pyi +23 -0
  56. package/dist/typeshed-fallback/stdlib/encodings/bz2_codec.pyi +26 -0
  57. package/dist/typeshed-fallback/stdlib/encodings/charmap.pyi +33 -0
  58. package/dist/typeshed-fallback/stdlib/encodings/cp037.pyi +21 -0
  59. package/dist/typeshed-fallback/stdlib/encodings/cp1006.pyi +21 -0
  60. package/dist/typeshed-fallback/stdlib/encodings/cp1026.pyi +21 -0
  61. package/dist/typeshed-fallback/stdlib/encodings/cp1125.pyi +21 -0
  62. package/dist/typeshed-fallback/stdlib/encodings/cp1140.pyi +21 -0
  63. package/dist/typeshed-fallback/stdlib/encodings/cp1250.pyi +21 -0
  64. package/dist/typeshed-fallback/stdlib/encodings/cp1251.pyi +21 -0
  65. package/dist/typeshed-fallback/stdlib/encodings/cp1252.pyi +21 -0
  66. package/dist/typeshed-fallback/stdlib/encodings/cp1253.pyi +21 -0
  67. package/dist/typeshed-fallback/stdlib/encodings/cp1254.pyi +21 -0
  68. package/dist/typeshed-fallback/stdlib/encodings/cp1255.pyi +21 -0
  69. package/dist/typeshed-fallback/stdlib/encodings/cp1256.pyi +21 -0
  70. package/dist/typeshed-fallback/stdlib/encodings/cp1257.pyi +21 -0
  71. package/dist/typeshed-fallback/stdlib/encodings/cp1258.pyi +21 -0
  72. package/dist/typeshed-fallback/stdlib/encodings/cp273.pyi +21 -0
  73. package/dist/typeshed-fallback/stdlib/encodings/cp424.pyi +21 -0
  74. package/dist/typeshed-fallback/stdlib/encodings/cp437.pyi +21 -0
  75. package/dist/typeshed-fallback/stdlib/encodings/cp500.pyi +21 -0
  76. package/dist/typeshed-fallback/stdlib/encodings/cp720.pyi +21 -0
  77. package/dist/typeshed-fallback/stdlib/encodings/cp737.pyi +21 -0
  78. package/dist/typeshed-fallback/stdlib/encodings/cp775.pyi +21 -0
  79. package/dist/typeshed-fallback/stdlib/encodings/cp850.pyi +21 -0
  80. package/dist/typeshed-fallback/stdlib/encodings/cp852.pyi +21 -0
  81. package/dist/typeshed-fallback/stdlib/encodings/cp855.pyi +21 -0
  82. package/dist/typeshed-fallback/stdlib/encodings/cp856.pyi +21 -0
  83. package/dist/typeshed-fallback/stdlib/encodings/cp857.pyi +21 -0
  84. package/dist/typeshed-fallback/stdlib/encodings/cp858.pyi +21 -0
  85. package/dist/typeshed-fallback/stdlib/encodings/cp860.pyi +21 -0
  86. package/dist/typeshed-fallback/stdlib/encodings/cp861.pyi +21 -0
  87. package/dist/typeshed-fallback/stdlib/encodings/cp862.pyi +21 -0
  88. package/dist/typeshed-fallback/stdlib/encodings/cp863.pyi +21 -0
  89. package/dist/typeshed-fallback/stdlib/encodings/cp864.pyi +21 -0
  90. package/dist/typeshed-fallback/stdlib/encodings/cp865.pyi +21 -0
  91. package/dist/typeshed-fallback/stdlib/encodings/cp866.pyi +21 -0
  92. package/dist/typeshed-fallback/stdlib/encodings/cp869.pyi +21 -0
  93. package/dist/typeshed-fallback/stdlib/encodings/cp874.pyi +21 -0
  94. package/dist/typeshed-fallback/stdlib/encodings/cp875.pyi +21 -0
  95. package/dist/typeshed-fallback/stdlib/encodings/cp932.pyi +23 -0
  96. package/dist/typeshed-fallback/stdlib/encodings/cp949.pyi +23 -0
  97. package/dist/typeshed-fallback/stdlib/encodings/cp950.pyi +23 -0
  98. package/dist/typeshed-fallback/stdlib/encodings/euc_jis_2004.pyi +23 -0
  99. package/dist/typeshed-fallback/stdlib/encodings/euc_jisx0213.pyi +23 -0
  100. package/dist/typeshed-fallback/stdlib/encodings/euc_jp.pyi +23 -0
  101. package/dist/typeshed-fallback/stdlib/encodings/euc_kr.pyi +23 -0
  102. package/dist/typeshed-fallback/stdlib/encodings/gb18030.pyi +23 -0
  103. package/dist/typeshed-fallback/stdlib/encodings/gb2312.pyi +23 -0
  104. package/dist/typeshed-fallback/stdlib/encodings/gbk.pyi +23 -0
  105. package/dist/typeshed-fallback/stdlib/encodings/hex_codec.pyi +26 -0
  106. package/dist/typeshed-fallback/stdlib/encodings/hp_roman8.pyi +21 -0
  107. package/dist/typeshed-fallback/stdlib/encodings/hz.pyi +23 -0
  108. package/dist/typeshed-fallback/stdlib/encodings/idna.pyi +26 -0
  109. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp.pyi +23 -0
  110. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_1.pyi +23 -0
  111. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2.pyi +23 -0
  112. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
  113. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_3.pyi +23 -0
  114. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
  115. package/dist/typeshed-fallback/stdlib/encodings/iso2022_kr.pyi +23 -0
  116. package/dist/typeshed-fallback/stdlib/encodings/iso8859_1.pyi +21 -0
  117. package/dist/typeshed-fallback/stdlib/encodings/iso8859_10.pyi +21 -0
  118. package/dist/typeshed-fallback/stdlib/encodings/iso8859_11.pyi +21 -0
  119. package/dist/typeshed-fallback/stdlib/encodings/iso8859_13.pyi +21 -0
  120. package/dist/typeshed-fallback/stdlib/encodings/iso8859_14.pyi +21 -0
  121. package/dist/typeshed-fallback/stdlib/encodings/iso8859_15.pyi +21 -0
  122. package/dist/typeshed-fallback/stdlib/encodings/iso8859_16.pyi +21 -0
  123. package/dist/typeshed-fallback/stdlib/encodings/iso8859_2.pyi +21 -0
  124. package/dist/typeshed-fallback/stdlib/encodings/iso8859_3.pyi +21 -0
  125. package/dist/typeshed-fallback/stdlib/encodings/iso8859_4.pyi +21 -0
  126. package/dist/typeshed-fallback/stdlib/encodings/iso8859_5.pyi +21 -0
  127. package/dist/typeshed-fallback/stdlib/encodings/iso8859_6.pyi +21 -0
  128. package/dist/typeshed-fallback/stdlib/encodings/iso8859_7.pyi +21 -0
  129. package/dist/typeshed-fallback/stdlib/encodings/iso8859_8.pyi +21 -0
  130. package/dist/typeshed-fallback/stdlib/encodings/iso8859_9.pyi +21 -0
  131. package/dist/typeshed-fallback/stdlib/encodings/johab.pyi +23 -0
  132. package/dist/typeshed-fallback/stdlib/encodings/koi8_r.pyi +21 -0
  133. package/dist/typeshed-fallback/stdlib/encodings/koi8_t.pyi +21 -0
  134. package/dist/typeshed-fallback/stdlib/encodings/koi8_u.pyi +21 -0
  135. package/dist/typeshed-fallback/stdlib/encodings/kz1048.pyi +21 -0
  136. package/dist/typeshed-fallback/stdlib/encodings/latin_1.pyi +30 -0
  137. package/dist/typeshed-fallback/stdlib/encodings/mac_arabic.pyi +21 -0
  138. package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -0
  139. package/dist/typeshed-fallback/stdlib/encodings/mac_croatian.pyi +21 -0
  140. package/dist/typeshed-fallback/stdlib/encodings/mac_cyrillic.pyi +21 -0
  141. package/dist/typeshed-fallback/stdlib/encodings/mac_farsi.pyi +21 -0
  142. package/dist/typeshed-fallback/stdlib/encodings/mac_greek.pyi +21 -0
  143. package/dist/typeshed-fallback/stdlib/encodings/mac_iceland.pyi +21 -0
  144. package/dist/typeshed-fallback/stdlib/encodings/mac_latin2.pyi +21 -0
  145. package/dist/typeshed-fallback/stdlib/encodings/mac_roman.pyi +21 -0
  146. package/dist/typeshed-fallback/stdlib/encodings/mac_romanian.pyi +21 -0
  147. package/dist/typeshed-fallback/stdlib/encodings/mac_turkish.pyi +21 -0
  148. package/dist/typeshed-fallback/stdlib/encodings/mbcs.pyi +28 -0
  149. package/dist/typeshed-fallback/stdlib/encodings/oem.pyi +28 -0
  150. package/dist/typeshed-fallback/stdlib/encodings/palmos.pyi +21 -0
  151. package/dist/typeshed-fallback/stdlib/encodings/ptcp154.pyi +21 -0
  152. package/dist/typeshed-fallback/stdlib/encodings/punycode.pyi +33 -0
  153. package/dist/typeshed-fallback/stdlib/encodings/quopri_codec.pyi +26 -0
  154. package/dist/typeshed-fallback/stdlib/encodings/raw_unicode_escape.pyi +34 -0
  155. package/dist/typeshed-fallback/stdlib/encodings/rot_13.pyi +23 -0
  156. package/dist/typeshed-fallback/stdlib/encodings/shift_jis.pyi +23 -0
  157. package/dist/typeshed-fallback/stdlib/encodings/shift_jis_2004.pyi +23 -0
  158. package/dist/typeshed-fallback/stdlib/encodings/shift_jisx0213.pyi +23 -0
  159. package/dist/typeshed-fallback/stdlib/encodings/tis_620.pyi +21 -0
  160. package/dist/typeshed-fallback/stdlib/encodings/undefined.pyi +20 -0
  161. package/dist/typeshed-fallback/stdlib/encodings/unicode_escape.pyi +34 -0
  162. package/dist/typeshed-fallback/stdlib/encodings/utf_16.pyi +20 -0
  163. package/dist/typeshed-fallback/stdlib/encodings/utf_16_be.pyi +26 -0
  164. package/dist/typeshed-fallback/stdlib/encodings/utf_16_le.pyi +26 -0
  165. package/dist/typeshed-fallback/stdlib/encodings/utf_32.pyi +20 -0
  166. package/dist/typeshed-fallback/stdlib/encodings/utf_32_be.pyi +26 -0
  167. package/dist/typeshed-fallback/stdlib/encodings/utf_32_le.pyi +26 -0
  168. package/dist/typeshed-fallback/stdlib/encodings/utf_7.pyi +26 -0
  169. package/dist/typeshed-fallback/stdlib/encodings/utf_8.pyi +7 -2
  170. package/dist/typeshed-fallback/stdlib/encodings/uu_codec.pyi +28 -0
  171. package/dist/typeshed-fallback/stdlib/encodings/zlib_codec.pyi +26 -0
  172. package/dist/typeshed-fallback/stdlib/fcntl.pyi +3 -1
  173. package/dist/typeshed-fallback/stdlib/gettext.pyi +2 -0
  174. package/dist/typeshed-fallback/stdlib/hashlib.pyi +37 -96
  175. package/dist/typeshed-fallback/stdlib/hmac.pyi +33 -28
  176. package/dist/typeshed-fallback/stdlib/importlib/resources/abc.pyi +2 -0
  177. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +175 -21
  178. package/dist/typeshed-fallback/stdlib/json/scanner.pyi +3 -0
  179. package/dist/typeshed-fallback/stdlib/modulefinder.pyi +2 -0
  180. package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +2 -1
  181. package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +2 -1
  182. package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +9 -5
  183. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +506 -44
  184. package/dist/typeshed-fallback/stdlib/platform.pyi +38 -8
  185. package/dist/typeshed-fallback/stdlib/posix.pyi +30 -10
  186. package/dist/typeshed-fallback/stdlib/pstats.pyi +29 -11
  187. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +3 -1
  188. package/dist/typeshed-fallback/stdlib/sched.pyi +5 -2
  189. package/dist/typeshed-fallback/stdlib/socket.pyi +620 -63
  190. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +3 -1
  191. package/dist/typeshed-fallback/stdlib/sqlite3/dump.pyi +2 -0
  192. package/dist/typeshed-fallback/stdlib/ssl.pyi +3 -1
  193. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +111 -9
  194. package/dist/typeshed-fallback/stdlib/termios.pyi +108 -72
  195. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +103 -50
  196. package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +3 -1
  197. package/dist/typeshed-fallback/stdlib/tokenize.pyi +3 -1
  198. package/dist/typeshed-fallback/stdlib/turtle.pyi +15 -4
  199. package/dist/typeshed-fallback/stdlib/typing.pyi +10 -8
  200. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +8 -5
  201. package/dist/typeshed-fallback/stdlib/webbrowser.pyi +1 -0
  202. package/dist/typeshed-fallback/stdlib/wsgiref/types.pyi +2 -2
  203. package/dist/typeshed-fallback/stdlib/xml/__init__.pyi +3 -1
  204. package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +2 -0
  205. package/dist/typeshed-fallback/stdlib/zlib.pyi +22 -8
  206. package/dist/typeshed-fallback/stubs/Deprecated/METADATA.toml +1 -1
  207. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
  208. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
  209. package/dist/typeshed-fallback/stubs/bleach/METADATA.toml +1 -1
  210. package/dist/typeshed-fallback/stubs/docutils/docutils/core.pyi +216 -1
  211. package/dist/typeshed-fallback/stubs/docutils/docutils/writers/__init__.pyi +60 -2
  212. package/dist/typeshed-fallback/stubs/gevent/METADATA.toml +1 -1
  213. package/dist/typeshed-fallback/stubs/gevent/gevent/events.pyi +3 -1
  214. package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +6 -2
  215. package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +14 -0
  216. package/dist/typeshed-fallback/stubs/icalendar/icalendar/alarms.pyi +54 -0
  217. package/dist/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +137 -11
  218. package/dist/typeshed-fallback/stubs/icalendar/icalendar/prop.pyi +8 -7
  219. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/__init__.pyi +3 -2
  220. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids.pyi +15 -0
  221. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids_result.pyi +6 -0
  222. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzid.pyi +8 -0
  223. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +2 -2
  224. package/dist/typeshed-fallback/stubs/icalendar/icalendar/tools.pyi +12 -1
  225. package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +1 -1
  226. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +0 -2
  227. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +0 -31
  228. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +1 -1
  229. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +3 -1
  230. package/dist/typeshed-fallback/stubs/networkx/networkx/drawing/layout.pyi +4 -0
  231. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi +0 -4
  232. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +12 -2
  233. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/text.pyi +1 -4
  234. package/dist/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi +20 -2
  235. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/__init__.pyi +2 -1
  236. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
  237. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/_writer.pyi +4 -2
  238. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/cell.pyi +2 -2
  239. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi +2 -1
  240. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/workbook.pyi +2 -2
  241. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +5 -14
  242. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +2 -3
  243. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_writer.pyi +4 -3
  244. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/merge.pyi +2 -1
  245. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +30 -19
  246. package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
  247. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +3 -1
  248. package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +2 -2
  249. package/dist/typeshed-fallback/stubs/pysftp/pysftp/__init__.pyi +2 -2
  250. package/dist/typeshed-fallback/stubs/pywin32/isapi/install.pyi +98 -0
  251. package/dist/typeshed-fallback/stubs/pywin32/win32/win32clipboard.pyi +26 -24
  252. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
  253. package/dist/typeshed-fallback/stubs/setuptools/distutils/spawn.pyi +1 -0
  254. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +6 -7
  255. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +2 -2
  256. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -2
  257. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +7 -0
  258. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -2
  259. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -8
  260. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +3 -5
  261. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -1
  262. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +6 -7
  263. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +12 -17
  264. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/editable_wheel.pyi +1 -1
  265. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +1 -1
  266. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_egg_info.pyi +1 -1
  267. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/sdist.pyi +2 -1
  268. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/test.pyi +2 -2
  269. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/__init__.pyi +1 -14
  270. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
  271. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/setupcfg.pyi +7 -5
  272. package/dist/typeshed-fallback/stubs/setuptools/setuptools/depends.pyi +8 -4
  273. package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +1 -1
  274. package/dist/typeshed-fallback/stubs/setuptools/setuptools/msvc.pyi +7 -8
  275. package/dist/typeshed-fallback/stubs/setuptools/setuptools/package_index.pyi +7 -3
  276. package/dist/typeshed-fallback/stubs/setuptools/setuptools/sandbox.pyi +2 -4
  277. package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +2 -1
  278. package/dist/typeshed-fallback/stubs/tqdm/tqdm/contrib/discord.pyi +14 -3
  279. package/dist/typeshed-fallback/stubs/waitress/waitress/runner.pyi +1 -5
  280. package/package.json +1 -1
@@ -10,7 +10,7 @@ _LockLike: TypeAlias = Lock | RLock
10
10
 
11
11
  class Barrier(threading.Barrier):
12
12
  def __init__(
13
- self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *ctx: BaseContext
13
+ self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *, ctx: BaseContext
14
14
  ) -> None: ...
15
15
 
16
16
  class Condition:
@@ -19,12 +19,14 @@ class Condition:
19
19
  def notify_all(self) -> None: ...
20
20
  def wait(self, timeout: float | None = None) -> bool: ...
21
21
  def wait_for(self, predicate: Callable[[], bool], timeout: float | None = None) -> bool: ...
22
- def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
23
- def release(self) -> None: ...
24
22
  def __enter__(self) -> bool: ...
25
23
  def __exit__(
26
24
  self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
27
25
  ) -> None: ...
26
+ # These methods are copied from the lock passed to the constructor, or an
27
+ # instance of ctx.RLock() if lock was None.
28
+ def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
29
+ def release(self) -> None: ...
28
30
 
29
31
  class Event:
30
32
  def __init__(self, *, ctx: BaseContext) -> None: ...
@@ -35,12 +37,14 @@ class Event:
35
37
 
36
38
  # Not part of public API
37
39
  class SemLock:
38
- def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
39
- def release(self) -> None: ...
40
+ def __init__(self, kind: int, value: int, maxvalue: int, *, ctx: BaseContext | None) -> None: ...
40
41
  def __enter__(self) -> bool: ...
41
42
  def __exit__(
42
43
  self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
43
44
  ) -> None: ...
45
+ # These methods are copied from the wrapped _multiprocessing.SemLock object
46
+ def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
47
+ def release(self) -> None: ...
44
48
 
45
49
  class Lock(SemLock):
46
50
  def __init__(self, *, ctx: BaseContext) -> None: ...
@@ -19,10 +19,9 @@ from _typeshed import (
19
19
  WriteableBuffer,
20
20
  structseq,
21
21
  )
22
- from abc import abstractmethod
22
+ from abc import ABC, abstractmethod
23
23
  from builtins import OSError
24
24
  from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence
25
- from contextlib import AbstractContextManager
26
25
  from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper
27
26
  from subprocess import Popen
28
27
  from types import TracebackType
@@ -48,6 +47,446 @@ from . import path as _path
48
47
  if sys.version_info >= (3, 9):
49
48
  from types import GenericAlias
50
49
 
50
+ __all__ = [
51
+ "F_OK",
52
+ "O_APPEND",
53
+ "O_CREAT",
54
+ "O_EXCL",
55
+ "O_RDONLY",
56
+ "O_RDWR",
57
+ "O_TRUNC",
58
+ "O_WRONLY",
59
+ "P_NOWAIT",
60
+ "P_NOWAITO",
61
+ "P_WAIT",
62
+ "R_OK",
63
+ "SEEK_CUR",
64
+ "SEEK_END",
65
+ "SEEK_SET",
66
+ "TMP_MAX",
67
+ "W_OK",
68
+ "X_OK",
69
+ "DirEntry",
70
+ "_exit",
71
+ "abort",
72
+ "access",
73
+ "altsep",
74
+ "chdir",
75
+ "chmod",
76
+ "close",
77
+ "closerange",
78
+ "cpu_count",
79
+ "curdir",
80
+ "defpath",
81
+ "device_encoding",
82
+ "devnull",
83
+ "dup",
84
+ "dup2",
85
+ "environ",
86
+ "error",
87
+ "execl",
88
+ "execle",
89
+ "execlp",
90
+ "execlpe",
91
+ "execv",
92
+ "execve",
93
+ "execvp",
94
+ "execvpe",
95
+ "extsep",
96
+ "fdopen",
97
+ "fsdecode",
98
+ "fsencode",
99
+ "fspath",
100
+ "fstat",
101
+ "fsync",
102
+ "ftruncate",
103
+ "get_exec_path",
104
+ "get_inheritable",
105
+ "get_terminal_size",
106
+ "getcwd",
107
+ "getcwdb",
108
+ "getenv",
109
+ "getlogin",
110
+ "getpid",
111
+ "getppid",
112
+ "isatty",
113
+ "kill",
114
+ "linesep",
115
+ "link",
116
+ "listdir",
117
+ "lseek",
118
+ "lstat",
119
+ "makedirs",
120
+ "mkdir",
121
+ "name",
122
+ "open",
123
+ "pardir",
124
+ "path",
125
+ "pathsep",
126
+ "pipe",
127
+ "popen",
128
+ "putenv",
129
+ "read",
130
+ "readlink",
131
+ "remove",
132
+ "removedirs",
133
+ "rename",
134
+ "renames",
135
+ "replace",
136
+ "rmdir",
137
+ "scandir",
138
+ "sep",
139
+ "set_inheritable",
140
+ "spawnl",
141
+ "spawnle",
142
+ "spawnv",
143
+ "spawnve",
144
+ "stat",
145
+ "stat_result",
146
+ "statvfs_result",
147
+ "strerror",
148
+ "supports_bytes_environ",
149
+ "symlink",
150
+ "system",
151
+ "terminal_size",
152
+ "times",
153
+ "times_result",
154
+ "truncate",
155
+ "umask",
156
+ "uname_result",
157
+ "unlink",
158
+ "urandom",
159
+ "utime",
160
+ "waitpid",
161
+ "walk",
162
+ "write",
163
+ ]
164
+ if sys.version_info >= (3, 9):
165
+ __all__ += ["waitstatus_to_exitcode"]
166
+ if sys.platform == "darwin" and sys.version_info >= (3, 12):
167
+ __all__ += ["PRIO_DARWIN_BG", "PRIO_DARWIN_NONUI", "PRIO_DARWIN_PROCESS", "PRIO_DARWIN_THREAD"]
168
+ if sys.platform == "darwin" and sys.version_info >= (3, 10):
169
+ __all__ += ["O_EVTONLY", "O_NOFOLLOW_ANY", "O_SYMLINK"]
170
+ if sys.platform == "linux":
171
+ __all__ += [
172
+ "GRND_NONBLOCK",
173
+ "GRND_RANDOM",
174
+ "MFD_ALLOW_SEALING",
175
+ "MFD_CLOEXEC",
176
+ "MFD_HUGETLB",
177
+ "MFD_HUGE_16GB",
178
+ "MFD_HUGE_16MB",
179
+ "MFD_HUGE_1GB",
180
+ "MFD_HUGE_1MB",
181
+ "MFD_HUGE_256MB",
182
+ "MFD_HUGE_2GB",
183
+ "MFD_HUGE_2MB",
184
+ "MFD_HUGE_32MB",
185
+ "MFD_HUGE_512KB",
186
+ "MFD_HUGE_512MB",
187
+ "MFD_HUGE_64KB",
188
+ "MFD_HUGE_8MB",
189
+ "MFD_HUGE_MASK",
190
+ "MFD_HUGE_SHIFT",
191
+ "O_DIRECT",
192
+ "O_LARGEFILE",
193
+ "O_NOATIME",
194
+ "O_PATH",
195
+ "O_RSYNC",
196
+ "O_TMPFILE",
197
+ "RTLD_DEEPBIND",
198
+ "SCHED_BATCH",
199
+ "SCHED_IDLE",
200
+ "SCHED_RESET_ON_FORK",
201
+ "XATTR_CREATE",
202
+ "XATTR_REPLACE",
203
+ "XATTR_SIZE_MAX",
204
+ "copy_file_range",
205
+ "getrandom",
206
+ "getxattr",
207
+ "listxattr",
208
+ "memfd_create",
209
+ "removexattr",
210
+ "setxattr",
211
+ ]
212
+ if sys.platform == "linux" and sys.version_info >= (3, 13):
213
+ __all__ += [
214
+ "POSIX_SPAWN_CLOSEFROM",
215
+ "TFD_CLOEXEC",
216
+ "TFD_NONBLOCK",
217
+ "TFD_TIMER_ABSTIME",
218
+ "TFD_TIMER_CANCEL_ON_SET",
219
+ "timerfd_create",
220
+ "timerfd_gettime",
221
+ "timerfd_gettime_ns",
222
+ "timerfd_settime",
223
+ "timerfd_settime_ns",
224
+ ]
225
+ if sys.platform == "linux" and sys.version_info >= (3, 12):
226
+ __all__ += [
227
+ "CLONE_FILES",
228
+ "CLONE_FS",
229
+ "CLONE_NEWCGROUP",
230
+ "CLONE_NEWIPC",
231
+ "CLONE_NEWNET",
232
+ "CLONE_NEWNS",
233
+ "CLONE_NEWPID",
234
+ "CLONE_NEWUSER",
235
+ "CLONE_NEWUTS",
236
+ "CLONE_SIGHAND",
237
+ "CLONE_SYSVSEM",
238
+ "CLONE_THREAD",
239
+ "CLONE_VM",
240
+ "setns",
241
+ "unshare",
242
+ ]
243
+ if sys.platform == "linux" and sys.version_info >= (3, 10):
244
+ __all__ += [
245
+ "EFD_CLOEXEC",
246
+ "EFD_NONBLOCK",
247
+ "EFD_SEMAPHORE",
248
+ "RWF_APPEND",
249
+ "SPLICE_F_MORE",
250
+ "SPLICE_F_MOVE",
251
+ "SPLICE_F_NONBLOCK",
252
+ "eventfd",
253
+ "eventfd_read",
254
+ "eventfd_write",
255
+ "splice",
256
+ ]
257
+ if sys.platform == "linux" and sys.version_info >= (3, 9):
258
+ __all__ += ["P_PIDFD", "pidfd_open"]
259
+ if sys.platform == "win32":
260
+ __all__ += [
261
+ "O_BINARY",
262
+ "O_NOINHERIT",
263
+ "O_RANDOM",
264
+ "O_SEQUENTIAL",
265
+ "O_SHORT_LIVED",
266
+ "O_TEMPORARY",
267
+ "O_TEXT",
268
+ "P_DETACH",
269
+ "P_OVERLAY",
270
+ "get_handle_inheritable",
271
+ "set_handle_inheritable",
272
+ "startfile",
273
+ ]
274
+ if sys.platform == "win32" and sys.version_info >= (3, 12):
275
+ __all__ += ["listdrives", "listmounts", "listvolumes"]
276
+ if sys.platform != "win32":
277
+ __all__ += [
278
+ "CLD_CONTINUED",
279
+ "CLD_DUMPED",
280
+ "CLD_EXITED",
281
+ "CLD_TRAPPED",
282
+ "EX_CANTCREAT",
283
+ "EX_CONFIG",
284
+ "EX_DATAERR",
285
+ "EX_IOERR",
286
+ "EX_NOHOST",
287
+ "EX_NOINPUT",
288
+ "EX_NOPERM",
289
+ "EX_NOUSER",
290
+ "EX_OSERR",
291
+ "EX_OSFILE",
292
+ "EX_PROTOCOL",
293
+ "EX_SOFTWARE",
294
+ "EX_TEMPFAIL",
295
+ "EX_UNAVAILABLE",
296
+ "EX_USAGE",
297
+ "F_LOCK",
298
+ "F_TEST",
299
+ "F_TLOCK",
300
+ "F_ULOCK",
301
+ "NGROUPS_MAX",
302
+ "O_ACCMODE",
303
+ "O_ASYNC",
304
+ "O_CLOEXEC",
305
+ "O_DIRECTORY",
306
+ "O_DSYNC",
307
+ "O_NDELAY",
308
+ "O_NOCTTY",
309
+ "O_NOFOLLOW",
310
+ "O_NONBLOCK",
311
+ "O_SYNC",
312
+ "POSIX_SPAWN_CLOSE",
313
+ "POSIX_SPAWN_DUP2",
314
+ "POSIX_SPAWN_OPEN",
315
+ "PRIO_PGRP",
316
+ "PRIO_PROCESS",
317
+ "PRIO_USER",
318
+ "P_ALL",
319
+ "P_PGID",
320
+ "P_PID",
321
+ "RTLD_GLOBAL",
322
+ "RTLD_LAZY",
323
+ "RTLD_LOCAL",
324
+ "RTLD_NODELETE",
325
+ "RTLD_NOLOAD",
326
+ "RTLD_NOW",
327
+ "SCHED_FIFO",
328
+ "SCHED_OTHER",
329
+ "SCHED_RR",
330
+ "SEEK_DATA",
331
+ "SEEK_HOLE",
332
+ "ST_NOSUID",
333
+ "ST_RDONLY",
334
+ "WCONTINUED",
335
+ "WCOREDUMP",
336
+ "WEXITED",
337
+ "WEXITSTATUS",
338
+ "WIFCONTINUED",
339
+ "WIFEXITED",
340
+ "WIFSIGNALED",
341
+ "WIFSTOPPED",
342
+ "WNOHANG",
343
+ "WNOWAIT",
344
+ "WSTOPPED",
345
+ "WSTOPSIG",
346
+ "WTERMSIG",
347
+ "WUNTRACED",
348
+ "chown",
349
+ "chroot",
350
+ "confstr",
351
+ "confstr_names",
352
+ "ctermid",
353
+ "environb",
354
+ "fchdir",
355
+ "fchown",
356
+ "fork",
357
+ "forkpty",
358
+ "fpathconf",
359
+ "fstatvfs",
360
+ "fwalk",
361
+ "getegid",
362
+ "getenvb",
363
+ "geteuid",
364
+ "getgid",
365
+ "getgrouplist",
366
+ "getgroups",
367
+ "getloadavg",
368
+ "getpgid",
369
+ "getpgrp",
370
+ "getpriority",
371
+ "getsid",
372
+ "getuid",
373
+ "initgroups",
374
+ "killpg",
375
+ "lchown",
376
+ "lockf",
377
+ "major",
378
+ "makedev",
379
+ "minor",
380
+ "mkfifo",
381
+ "mknod",
382
+ "nice",
383
+ "openpty",
384
+ "pathconf",
385
+ "pathconf_names",
386
+ "posix_spawn",
387
+ "posix_spawnp",
388
+ "pread",
389
+ "preadv",
390
+ "pwrite",
391
+ "pwritev",
392
+ "readv",
393
+ "register_at_fork",
394
+ "sched_get_priority_max",
395
+ "sched_get_priority_min",
396
+ "sched_yield",
397
+ "sendfile",
398
+ "setegid",
399
+ "seteuid",
400
+ "setgid",
401
+ "setgroups",
402
+ "setpgid",
403
+ "setpgrp",
404
+ "setpriority",
405
+ "setregid",
406
+ "setreuid",
407
+ "setsid",
408
+ "setuid",
409
+ "spawnlp",
410
+ "spawnlpe",
411
+ "spawnvp",
412
+ "spawnvpe",
413
+ "statvfs",
414
+ "sync",
415
+ "sysconf",
416
+ "sysconf_names",
417
+ "tcgetpgrp",
418
+ "tcsetpgrp",
419
+ "ttyname",
420
+ "uname",
421
+ "wait",
422
+ "wait3",
423
+ "wait4",
424
+ "writev",
425
+ ]
426
+ if sys.platform != "win32" and sys.version_info >= (3, 13):
427
+ __all__ += ["grantpt", "posix_openpt", "ptsname", "unlockpt"]
428
+ if sys.platform != "win32" and sys.version_info >= (3, 11):
429
+ __all__ += ["login_tty"]
430
+ if sys.platform != "win32" and sys.version_info >= (3, 10):
431
+ __all__ += ["O_FSYNC"]
432
+ if sys.platform != "win32" and sys.version_info >= (3, 9):
433
+ __all__ += ["CLD_KILLED", "CLD_STOPPED"]
434
+ if sys.platform != "darwin" and sys.platform != "win32":
435
+ __all__ += [
436
+ "POSIX_FADV_DONTNEED",
437
+ "POSIX_FADV_NOREUSE",
438
+ "POSIX_FADV_NORMAL",
439
+ "POSIX_FADV_RANDOM",
440
+ "POSIX_FADV_SEQUENTIAL",
441
+ "POSIX_FADV_WILLNEED",
442
+ "RWF_DSYNC",
443
+ "RWF_HIPRI",
444
+ "RWF_NOWAIT",
445
+ "RWF_SYNC",
446
+ "ST_APPEND",
447
+ "ST_MANDLOCK",
448
+ "ST_NOATIME",
449
+ "ST_NODEV",
450
+ "ST_NODIRATIME",
451
+ "ST_NOEXEC",
452
+ "ST_RELATIME",
453
+ "ST_SYNCHRONOUS",
454
+ "ST_WRITE",
455
+ "fdatasync",
456
+ "getresgid",
457
+ "getresuid",
458
+ "pipe2",
459
+ "posix_fadvise",
460
+ "posix_fallocate",
461
+ "sched_getaffinity",
462
+ "sched_getparam",
463
+ "sched_getscheduler",
464
+ "sched_param",
465
+ "sched_rr_get_interval",
466
+ "sched_setaffinity",
467
+ "sched_setparam",
468
+ "sched_setscheduler",
469
+ "setresgid",
470
+ "setresuid",
471
+ ]
472
+ if sys.platform != "linux" and sys.platform != "win32":
473
+ __all__ += ["O_EXLOCK", "O_SHLOCK", "chflags", "lchflags"]
474
+ if sys.platform != "linux" and sys.platform != "win32" and sys.version_info >= (3, 13):
475
+ __all__ += ["O_EXEC", "O_SEARCH"]
476
+ if sys.platform != "darwin" or sys.version_info >= (3, 13):
477
+ if sys.platform != "win32":
478
+ __all__ += ["waitid", "waitid_result"]
479
+ if sys.platform != "win32" or sys.version_info >= (3, 13):
480
+ __all__ += ["fchmod"]
481
+ if sys.platform != "linux":
482
+ __all__ += ["lchmod"]
483
+ if sys.platform != "win32" or sys.version_info >= (3, 12):
484
+ __all__ += ["get_blocking", "set_blocking"]
485
+ if sys.platform != "win32" or sys.version_info >= (3, 11):
486
+ __all__ += ["EX_OK"]
487
+ if sys.platform != "win32" or sys.version_info >= (3, 9):
488
+ __all__ += ["unsetenv"]
489
+
51
490
  # This unnecessary alias is to work around various errors
52
491
  path = _path
53
492
 
@@ -125,15 +564,16 @@ if sys.platform != "win32":
125
564
  CLD_KILLED: int
126
565
  CLD_STOPPED: int
127
566
 
128
- # TODO: SCHED_RESET_ON_FORK not available on darwin?
129
- # TODO: SCHED_BATCH and SCHED_IDLE are linux only?
130
- SCHED_OTHER: int # some flavors of Unix
131
- SCHED_BATCH: int # some flavors of Unix
132
- SCHED_IDLE: int # some flavors of Unix
133
- SCHED_SPORADIC: int # some flavors of Unix
134
- SCHED_FIFO: int # some flavors of Unix
135
- SCHED_RR: int # some flavors of Unix
136
- SCHED_RESET_ON_FORK: int # some flavors of Unix
567
+ SCHED_OTHER: int
568
+ SCHED_FIFO: int
569
+ SCHED_RR: int
570
+ if sys.platform != "darwin" and sys.platform != "linux":
571
+ SCHED_SPORADIC: int
572
+
573
+ if sys.platform == "linux":
574
+ SCHED_BATCH: int
575
+ SCHED_IDLE: int
576
+ SCHED_RESET_ON_FORK: int
137
577
 
138
578
  if sys.platform != "win32":
139
579
  RTLD_LAZY: int
@@ -158,8 +598,8 @@ SEEK_SET: int
158
598
  SEEK_CUR: int
159
599
  SEEK_END: int
160
600
  if sys.platform != "win32":
161
- SEEK_DATA: int # some flavors of Unix
162
- SEEK_HOLE: int # some flavors of Unix
601
+ SEEK_DATA: int
602
+ SEEK_HOLE: int
163
603
 
164
604
  O_RDONLY: int
165
605
  O_WRONLY: int
@@ -168,34 +608,50 @@ O_APPEND: int
168
608
  O_CREAT: int
169
609
  O_EXCL: int
170
610
  O_TRUNC: int
171
- # We don't use sys.platform for O_* flags to denote platform-dependent APIs because some codes,
172
- # including tests for mypy, use a more finer way than sys.platform before using these APIs
173
- # See https://github.com/python/typeshed/pull/2286 for discussions
174
- O_DSYNC: int # Unix only
175
- O_RSYNC: int # Unix only
176
- O_SYNC: int # Unix only
177
- O_NDELAY: int # Unix only
178
- O_NONBLOCK: int # Unix only
179
- O_NOCTTY: int # Unix only
180
- O_CLOEXEC: int # Unix only
181
- O_SHLOCK: int # Unix only
182
- O_EXLOCK: int # Unix only
183
- O_BINARY: int # Windows only
184
- O_NOINHERIT: int # Windows only
185
- O_SHORT_LIVED: int # Windows only
186
- O_TEMPORARY: int # Windows only
187
- O_RANDOM: int # Windows only
188
- O_SEQUENTIAL: int # Windows only
189
- O_TEXT: int # Windows only
190
- O_ASYNC: int # Gnu extension if in C library
191
- O_DIRECT: int # Gnu extension if in C library
192
- O_DIRECTORY: int # Gnu extension if in C library
193
- O_NOFOLLOW: int # Gnu extension if in C library
194
- O_NOATIME: int # Gnu extension if in C library
195
- O_PATH: int # Gnu extension if in C library
196
- O_TMPFILE: int # Gnu extension if in C library
197
- O_LARGEFILE: int # Gnu extension if in C library
198
- O_ACCMODE: int # TODO: when does this exist?
611
+ if sys.platform == "win32":
612
+ O_BINARY: int
613
+ O_NOINHERIT: int
614
+ O_SHORT_LIVED: int
615
+ O_TEMPORARY: int
616
+ O_RANDOM: int
617
+ O_SEQUENTIAL: int
618
+ O_TEXT: int
619
+
620
+ if sys.platform != "win32":
621
+ O_DSYNC: int
622
+ O_SYNC: int
623
+ O_NDELAY: int
624
+ O_NONBLOCK: int
625
+ O_NOCTTY: int
626
+ O_CLOEXEC: int
627
+ O_ASYNC: int # Gnu extension if in C library
628
+ O_DIRECTORY: int # Gnu extension if in C library
629
+ O_NOFOLLOW: int # Gnu extension if in C library
630
+ O_ACCMODE: int # TODO: when does this exist?
631
+
632
+ if sys.platform == "linux":
633
+ O_RSYNC: int
634
+ O_DIRECT: int # Gnu extension if in C library
635
+ O_NOATIME: int # Gnu extension if in C library
636
+ O_PATH: int # Gnu extension if in C library
637
+ O_TMPFILE: int # Gnu extension if in C library
638
+ O_LARGEFILE: int # Gnu extension if in C library
639
+
640
+ if sys.platform != "linux" and sys.platform != "win32":
641
+ O_SHLOCK: int
642
+ O_EXLOCK: int
643
+
644
+ if sys.platform == "darwin" and sys.version_info >= (3, 10):
645
+ O_EVTONLY: int
646
+ O_NOFOLLOW_ANY: int
647
+ O_SYMLINK: int
648
+
649
+ if sys.platform != "win32" and sys.version_info >= (3, 10):
650
+ O_FSYNC: int
651
+
652
+ if sys.platform != "linux" and sys.platform != "win32" and sys.version_info >= (3, 13):
653
+ O_EXEC: int
654
+ O_SEARCH: int
199
655
 
200
656
  if sys.platform != "win32" and sys.platform != "darwin":
201
657
  # posix, but apparently missing on macos
@@ -449,8 +905,11 @@ In the future, this property will contain the last metadata change time."""
449
905
  # Attributes documented as sometimes appearing, but deliberately omitted from the stub: `st_creator`, `st_rsize`, `st_type`.
450
906
  # See https://github.com/python/typeshed/pull/6560#issuecomment-991253327
451
907
 
908
+ # mypy and pyright object to this being both ABC and Protocol.
909
+ # At runtime it inherits from ABC and is not a Protocol, but it will be
910
+ # on the allowlist for use as a Protocol starting in 3.14.
452
911
  @runtime_checkable
453
- class PathLike(Protocol[AnyStr_co]):
912
+ class PathLike(ABC, Protocol[AnyStr_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
454
913
  @abstractmethod
455
914
  def __fspath__(self) -> AnyStr_co: ...
456
915
 
@@ -1552,9 +2011,12 @@ def rmdir(path: StrOrBytesPath, *, dir_fd: int | None = None) -> None:
1552
2011
  If it is unavailable, using it will raise a NotImplementedError.
1553
2012
  """
1554
2013
  ...
1555
-
1556
- class _ScandirIterator(Iterator[DirEntry[AnyStr]], AbstractContextManager[_ScandirIterator[AnyStr], None]):
2014
+ @final
2015
+ class _ScandirIterator(Generic[AnyStr]):
2016
+ def __del__(self) -> None: ...
2017
+ def __iter__(self) -> Self: ...
1557
2018
  def __next__(self) -> DirEntry[AnyStr]: ...
2019
+ def __enter__(self) -> Self: ...
1558
2020
  def __exit__(self, *args: Unused) -> None: ...
1559
2021
  def close(self) -> None: ...
1560
2022
 
@@ -1,5 +1,6 @@
1
1
  import sys
2
- from typing import NamedTuple
2
+ from typing import NamedTuple, type_check_only
3
+ from typing_extensions import Self
3
4
 
4
5
  def libc_ver(executable: str | None = None, lib: str = "", version: str = "", chunksize: int = 16384) -> tuple[str, str]: ...
5
6
  def win32_ver(release: str = "", version: str = "", csd: str = "", ptype: str = "") -> tuple[str, str, str, str]: ...
@@ -14,13 +15,42 @@ def java_ver(
14
15
  def system_alias(system: str, release: str, version: str) -> tuple[str, str, str]: ...
15
16
  def architecture(executable: str = sys.executable, bits: str = "", linkage: str = "") -> tuple[str, str]: ...
16
17
 
17
- class uname_result(NamedTuple):
18
- system: str
19
- node: str
20
- release: str
21
- version: str
22
- machine: str
23
- processor: str
18
+ if sys.version_info >= (3, 9):
19
+ # This class is not exposed. It calls itself platform.uname_result_base.
20
+ # At runtime it only has 5 fields.
21
+ @type_check_only
22
+ class _uname_result_base(NamedTuple):
23
+ system: str
24
+ node: str
25
+ release: str
26
+ version: str
27
+ machine: str
28
+ # This base class doesn't have this field at runtime, but claiming it
29
+ # does is the least bad way to handle the situation. Nobody really
30
+ # sees this class anyway. See #13068
31
+ processor: str
32
+
33
+ # uname_result emulates a 6-field named tuple, but the processor field
34
+ # is lazily evaluated rather than being passed in to the constructor.
35
+ class uname_result(_uname_result_base):
36
+ if sys.version_info >= (3, 10):
37
+ __match_args__ = ("system", "node", "release", "version", "machine") # pyright: ignore[reportAssignmentType]
38
+
39
+ def __new__(_cls, system: str, node: str, release: str, version: str, machine: str) -> Self:
40
+ """Create new instance of uname_result_base(system, node, release, version, machine)"""
41
+ ...
42
+ @property
43
+ def processor(self) -> str: ...
44
+
45
+ else:
46
+ # On 3.8, uname_result is actually just a regular NamedTuple.
47
+ class uname_result(NamedTuple):
48
+ system: str
49
+ node: str
50
+ release: str
51
+ version: str
52
+ machine: str
53
+ processor: str
24
54
 
25
55
  def uname() -> uname_result: ...
26
56
  def system() -> str: ...