basedpyright 1.12.2 → 1.12.3

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 (236) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/README.md +2 -2
  6. package/dist/typeshed-fallback/commit.txt +1 -1
  7. package/dist/typeshed-fallback/stdlib/VERSIONS +1 -1
  8. package/dist/typeshed-fallback/stdlib/_ast.pyi +661 -22
  9. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +1 -1
  10. package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
  11. package/dist/typeshed-fallback/stdlib/_stat.pyi +27 -13
  12. package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +2 -0
  13. package/dist/typeshed-fallback/stdlib/_typeshed/importlib.pyi +18 -0
  14. package/dist/typeshed-fallback/stdlib/_weakref.pyi +1 -1
  15. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
  17. package/dist/typeshed-fallback/stdlib/ast.pyi +160 -70
  18. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -1
  19. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -1
  20. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -1
  21. package/dist/typeshed-fallback/stdlib/atexit.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/builtins.pyi +30 -8
  23. package/dist/typeshed-fallback/stdlib/calendar.pyi +29 -29
  24. package/dist/typeshed-fallback/stdlib/code.pyi +27 -8
  25. package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +1 -1
  26. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +1 -1
  27. package/dist/typeshed-fallback/stdlib/contextvars.pyi +2 -2
  28. package/dist/typeshed-fallback/stdlib/csv.pyi +4 -4
  29. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +1 -1
  30. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
  31. package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +9 -2
  32. package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +7 -1
  33. package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +5 -2
  34. package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +5 -2
  35. package/dist/typeshed-fallback/stdlib/difflib.pyi +1 -1
  36. package/dist/typeshed-fallback/stdlib/dis.pyi +16 -1
  37. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +22 -7
  38. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +37 -16
  39. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +52 -19
  40. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +4 -4
  41. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +4 -2
  42. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +2 -2
  43. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
  44. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +5 -4
  45. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +4 -2
  46. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +4 -2
  47. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +4 -2
  48. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
  49. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -3
  50. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +20 -10
  51. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +8 -5
  52. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +35 -11
  53. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +11 -3
  54. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
  55. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +4 -2
  56. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +7 -7
  57. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +9 -5
  58. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +1 -1
  59. package/dist/typeshed-fallback/stdlib/filecmp.pyi +1 -1
  60. package/dist/typeshed-fallback/stdlib/fileinput.pyi +1 -1
  61. package/dist/typeshed-fallback/stdlib/functools.pyi +3 -3
  62. package/dist/typeshed-fallback/stdlib/genericpath.pyi +7 -0
  63. package/dist/typeshed-fallback/stdlib/graphlib.pyi +1 -1
  64. package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -3
  65. package/dist/typeshed-fallback/stdlib/http/__init__.pyi +11 -4
  66. package/dist/typeshed-fallback/stdlib/http/cookies.pyi +1 -1
  67. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +2 -2
  68. package/dist/typeshed-fallback/stdlib/importlib/util.pyi +3 -2
  69. package/dist/typeshed-fallback/stdlib/inspect.pyi +6 -0
  70. package/dist/typeshed-fallback/stdlib/keyword.pyi +2 -2
  71. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +69 -42
  72. package/dist/typeshed-fallback/stdlib/mailbox.pyi +2 -2
  73. package/dist/typeshed-fallback/stdlib/marshal.pyi +12 -4
  74. package/dist/typeshed-fallback/stdlib/math.pyi +3 -0
  75. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +1 -1
  76. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +1 -1
  77. package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +1 -1
  78. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
  79. package/dist/typeshed-fallback/stdlib/ntpath.pyi +8 -1
  80. package/dist/typeshed-fallback/stdlib/opcode.pyi +6 -2
  81. package/dist/typeshed-fallback/stdlib/optparse.pyi +1 -1
  82. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -1
  83. package/dist/typeshed-fallback/stdlib/pathlib.pyi +6 -2
  84. package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
  85. package/dist/typeshed-fallback/stdlib/posixpath.pyi +5 -0
  86. package/dist/typeshed-fallback/stdlib/queue.pyi +4 -2
  87. package/dist/typeshed-fallback/stdlib/random.pyi +4 -1
  88. package/dist/typeshed-fallback/stdlib/re.pyi +20 -9
  89. package/dist/typeshed-fallback/stdlib/shelve.pyi +15 -2
  90. package/dist/typeshed-fallback/stdlib/shutil.pyi +38 -8
  91. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  92. package/dist/typeshed-fallback/stdlib/socket.pyi +13 -0
  93. package/dist/typeshed-fallback/stdlib/stat.pyi +6 -0
  94. package/dist/typeshed-fallback/stdlib/statistics.pyi +30 -1
  95. package/dist/typeshed-fallback/stdlib/subprocess.pyi +2 -2
  96. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +15 -19
  97. package/dist/typeshed-fallback/stdlib/syslog.pyi +9 -0
  98. package/dist/typeshed-fallback/stdlib/tempfile.pyi +7 -3
  99. package/dist/typeshed-fallback/stdlib/threading.pyi +3 -0
  100. package/dist/typeshed-fallback/stdlib/token.pyi +5 -4
  101. package/dist/typeshed-fallback/stdlib/tokenize.pyi +10 -3
  102. package/dist/typeshed-fallback/stdlib/types.pyi +20 -18
  103. package/dist/typeshed-fallback/stdlib/typing.pyi +75 -21
  104. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +104 -83
  105. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +1 -1
  106. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +1 -1
  107. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +17 -10
  108. package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +31 -3
  109. package/dist/typeshed-fallback/stdlib/warnings.pyi +13 -1
  110. package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +2 -0
  111. package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +17 -17
  112. package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +29 -29
  113. package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +2 -1
  114. package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +13 -13
  115. package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +8 -3
  116. package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +10 -3
  117. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/ATNType.pyi +2 -2
  118. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/LexerAction.pyi +8 -8
  119. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/PredictionMode.pyi +3 -3
  120. package/dist/typeshed-fallback/stubs/assertpy/METADATA.toml +2 -0
  121. package/dist/typeshed-fallback/stubs/assertpy/assertpy/__init__.pyi +12 -0
  122. package/dist/typeshed-fallback/stubs/assertpy/assertpy/assertpy.pyi +70 -0
  123. package/dist/typeshed-fallback/stubs/assertpy/assertpy/base.pyi +21 -0
  124. package/dist/typeshed-fallback/stubs/assertpy/assertpy/collection.pyi +11 -0
  125. package/dist/typeshed-fallback/stubs/assertpy/assertpy/contains.pyi +16 -0
  126. package/dist/typeshed-fallback/stubs/assertpy/assertpy/date.pyi +11 -0
  127. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dict.pyi +12 -0
  128. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dynamic.pyi +7 -0
  129. package/dist/typeshed-fallback/stubs/assertpy/assertpy/exception.pyi +8 -0
  130. package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -0
  131. package/dist/typeshed-fallback/stubs/assertpy/assertpy/file.pyi +15 -0
  132. package/dist/typeshed-fallback/stubs/assertpy/assertpy/helpers.pyi +3 -0
  133. package/dist/typeshed-fallback/stubs/assertpy/assertpy/numeric.pyi +24 -0
  134. package/dist/typeshed-fallback/stubs/assertpy/assertpy/snapshot.pyi +6 -0
  135. package/dist/typeshed-fallback/stubs/assertpy/assertpy/string.pyi +18 -0
  136. package/dist/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +15 -7
  137. package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +119 -61
  138. package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +3 -3
  139. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +31 -20
  140. package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +16 -8
  141. package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +3 -0
  142. package/dist/typeshed-fallback/stubs/flake8/flake8/__init__.pyi +8 -0
  143. package/dist/typeshed-fallback/stubs/flake8/flake8/_compat.pyi +5 -0
  144. package/dist/typeshed-fallback/stubs/flake8/flake8/api/__init__.pyi +0 -0
  145. package/dist/typeshed-fallback/stubs/flake8/flake8/api/legacy.pyi +27 -0
  146. package/dist/typeshed-fallback/stubs/flake8/flake8/checker.pyi +56 -0
  147. package/dist/typeshed-fallback/stubs/flake8/flake8/defaults.pyi +12 -0
  148. package/dist/typeshed-fallback/stubs/flake8/flake8/discover_files.pyi +8 -0
  149. package/dist/typeshed-fallback/stubs/flake8/flake8/exceptions.pyi +24 -0
  150. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/__init__.pyi +0 -0
  151. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/_windows_color.pyi +1 -0
  152. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/base.pyi +24 -0
  153. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/default.pyi +29 -0
  154. package/dist/typeshed-fallback/stubs/flake8/flake8/main/__init__.pyi +0 -0
  155. package/dist/typeshed-fallback/stubs/flake8/flake8/main/application.pyi +29 -0
  156. package/dist/typeshed-fallback/stubs/flake8/flake8/main/cli.pyi +3 -0
  157. package/dist/typeshed-fallback/stubs/flake8/flake8/main/debug.pyi +5 -0
  158. package/dist/typeshed-fallback/stubs/flake8/flake8/main/options.pyi +12 -0
  159. package/dist/typeshed-fallback/stubs/flake8/flake8/options/__init__.pyi +0 -0
  160. package/dist/typeshed-fallback/stubs/flake8/flake8/options/aggregator.pyi +12 -0
  161. package/dist/typeshed-fallback/stubs/flake8/flake8/options/config.pyi +10 -0
  162. package/dist/typeshed-fallback/stubs/flake8/flake8/options/manager.pyi +71 -0
  163. package/dist/typeshed-fallback/stubs/flake8/flake8/options/parse_args.pyi +6 -0
  164. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/__init__.pyi +0 -0
  165. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/finder.pyi +48 -0
  166. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pycodestyle.pyi +32 -0
  167. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pyflakes.pyi +21 -0
  168. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/reporter.pyi +9 -0
  169. package/dist/typeshed-fallback/stubs/flake8/flake8/processor.pyi +72 -0
  170. package/dist/typeshed-fallback/stubs/flake8/flake8/statistics.pyi +28 -0
  171. package/dist/typeshed-fallback/stubs/flake8/flake8/style_guide.pyi +70 -0
  172. package/dist/typeshed-fallback/stubs/flake8/flake8/utils.pyi +25 -0
  173. package/dist/typeshed-fallback/stubs/flake8/flake8/violation.pyi +13 -0
  174. package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
  175. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/bidi.pyi +5 -3
  176. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +5 -1
  177. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +15 -2
  178. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +2 -1
  179. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +45 -32
  180. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +4 -4
  181. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +1 -1
  182. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/svg.pyi +0 -1
  183. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +2 -1
  184. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +4 -0
  185. package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +1 -1
  186. package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +35 -23
  187. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  188. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/exceptions.pyi +3 -1
  189. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/rest.pyi +8 -2
  190. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -0
  191. package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +1 -1
  192. package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +8 -6
  193. package/dist/typeshed-fallback/stubs/pyaudio/METADATA.toml +2 -2
  194. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/__init__.pyi +0 -0
  195. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/pyflakes.pyi +8 -0
  196. package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
  197. package/dist/typeshed-fallback/stubs/pygit2/pygit2/_pygit2.pyi +1 -15
  198. package/dist/typeshed-fallback/stubs/pygit2/pygit2/enums.pyi +313 -314
  199. package/dist/typeshed-fallback/stubs/pygit2/pygit2/index.pyi +2 -1
  200. package/dist/typeshed-fallback/stubs/pygit2/pygit2/remotes.pyi +7 -1
  201. package/dist/typeshed-fallback/stubs/pygit2/pygit2/repository.pyi +4 -14
  202. package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +7 -1
  203. package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
  204. package/dist/typeshed-fallback/stubs/regex/METADATA.toml +1 -1
  205. package/dist/typeshed-fallback/stubs/regex/regex/_regex_core.pyi +35 -35
  206. package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +10 -10
  207. package/dist/typeshed-fallback/stubs/requests/METADATA.toml +1 -1
  208. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +16 -9
  209. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +4 -2
  210. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_modified.pyi +16 -5
  211. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +25 -10
  212. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +38 -16
  213. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +58 -30
  214. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +2 -1
  215. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +1 -1
  216. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +1 -1
  217. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/upload.pyi +2 -2
  218. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dep_util.pyi +1 -3
  219. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +8 -5
  220. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +14 -6
  221. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +4 -2
  222. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +8 -4
  223. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -3
  224. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -1
  225. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
  226. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install.pyi +3 -1
  227. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +10 -1
  228. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_scripts.pyi +1 -3
  229. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/upload_docs.pyi +2 -3
  230. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
  231. package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
  232. package/dist/typeshed-fallback/stubs/uWSGI/METADATA.toml +4 -1
  233. package/dist/typeshed-fallback/stubs/ujson/METADATA.toml +1 -1
  234. package/dist/typeshed-fallback/stubs/wurlitzer/METADATA.toml +1 -1
  235. package/dist/typeshed-fallback/stubs/wurlitzer/wurlitzer.pyi +48 -6
  236. package/package.json +1 -1
@@ -3,13 +3,13 @@ import sys
3
3
  import typing
4
4
  from _collections_abc import dict_items, dict_keys, dict_values
5
5
  from _typeshed import IdentityFunction
6
+ from contextlib import AbstractAsyncContextManager as AsyncContextManager, AbstractContextManager as ContextManager
6
7
  from typing import ( # noqa: Y022,Y037,Y038,Y039
7
8
  IO as IO,
8
9
  TYPE_CHECKING as TYPE_CHECKING,
9
10
  AbstractSet as AbstractSet,
10
11
  Any as Any,
11
12
  AnyStr as AnyStr,
12
- AsyncContextManager as AsyncContextManager,
13
13
  AsyncGenerator as AsyncGenerator,
14
14
  AsyncIterable as AsyncIterable,
15
15
  AsyncIterator as AsyncIterator,
@@ -20,7 +20,6 @@ from typing import ( # noqa: Y022,Y037,Y038,Y039
20
20
  ClassVar as ClassVar,
21
21
  Collection as Collection,
22
22
  Container as Container,
23
- ContextManager as ContextManager,
24
23
  Coroutine as Coroutine,
25
24
  Counter as Counter,
26
25
  DefaultDict as DefaultDict,
@@ -95,6 +94,7 @@ __all__ = [
95
94
  "Coroutine",
96
95
  "AsyncGenerator",
97
96
  "AsyncContextManager",
97
+ "CapsuleType",
98
98
  "ChainMap",
99
99
  "ContextManager",
100
100
  "Counter",
@@ -166,6 +166,7 @@ __all__ = [
166
166
  "MutableMapping",
167
167
  "MutableSequence",
168
168
  "MutableSet",
169
+ "NoDefault",
169
170
  "Optional",
170
171
  "Pattern",
171
172
  "Reversible",
@@ -379,86 +380,6 @@ else:
379
380
  def __or__(self, other: Any) -> _SpecialForm: ...
380
381
  def __ror__(self, other: Any) -> _SpecialForm: ...
381
382
 
382
- # New things in 3.xx
383
- # The `default` parameter was added to TypeVar, ParamSpec, and TypeVarTuple (PEP 696)
384
- # The `infer_variance` parameter was added to TypeVar in 3.12 (PEP 695)
385
- # typing_extensions.override (PEP 698)
386
- @final
387
- class TypeVar:
388
- @property
389
- def __name__(self) -> str: ...
390
- @property
391
- def __bound__(self) -> Any | None: ...
392
- @property
393
- def __constraints__(self) -> tuple[Any, ...]: ...
394
- @property
395
- def __covariant__(self) -> bool: ...
396
- @property
397
- def __contravariant__(self) -> bool: ...
398
- @property
399
- def __infer_variance__(self) -> bool: ...
400
- @property
401
- def __default__(self) -> Any | None: ...
402
- def __init__(
403
- self,
404
- name: str,
405
- *constraints: Any,
406
- bound: Any | None = None,
407
- covariant: bool = False,
408
- contravariant: bool = False,
409
- default: Any | None = None,
410
- infer_variance: bool = False,
411
- ) -> None: ...
412
- if sys.version_info >= (3, 10):
413
- def __or__(self, right: Any) -> _SpecialForm: ...
414
- def __ror__(self, left: Any) -> _SpecialForm: ...
415
- if sys.version_info >= (3, 11):
416
- def __typing_subst__(self, arg: Any) -> Any: ...
417
-
418
- @final
419
- class ParamSpec:
420
- @property
421
- def __name__(self) -> str: ...
422
- @property
423
- def __bound__(self) -> Any | None: ...
424
- @property
425
- def __covariant__(self) -> bool: ...
426
- @property
427
- def __contravariant__(self) -> bool: ...
428
- @property
429
- def __infer_variance__(self) -> bool: ...
430
- @property
431
- def __default__(self) -> Any | None: ...
432
- def __init__(
433
- self,
434
- name: str,
435
- *,
436
- bound: None | type[Any] | str = None,
437
- contravariant: bool = False,
438
- covariant: bool = False,
439
- default: type[Any] | str | None = None,
440
- ) -> None: ...
441
- @property
442
- def args(self) -> ParamSpecArgs: ...
443
- @property
444
- def kwargs(self) -> ParamSpecKwargs: ...
445
-
446
- @final
447
- class TypeVarTuple:
448
- @property
449
- def __name__(self) -> str: ...
450
- @property
451
- def __default__(self) -> Any | None: ...
452
- def __init__(self, name: str, *, default: Any | None = None) -> None: ...
453
- def __iter__(self) -> Any: ... # Unpack[Self]
454
-
455
- class deprecated:
456
- message: LiteralString
457
- category: type[Warning] | None
458
- stacklevel: int
459
- def __init__(self, message: LiteralString, /, *, category: type[Warning] | None = ..., stacklevel: int = 1) -> None: ...
460
- def __call__(self, arg: _T, /) -> _T: ...
461
-
462
383
  if sys.version_info >= (3, 12):
463
384
  from collections.abc import Buffer as Buffer
464
385
  from types import get_original_bases as get_original_bases
@@ -494,10 +415,110 @@ else:
494
415
  def __buffer__(self, flags: int, /) -> memoryview: ...
495
416
 
496
417
  if sys.version_info >= (3, 13):
497
- from typing import get_protocol_members as get_protocol_members, is_protocol as is_protocol
418
+ from types import CapsuleType as CapsuleType
419
+ from typing import (
420
+ NoDefault as NoDefault,
421
+ ParamSpec as ParamSpec,
422
+ TypeVar as TypeVar,
423
+ TypeVarTuple as TypeVarTuple,
424
+ get_protocol_members as get_protocol_members,
425
+ is_protocol as is_protocol,
426
+ )
427
+ from warnings import deprecated as deprecated
498
428
  else:
499
429
  def is_protocol(tp: type, /) -> bool: ...
500
430
  def get_protocol_members(tp: type, /) -> frozenset[str]: ...
431
+ @final
432
+ class _NoDefaultType: ...
433
+
434
+ NoDefault: _NoDefaultType
435
+ @final
436
+ class CapsuleType: ...
437
+
438
+ class deprecated:
439
+ message: LiteralString
440
+ category: type[Warning] | None
441
+ stacklevel: int
442
+ def __init__(self, message: LiteralString, /, *, category: type[Warning] | None = ..., stacklevel: int = 1) -> None: ...
443
+ def __call__(self, arg: _T, /) -> _T: ...
444
+
445
+ @final
446
+ class TypeVar:
447
+ @property
448
+ def __name__(self) -> str: ...
449
+ @property
450
+ def __bound__(self) -> Any | None: ...
451
+ @property
452
+ def __constraints__(self) -> tuple[Any, ...]: ...
453
+ @property
454
+ def __covariant__(self) -> bool: ...
455
+ @property
456
+ def __contravariant__(self) -> bool: ...
457
+ @property
458
+ def __infer_variance__(self) -> bool: ...
459
+ @property
460
+ def __default__(self) -> Any: ...
461
+ def __init__(
462
+ self,
463
+ name: str,
464
+ *constraints: Any,
465
+ bound: Any | None = None,
466
+ covariant: bool = False,
467
+ contravariant: bool = False,
468
+ default: Any = ...,
469
+ infer_variance: bool = False,
470
+ ) -> None: ...
471
+ def has_default(self) -> bool: ...
472
+ def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
473
+ if sys.version_info >= (3, 10):
474
+ def __or__(self, right: Any) -> _SpecialForm: ...
475
+ def __ror__(self, left: Any) -> _SpecialForm: ...
476
+ if sys.version_info >= (3, 11):
477
+ def __typing_subst__(self, arg: Any) -> Any: ...
478
+
479
+ @final
480
+ class ParamSpec:
481
+ @property
482
+ def __name__(self) -> str: ...
483
+ @property
484
+ def __bound__(self) -> Any | None: ...
485
+ @property
486
+ def __covariant__(self) -> bool: ...
487
+ @property
488
+ def __contravariant__(self) -> bool: ...
489
+ @property
490
+ def __infer_variance__(self) -> bool: ...
491
+ @property
492
+ def __default__(self) -> Any: ...
493
+ def __init__(
494
+ self,
495
+ name: str,
496
+ *,
497
+ bound: None | type[Any] | str = None,
498
+ contravariant: bool = False,
499
+ covariant: bool = False,
500
+ default: Any = ...,
501
+ ) -> None: ...
502
+ @property
503
+ def args(self) -> ParamSpecArgs: ...
504
+ @property
505
+ def kwargs(self) -> ParamSpecKwargs: ...
506
+ def has_default(self) -> bool: ...
507
+ def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
508
+ if sys.version_info >= (3, 10):
509
+ def __or__(self, right: Any) -> _SpecialForm: ...
510
+ def __ror__(self, left: Any) -> _SpecialForm: ...
511
+
512
+ @final
513
+ class TypeVarTuple:
514
+ @property
515
+ def __name__(self) -> str: ...
516
+ @property
517
+ def __default__(self) -> Any: ...
518
+ def __init__(self, name: str, *, default: Any = ...) -> None: ...
519
+ def __iter__(self) -> Any: ... # Unpack[Self]
520
+ def has_default(self) -> bool: ...
521
+ def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
501
522
 
502
523
  class Doc:
503
524
  documentation: str
@@ -329,7 +329,7 @@ class _AssertRaisesContext(_AssertRaisesBaseContext, Generic[_E]):
329
329
  self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None
330
330
  ) -> bool: ...
331
331
  if sys.version_info >= (3, 9):
332
- def __class_getitem__(cls, item: Any) -> GenericAlias: ...
332
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
333
333
 
334
334
  class _AssertWarnsContext(_AssertRaisesBaseContext):
335
335
  warning: WarningMessage
@@ -56,7 +56,7 @@ class _NetlocResultMixinBase(Generic[AnyStr]):
56
56
  @property
57
57
  def port(self) -> int | None: ...
58
58
  if sys.version_info >= (3, 9):
59
- def __class_getitem__(cls, item: Any) -> GenericAlias: ...
59
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
60
60
 
61
61
  class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...
62
62
  class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ...
@@ -52,16 +52,23 @@ _T = TypeVar("_T")
52
52
  _UrlopenRet: TypeAlias = Any
53
53
  _DataType: TypeAlias = ReadableBuffer | SupportsRead[bytes] | Iterable[bytes] | None
54
54
 
55
- def urlopen(
56
- url: str | Request,
57
- data: _DataType | None = None,
58
- timeout: float | None = ...,
59
- *,
60
- cafile: str | None = None,
61
- capath: str | None = None,
62
- cadefault: bool = False,
63
- context: ssl.SSLContext | None = None,
64
- ) -> _UrlopenRet: ...
55
+ if sys.version_info >= (3, 13):
56
+ def urlopen(
57
+ url: str | Request, data: _DataType | None = None, timeout: float | None = ..., *, context: ssl.SSLContext | None = None
58
+ ) -> _UrlopenRet: ...
59
+
60
+ else:
61
+ def urlopen(
62
+ url: str | Request,
63
+ data: _DataType | None = None,
64
+ timeout: float | None = ...,
65
+ *,
66
+ cafile: str | None = None,
67
+ capath: str | None = None,
68
+ cadefault: bool = False,
69
+ context: ssl.SSLContext | None = None,
70
+ ) -> _UrlopenRet: ...
71
+
65
72
  def install_opener(opener: OpenerDirector) -> None: ...
66
73
  def build_opener(*handlers: BaseHandler | Callable[[], BaseHandler]) -> OpenerDirector: ...
67
74
 
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  import sys
3
3
  from _typeshed import StrOrBytesPath
4
- from collections.abc import Sequence
4
+ from collections.abc import Iterable, Sequence
5
5
  from types import SimpleNamespace
6
6
 
7
7
  logger: logging.Logger
@@ -17,7 +17,20 @@ class EnvBuilder:
17
17
  with_pip: bool
18
18
  prompt: str | None
19
19
 
20
- if sys.version_info >= (3, 9):
20
+ if sys.version_info >= (3, 13):
21
+ def __init__(
22
+ self,
23
+ system_site_packages: bool = False,
24
+ clear: bool = False,
25
+ symlinks: bool = False,
26
+ upgrade: bool = False,
27
+ with_pip: bool = False,
28
+ prompt: str | None = None,
29
+ upgrade_deps: bool = False,
30
+ *,
31
+ scm_ignore_files: Iterable[str] = ...,
32
+ ) -> None: ...
33
+ elif sys.version_info >= (3, 9):
21
34
  def __init__(
22
35
  self,
23
36
  system_site_packages: bool = False,
@@ -54,8 +67,23 @@ class EnvBuilder:
54
67
  def install_scripts(self, context: SimpleNamespace, path: str) -> None: ...
55
68
  if sys.version_info >= (3, 9):
56
69
  def upgrade_dependencies(self, context: SimpleNamespace) -> None: ...
70
+ if sys.version_info >= (3, 13):
71
+ def create_git_ignore_file(self, context: SimpleNamespace) -> None: ...
57
72
 
58
- if sys.version_info >= (3, 9):
73
+ if sys.version_info >= (3, 13):
74
+ def create(
75
+ env_dir: StrOrBytesPath,
76
+ system_site_packages: bool = False,
77
+ clear: bool = False,
78
+ symlinks: bool = False,
79
+ with_pip: bool = False,
80
+ prompt: str | None = None,
81
+ upgrade_deps: bool = False,
82
+ *,
83
+ scm_ignore_files: Iterable[str] = ...,
84
+ ) -> None: ...
85
+
86
+ elif sys.version_info >= (3, 9):
59
87
  def create(
60
88
  env_dir: StrOrBytesPath,
61
89
  system_site_packages: bool = False,
@@ -3,7 +3,7 @@ from _warnings import warn as warn, warn_explicit as warn_explicit
3
3
  from collections.abc import Sequence
4
4
  from types import ModuleType, TracebackType
5
5
  from typing import Any, Generic, Literal, TextIO, TypeVar, overload
6
- from typing_extensions import TypeAlias
6
+ from typing_extensions import LiteralString, TypeAlias
7
7
 
8
8
  __all__ = [
9
9
  "warn",
@@ -16,6 +16,10 @@ __all__ = [
16
16
  "catch_warnings",
17
17
  ]
18
18
 
19
+ if sys.version_info >= (3, 13):
20
+ __all__ += ["deprecated"]
21
+
22
+ _T = TypeVar("_T")
19
23
  _W = TypeVar("_W", bound=list[WarningMessage] | None)
20
24
  _ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"]
21
25
 
@@ -110,3 +114,11 @@ class catch_warnings(Generic[_W]):
110
114
  def __exit__(
111
115
  self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
112
116
  ) -> None: ...
117
+
118
+ if sys.version_info >= (3, 13):
119
+ class deprecated:
120
+ message: LiteralString
121
+ category: type[Warning] | None
122
+ stacklevel: int
123
+ def __init__(self, message: LiteralString, /, *, category: type[Warning] | None = ..., stacklevel: int = 1) -> None: ...
124
+ def __call__(self, arg: _T, /) -> _T: ...
@@ -4,6 +4,8 @@ from collections.abc import Callable
4
4
  from typing import IO, Any
5
5
 
6
6
  __all__ = ["FileWrapper", "guess_scheme", "application_uri", "request_uri", "shift_path_info", "setup_testing_defaults"]
7
+ if sys.version_info >= (3, 13):
8
+ __all__ += ["is_hop_by_hop"]
7
9
 
8
10
  class FileWrapper:
9
11
  filelike: IO[bytes]
@@ -218,23 +218,23 @@ class D3DFMT(IntEnum):
218
218
  A2B10G10R10_XR_BIAS = 119
219
219
  BINARYBUFFER = 199
220
220
 
221
- UYVY: int
222
- R8G8_B8G8: int
223
- YUY2: int
224
- G8R8_G8B8: int
225
- DXT1: int
226
- DXT2: int
227
- DXT3: int
228
- DXT4: int
229
- DXT5: int
230
- DX10: int
231
- BC4S: int
232
- BC4U: int
233
- BC5S: int
234
- BC5U: int
235
- ATI1: int
236
- ATI2: int
237
- MULTI2_ARGB8: int
221
+ UYVY = 1498831189 # i32(b"UYVY")
222
+ R8G8_B8G8 = 1195525970 # i32(b"RGBG")
223
+ YUY2 = 844715353 # i32(b"YUY2")
224
+ G8R8_G8B8 = 1111970375 # i32(b"GRGB")
225
+ DXT1 = 827611204 # i32(b"DXT1")
226
+ DXT2 = 844388420 # i32(b"DXT2")
227
+ DXT3 = 861165636 # i32(b"DXT3")
228
+ DXT4 = 877942852 # i32(b"DXT4")
229
+ DXT5 = 894720068 # i32(b"DXT5")
230
+ DX10 = 808540228 # i32(b"DX10")
231
+ BC4S = 1395934018 # i32(b"BC4S")
232
+ BC4U = 1429488450 # i32(b"BC4U")
233
+ BC5S = 1395999554 # i32(b"BC5S")
234
+ BC5U = 1429553986 # i32(b"BC5U")
235
+ ATI1 = 826889281 # i32(b"ATI1")
236
+ ATI2 = 843666497 # i32(b"ATI2")
237
+ MULTI2_ARGB8 = 827606349 # i32(b"MET1")
238
238
 
239
239
  DDSD_CAPS: Final = 0x1
240
240
  DDSD_HEIGHT: Final = 0x2
@@ -2,7 +2,7 @@ from _typeshed import Incomplete, SupportsRead, SupportsWrite, Unused
2
2
  from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
3
3
  from enum import IntEnum
4
4
  from pathlib import Path
5
- from typing import Any, ClassVar, Literal, Protocol, SupportsBytes
5
+ from typing import Any, ClassVar, Final, Literal, Protocol, SupportsBytes
6
6
  from typing_extensions import Self, TypeAlias, TypeGuard
7
7
 
8
8
  from PIL.PyAccess import PyAccess
@@ -65,13 +65,13 @@ class Transpose(IntEnum):
65
65
  TRANSVERSE = 6
66
66
 
67
67
  # All Transpose items
68
- FLIP_LEFT_RIGHT: Literal[0]
69
- FLIP_TOP_BOTTOM: Literal[1]
70
- ROTATE_90: Literal[2]
71
- ROTATE_180: Literal[3]
72
- ROTATE_270: Literal[4]
73
- TRANSPOSE: Literal[5]
74
- TRANSVERSE: Literal[6]
68
+ FLIP_LEFT_RIGHT: Final = 0
69
+ FLIP_TOP_BOTTOM: Final = 1
70
+ ROTATE_90: Final = 2
71
+ ROTATE_180: Final = 3
72
+ ROTATE_270: Final = 4
73
+ TRANSPOSE: Final = 5
74
+ TRANSVERSE: Final = 6
75
75
 
76
76
  class Transform(IntEnum):
77
77
  AFFINE = 0
@@ -81,11 +81,11 @@ class Transform(IntEnum):
81
81
  MESH = 4
82
82
 
83
83
  # All Transform items
84
- AFFINE: Literal[0]
85
- EXTENT: Literal[1]
86
- PERSPECTIVE: Literal[2]
87
- QUAD: Literal[3]
88
- MESH: Literal[4]
84
+ AFFINE: Final = 0
85
+ EXTENT: Final = 1
86
+ PERSPECTIVE: Final = 2
87
+ QUAD: Final = 3
88
+ MESH: Final = 4
89
89
 
90
90
  class Resampling(IntEnum):
91
91
  NEAREST = 0
@@ -96,12 +96,12 @@ class Resampling(IntEnum):
96
96
  HAMMING = 5
97
97
 
98
98
  # All Resampling items
99
- NEAREST: Literal[0]
100
- LANCZOS: Literal[1]
101
- BILINEAR: Literal[2]
102
- BICUBIC: Literal[3]
103
- BOX: Literal[4]
104
- HAMMING: Literal[5]
99
+ NEAREST: Final = 0
100
+ LANCZOS: Final = 1
101
+ BILINEAR: Final = 2
102
+ BICUBIC: Final = 3
103
+ BOX: Final = 4
104
+ HAMMING: Final = 5
105
105
 
106
106
  class Dither(IntEnum):
107
107
  NONE = 0
@@ -110,18 +110,18 @@ class Dither(IntEnum):
110
110
  FLOYDSTEINBERG = 3
111
111
 
112
112
  # All Dither items
113
- NONE: Literal[0]
114
- ORDERED: Literal[1]
115
- RASTERIZE: Literal[2]
116
- FLOYDSTEINBERG: Literal[3]
113
+ NONE: Final = 0
114
+ ORDERED: Final = 1
115
+ RASTERIZE: Final = 2
116
+ FLOYDSTEINBERG: Final = 3
117
117
 
118
118
  class Palette(IntEnum):
119
119
  WEB = 0
120
120
  ADAPTIVE = 1
121
121
 
122
122
  # All Palette items
123
- WEB: Literal[0]
124
- ADAPTIVE: Literal[1]
123
+ WEB: Final = 0
124
+ ADAPTIVE: Final = 1
125
125
 
126
126
  class Quantize(IntEnum):
127
127
  MEDIANCUT = 0
@@ -130,10 +130,10 @@ class Quantize(IntEnum):
130
130
  LIBIMAGEQUANT = 3
131
131
 
132
132
  # All Quantize items
133
- MEDIANCUT: Literal[0]
134
- MAXCOVERAGE: Literal[1]
135
- FASTOCTREE: Literal[2]
136
- LIBIMAGEQUANT: Literal[3]
133
+ MEDIANCUT: Final = 0
134
+ MAXCOVERAGE: Final = 1
135
+ FASTOCTREE: Final = 2
136
+ LIBIMAGEQUANT: Final = 3
137
137
 
138
138
  ID: list[str]
139
139
  OPEN: dict[str, Any]
@@ -1,3 +1,4 @@
1
+ from _typeshed import StrOrBytesPath
1
2
  from typing import ClassVar, Literal
2
3
 
3
4
  from . import ImageFile
@@ -8,6 +9,6 @@ class WalImageFile(ImageFile.ImageFile):
8
9
  format_description: ClassVar[str]
9
10
  def load(self) -> _PixelAccessor: ...
10
11
 
11
- def open(filename): ...
12
+ def open(filename: StrOrBytesPath) -> WalImageFile: ...
12
13
 
13
14
  quake2palette: bytes
@@ -1,13 +1,13 @@
1
- def i8(c): ...
2
- def o8(i): ...
3
- def i16le(c, o: int = 0): ...
4
- def si16le(c, o: int = 0): ...
5
- def si16be(c, o: int = 0): ...
6
- def i32le(c, o: int = 0): ...
7
- def si32le(c, o: int = 0): ...
8
- def i16be(c, o: int = 0): ...
9
- def i32be(c, o: int = 0): ...
10
- def o16le(i): ...
11
- def o32le(i): ...
12
- def o16be(i): ...
13
- def o32be(i): ...
1
+ def i8(c: bytes) -> int: ...
2
+ def o8(i: int) -> bytes: ...
3
+ def i16le(c: bytes, o: int = 0) -> int: ...
4
+ def si16le(c: bytes, o: int = 0) -> int: ...
5
+ def si16be(c: bytes, o: int = 0) -> int: ...
6
+ def i32le(c: bytes, o: int = 0) -> int: ...
7
+ def si32le(c: bytes, o: int = 0) -> int: ...
8
+ def i16be(c: bytes, o: int = 0) -> int: ...
9
+ def i32be(c: bytes, o: int = 0) -> int: ...
10
+ def o16le(i: int) -> bytes: ...
11
+ def o32le(i: int) -> bytes: ...
12
+ def o16be(i: int) -> bytes: ...
13
+ def o32be(i: int) -> bytes: ...
@@ -1,9 +1,14 @@
1
+ import sys
1
2
  from _typeshed import SupportsItems, SupportsKeysAndGetItem
2
3
  from _typeshed.wsgi import WSGIEnvironment
3
- from cgi import FieldStorage
4
4
  from collections.abc import Collection, Iterable, Iterator, MutableMapping
5
5
  from typing import Any, Literal, TypeVar, overload
6
- from typing_extensions import Self
6
+ from typing_extensions import Self, TypeAlias
7
+
8
+ if sys.version_info >= (3, 13):
9
+ _FieldStorage: TypeAlias = Any
10
+ else:
11
+ from cgi import FieldStorage as _FieldStorage
7
12
 
8
13
  _T = TypeVar("_T")
9
14
  _KT = TypeVar("_KT")
@@ -19,7 +24,7 @@ class MultiDict(MutableMapping[_KT, _VT]):
19
24
  @classmethod
20
25
  def view_list(cls, lst: list[tuple[_KT, _VT]]) -> MultiDict[_KT, _VT]: ...
21
26
  @classmethod
22
- def from_fieldstorage(cls, fs: FieldStorage) -> MultiDict[str, str | FieldStorage]: ...
27
+ def from_fieldstorage(cls, fs: _FieldStorage) -> MultiDict[str, str | _FieldStorage]: ...
23
28
  def __getitem__(self, key: _KT) -> _VT: ...
24
29
  def __setitem__(self, key: _KT, value: _VT) -> None: ...
25
30
  def add(self, key: _KT, value: _VT) -> None: ...
@@ -1,8 +1,8 @@
1
1
  import datetime
2
2
  import io
3
+ import sys
3
4
  from _typeshed import ExcInfo, ReadableBuffer, SupportsItems, SupportsKeysAndGetItem, SupportsNoArgReadline, SupportsRead
4
5
  from _typeshed.wsgi import WSGIApplication, WSGIEnvironment
5
- from cgi import FieldStorage
6
6
  from collections.abc import Iterable, Mapping
7
7
  from re import Pattern
8
8
  from tempfile import _TemporaryFileWrapper
@@ -19,6 +19,11 @@ from webob.headers import EnvironHeaders
19
19
  from webob.multidict import GetDict, MultiDict, NestedMultiDict, NoVars
20
20
  from webob.response import Response, _HTTPHeader
21
21
 
22
+ if sys.version_info >= (3, 13):
23
+ _FieldStorage: TypeAlias = Any
24
+ else:
25
+ from cgi import FieldStorage as _FieldStorage
26
+
22
27
  _T = TypeVar("_T")
23
28
  _HTTPMethod: TypeAlias = Literal["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH"]
24
29
  _ListOrTuple: TypeAlias = list[_T] | tuple[_T, ...]
@@ -34,7 +39,9 @@ class _RequestCacheControlDict(TypedDict, total=False):
34
39
  no_transform: bool
35
40
  max_age: int
36
41
 
37
- class _FieldStorageWithFile(FieldStorage):
42
+ # On py313 this subclasses `Any`, hence the type: ignore.
43
+ # This is needed for the regr_test.py script, which uses --disallow-subclassing-any
44
+ class _FieldStorageWithFile(_FieldStorage): # type: ignore[misc]
38
45
  file: IO[bytes]
39
46
  filename: str
40
47
 
@@ -244,4 +251,4 @@ class Transcoder:
244
251
  errors: str
245
252
  def __init__(self, charset: str, errors: str = "strict") -> None: ...
246
253
  def transcode_query(self, q: str) -> str: ...
247
- def transcode_fs(self, fs: FieldStorage, content_type: str) -> io.BytesIO: ...
254
+ def transcode_fs(self, fs: _FieldStorage, content_type: str) -> io.BytesIO: ...
@@ -1,7 +1,7 @@
1
1
  from enum import IntEnum
2
2
 
3
3
  class ATNType(IntEnum):
4
- LEXER: int
5
- PARSER: int
4
+ LEXER = 0
5
+ PARSER = 1
6
6
  @classmethod
7
7
  def fromOrdinal(cls, i: int): ...
@@ -4,14 +4,14 @@ from enum import IntEnum
4
4
  Lexer: Incomplete
5
5
 
6
6
  class LexerActionType(IntEnum):
7
- CHANNEL: int
8
- CUSTOM: int
9
- MODE: int
10
- MORE: int
11
- POP_MODE: int
12
- PUSH_MODE: int
13
- SKIP: int
14
- TYPE: int
7
+ CHANNEL = 0
8
+ CUSTOM = 1
9
+ MODE = 2
10
+ MORE = 3
11
+ POP_MODE = 4
12
+ PUSH_MODE = 5
13
+ SKIP = 6
14
+ TYPE = 7
15
15
 
16
16
  class LexerAction:
17
17
  actionType: Incomplete