Kurtgitgit commited on
Commit
fe7cb23
·
verified ·
1 Parent(s): 11567bd

Upload folder using huggingface_hub (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +3 -0
  2. venv/Lib/site-packages/aiohttp-3.14.1.dist-info/METADATA +257 -0
  3. venv/Lib/site-packages/aiohttp-3.14.1.dist-info/RECORD +138 -0
  4. venv/Lib/site-packages/aiohttp-3.14.1.dist-info/WHEEL +5 -0
  5. venv/Lib/site-packages/aiohttp-3.14.1.dist-info/top_level.txt +1 -0
  6. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/INSTALLER +1 -0
  7. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/METADATA +112 -0
  8. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/RECORD +9 -0
  9. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/WHEEL +5 -0
  10. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/licenses/LICENSE +201 -0
  11. venv/Lib/site-packages/aiosignal-1.4.0.dist-info/top_level.txt +1 -0
  12. venv/Lib/site-packages/aiosignal/__init__.py +59 -0
  13. venv/Lib/site-packages/aiosignal/__pycache__/__init__.cpython-311.pyc +0 -0
  14. venv/Lib/site-packages/aiosignal/py.typed +0 -0
  15. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/INSTALLER +1 -0
  16. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/METADATA +145 -0
  17. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/RECORD +11 -0
  18. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/WHEEL +4 -0
  19. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/entry_points.txt +4 -0
  20. venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/licenses/LICENSE +21 -0
  21. venv/Lib/site-packages/annotated_doc/__init__.py +3 -0
  22. venv/Lib/site-packages/annotated_doc/__pycache__/__init__.cpython-311.pyc +0 -0
  23. venv/Lib/site-packages/annotated_doc/__pycache__/main.cpython-311.pyc +0 -0
  24. venv/Lib/site-packages/annotated_doc/main.py +36 -0
  25. venv/Lib/site-packages/annotated_doc/py.typed +0 -0
  26. venv/Lib/site-packages/anyio-4.14.0.dist-info/INSTALLER +1 -0
  27. venv/Lib/site-packages/anyio-4.14.0.dist-info/METADATA +107 -0
  28. venv/Lib/site-packages/anyio-4.14.0.dist-info/RECORD +94 -0
  29. venv/Lib/site-packages/anyio-4.14.0.dist-info/WHEEL +5 -0
  30. venv/Lib/site-packages/anyio-4.14.0.dist-info/entry_points.txt +2 -0
  31. venv/Lib/site-packages/anyio-4.14.0.dist-info/licenses/LICENSE +20 -0
  32. venv/Lib/site-packages/anyio-4.14.0.dist-info/top_level.txt +1 -0
  33. venv/Lib/site-packages/anyio/__init__.py +115 -0
  34. venv/Lib/site-packages/anyio/__pycache__/__init__.cpython-311.pyc +0 -0
  35. venv/Lib/site-packages/anyio/__pycache__/from_thread.cpython-311.pyc +0 -0
  36. venv/Lib/site-packages/anyio/__pycache__/functools.cpython-311.pyc +0 -0
  37. venv/Lib/site-packages/anyio/__pycache__/itertools.cpython-311.pyc +0 -0
  38. venv/Lib/site-packages/anyio/__pycache__/lowlevel.cpython-311.pyc +0 -0
  39. venv/Lib/site-packages/anyio/__pycache__/pytest_plugin.cpython-311.pyc +0 -0
  40. venv/Lib/site-packages/anyio/__pycache__/to_interpreter.cpython-311.pyc +0 -0
  41. venv/Lib/site-packages/anyio/__pycache__/to_process.cpython-311.pyc +0 -0
  42. venv/Lib/site-packages/anyio/__pycache__/to_thread.cpython-311.pyc +0 -0
  43. venv/Lib/site-packages/anyio/_backends/__init__.py +0 -0
  44. venv/Lib/site-packages/anyio/_backends/__pycache__/__init__.cpython-311.pyc +0 -0
  45. venv/Lib/site-packages/anyio/_backends/__pycache__/_asyncio.cpython-311.pyc +3 -0
  46. venv/Lib/site-packages/anyio/_backends/__pycache__/_trio.cpython-311.pyc +0 -0
  47. venv/Lib/site-packages/anyio/_backends/_asyncio.py +0 -0
  48. venv/Lib/site-packages/anyio/_backends/_trio.py +1456 -0
  49. venv/Lib/site-packages/anyio/_core/__init__.py +0 -0
  50. venv/Lib/site-packages/anyio/_core/__pycache__/__init__.cpython-311.pyc +0 -0
.gitattributes CHANGED
@@ -38,3 +38,6 @@ venv/Lib/site-packages/__pycache__/typing_extensions.cpython-311.pyc filter=lfs
38
  venv/Lib/site-packages/absl/testing/__pycache__/absltest.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
39
  venv/Lib/site-packages/aiohttp/_http_parser.cp311-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
40
  venv/Lib/site-packages/aiohttp/_websocket/reader_c.cp311-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
 
 
 
 
38
  venv/Lib/site-packages/absl/testing/__pycache__/absltest.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
39
  venv/Lib/site-packages/aiohttp/_http_parser.cp311-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
40
  venv/Lib/site-packages/aiohttp/_websocket/reader_c.cp311-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
41
+ venv/Lib/site-packages/anyio/_backends/__pycache__/_asyncio.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
42
+ venv/Lib/site-packages/attr/__pycache__/_make.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
43
+ venv/Lib/site-packages/charset_normalizer/md__mypyc.cp311-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
venv/Lib/site-packages/aiohttp-3.14.1.dist-info/METADATA ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: aiohttp
3
+ Version: 3.14.1
4
+ Summary: Async http client/server framework (asyncio)
5
+ Maintainer-email: aiohttp team <team@aiohttp.org>
6
+ License: Apache-2.0 AND MIT
7
+ Project-URL: Homepage, https://github.com/aio-libs/aiohttp
8
+ Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
9
+ Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
10
+ Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
11
+ Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
12
+ Project-URL: Docs: Changelog, https://docs.aiohttp.org/en/stable/changes.html
13
+ Project-URL: Docs: RTD, https://docs.aiohttp.org
14
+ Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
15
+ Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Framework :: AsyncIO
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: MacOS :: MacOS X
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Programming Language :: Python
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
29
+ Classifier: Topic :: Internet :: WWW/HTTP
30
+ Requires-Python: >=3.10
31
+ Description-Content-Type: text/x-rst
32
+ License-File: LICENSE.txt
33
+ License-File: vendor/llhttp/LICENSE
34
+ Requires-Dist: aiohappyeyeballs>=2.5.0
35
+ Requires-Dist: aiosignal>=1.4.0
36
+ Requires-Dist: async-timeout<6.0,>=4.0; python_version < "3.11"
37
+ Requires-Dist: attrs>=17.3.0
38
+ Requires-Dist: frozenlist>=1.1.1
39
+ Requires-Dist: multidict<7.0,>=4.5
40
+ Requires-Dist: propcache>=0.2.0
41
+ Requires-Dist: typing_extensions>=4.4; python_version < "3.13"
42
+ Requires-Dist: yarl<2.0,>=1.17.0
43
+ Provides-Extra: speedups
44
+ Requires-Dist: aiodns>=3.3.0; (sys_platform != "android" and sys_platform != "ios") and extra == "speedups"
45
+ Requires-Dist: Brotli>=1.2; (platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"
46
+ Requires-Dist: brotlicffi>=1.2; platform_python_implementation != "CPython" and extra == "speedups"
47
+ Requires-Dist: backports.zstd; (platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios") and extra == "speedups"
48
+ Dynamic: license-file
49
+
50
+ ==================================
51
+ Async http client/server framework
52
+ ==================================
53
+
54
+ .. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg
55
+ :height: 64px
56
+ :width: 64px
57
+ :alt: aiohttp logo
58
+
59
+ |
60
+
61
+ .. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg
62
+ :target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
63
+ :alt: GitHub Actions status for master branch
64
+
65
+ .. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
66
+ :target: https://codecov.io/gh/aio-libs/aiohttp
67
+ :alt: codecov.io status for master branch
68
+
69
+ .. image:: https://badge.fury.io/py/aiohttp.svg
70
+ :target: https://pypi.org/project/aiohttp
71
+ :alt: Latest PyPI package version
72
+
73
+ .. image:: https://img.shields.io/pypi/dm/aiohttp
74
+ :target: https://pypistats.org/packages/aiohttp
75
+ :alt: Downloads count
76
+
77
+ .. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
78
+ :target: https://docs.aiohttp.org/
79
+ :alt: Latest Read The Docs
80
+
81
+ .. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
82
+ :target: https://codspeed.io/aio-libs/aiohttp
83
+ :alt: Codspeed.io status for aiohttp
84
+
85
+
86
+ Key Features
87
+ ============
88
+
89
+ - Supports both client and server side of HTTP protocol.
90
+ - Supports both client and server Web-Sockets out-of-the-box and avoids
91
+ Callback Hell.
92
+ - Provides Web-server with middleware and pluggable routing.
93
+
94
+
95
+ Getting started
96
+ ===============
97
+
98
+ Client
99
+ ------
100
+
101
+ To get something from the web:
102
+
103
+ .. code-block:: python
104
+
105
+ import aiohttp
106
+ import asyncio
107
+
108
+ async def main():
109
+
110
+ async with aiohttp.ClientSession() as session:
111
+ async with session.get('http://python.org') as response:
112
+
113
+ print("Status:", response.status)
114
+ print("Content-type:", response.headers['content-type'])
115
+
116
+ html = await response.text()
117
+ print("Body:", html[:15], "...")
118
+
119
+ asyncio.run(main())
120
+
121
+ This prints:
122
+
123
+ .. code-block::
124
+
125
+ Status: 200
126
+ Content-type: text/html; charset=utf-8
127
+ Body: <!doctype html> ...
128
+
129
+ Coming from `requests <https://requests.readthedocs.io/>`_ ? Read `why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>`_.
130
+
131
+ Server
132
+ ------
133
+
134
+ An example using a simple server:
135
+
136
+ .. code-block:: python
137
+
138
+ # examples/server_simple.py
139
+ from aiohttp import web
140
+
141
+ async def handle(request):
142
+ name = request.match_info.get('name', "Anonymous")
143
+ text = "Hello, " + name
144
+ return web.Response(text=text)
145
+
146
+ async def wshandle(request):
147
+ ws = web.WebSocketResponse()
148
+ await ws.prepare(request)
149
+
150
+ async for msg in ws:
151
+ if msg.type == web.WSMsgType.text:
152
+ await ws.send_str("Hello, {}".format(msg.data))
153
+ elif msg.type == web.WSMsgType.binary:
154
+ await ws.send_bytes(msg.data)
155
+ elif msg.type == web.WSMsgType.close:
156
+ break
157
+
158
+ return ws
159
+
160
+
161
+ app = web.Application()
162
+ app.add_routes([web.get('/', handle),
163
+ web.get('/echo', wshandle),
164
+ web.get('/{name}', handle)])
165
+
166
+ if __name__ == '__main__':
167
+ web.run_app(app)
168
+
169
+
170
+ Documentation
171
+ =============
172
+
173
+ https://aiohttp.readthedocs.io/
174
+
175
+
176
+ Demos
177
+ =====
178
+
179
+ https://github.com/aio-libs/aiohttp-demos
180
+
181
+
182
+ External links
183
+ ==============
184
+
185
+ * `Third party libraries
186
+ <http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
187
+ * `Built with aiohttp
188
+ <http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
189
+ * `Powered by aiohttp
190
+ <http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
191
+
192
+ Feel free to make a Pull Request for adding your link to these pages!
193
+
194
+
195
+ Communication channels
196
+ ======================
197
+
198
+ *aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
199
+
200
+ *Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
201
+
202
+ We support `Stack Overflow
203
+ <https://stackoverflow.com/questions/tagged/aiohttp>`_.
204
+ Please add *aiohttp* tag to your question there.
205
+
206
+ Requirements
207
+ ============
208
+
209
+ - attrs_
210
+ - multidict_
211
+ - yarl_
212
+ - frozenlist_
213
+
214
+ Optionally you may install the aiodns_ library (highly recommended for sake of speed).
215
+
216
+ .. _aiodns: https://pypi.python.org/pypi/aiodns
217
+ .. _attrs: https://github.com/python-attrs/attrs
218
+ .. _multidict: https://pypi.python.org/pypi/multidict
219
+ .. _frozenlist: https://pypi.org/project/frozenlist/
220
+ .. _yarl: https://pypi.python.org/pypi/yarl
221
+ .. _async-timeout: https://pypi.python.org/pypi/async_timeout
222
+
223
+
224
+ Keepsafe
225
+ ========
226
+
227
+ The aiohttp community would like to thank Keepsafe
228
+ (https://www.getkeepsafe.com) for its support in the early days of
229
+ the project.
230
+
231
+
232
+ Source code
233
+ ===========
234
+
235
+ The latest developer version is available in a GitHub repository:
236
+ https://github.com/aio-libs/aiohttp
237
+
238
+ Benchmarks
239
+ ==========
240
+
241
+ If you are interested in efficiency, the AsyncIO community maintains a
242
+ list of benchmarks on the official wiki:
243
+ https://github.com/python/asyncio/wiki/Benchmarks
244
+
245
+ --------
246
+
247
+ .. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
248
+ :target: https://matrix.to/#/%23aio-libs:matrix.org
249
+ :alt: Matrix Room — #aio-libs:matrix.org
250
+
251
+ .. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
252
+ :target: https://matrix.to/#/%23aio-libs-space:matrix.org
253
+ :alt: Matrix Space — #aio-libs-space:matrix.org
254
+
255
+ .. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=aiohttp
256
+ :target: https://insights.linuxfoundation.org/project/aiohttp
257
+ :alt: LFX Health Score
venv/Lib/site-packages/aiohttp-3.14.1.dist-info/RECORD ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiohttp-3.14.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ aiohttp-3.14.1.dist-info/METADATA,sha256=yRs-uzH3FV0W3T7xYohY_fggESigHjBwYf4i5D0IP8A,8519
3
+ aiohttp-3.14.1.dist-info/RECORD,,
4
+ aiohttp-3.14.1.dist-info/WHEEL,sha256=XHXMKJU3yoVh1ZanBXTJ5bDGb67oEYtF1S6bd8a4izI,101
5
+ aiohttp-3.14.1.dist-info/licenses/LICENSE.txt,sha256=6hlTcau_ZqOe71ZgCVXRE3wsGW3BRP_sRrbqUwznAEQ,11514
6
+ aiohttp-3.14.1.dist-info/licenses/vendor/llhttp/LICENSE,sha256=J5AS4CoQrP1Zo_LY8TpJczJTXYccKyfImYiYWwajpDg,1091
7
+ aiohttp-3.14.1.dist-info/top_level.txt,sha256=iv-JIaacmTl-hSho3QmphcKnbRRYx1st47yjz_178Ro,8
8
+ aiohttp/.hash/_cparser.pxd.hash,sha256=_MtHyWZIvAQQDQbH1CKgioo0gjS--ztYtUx09xwNpY0,108
9
+ aiohttp/.hash/_find_header.pxd.hash,sha256=TxG5w4etbVd6sfm5JWbdf5PW6LnuXRQnlMoFBVGKN2E,112
10
+ aiohttp/.hash/_http_parser.pyx.hash,sha256=nLgXu4vJDihEqLtY4w-PnsP5Q7DZLTPx1SfygzlfJFg,112
11
+ aiohttp/.hash/_http_writer.pyx.hash,sha256=UUkXTiHqUefgMS4OVxqOVJU9jFc926h2-FeZxT4vDGc,112
12
+ aiohttp/.hash/hdrs.py.hash,sha256=GYrcM9t_TFhYal1KDsi8bJHNI-56WjYezhPutetoxmI,103
13
+ aiohttp/__init__.py,sha256=sFCnVnIfl8_AThh0yv4_CON4rq0oLT2da4f2UoXjAoM,8618
14
+ aiohttp/__pycache__/__init__.cpython-311.pyc,,
15
+ aiohttp/__pycache__/_cookie_helpers.cpython-311.pyc,,
16
+ aiohttp/__pycache__/abc.cpython-311.pyc,,
17
+ aiohttp/__pycache__/base_protocol.cpython-311.pyc,,
18
+ aiohttp/__pycache__/client.cpython-311.pyc,,
19
+ aiohttp/__pycache__/client_exceptions.cpython-311.pyc,,
20
+ aiohttp/__pycache__/client_middleware_digest_auth.cpython-311.pyc,,
21
+ aiohttp/__pycache__/client_middlewares.cpython-311.pyc,,
22
+ aiohttp/__pycache__/client_proto.cpython-311.pyc,,
23
+ aiohttp/__pycache__/client_reqrep.cpython-311.pyc,,
24
+ aiohttp/__pycache__/client_ws.cpython-311.pyc,,
25
+ aiohttp/__pycache__/compression_utils.cpython-311.pyc,,
26
+ aiohttp/__pycache__/connector.cpython-311.pyc,,
27
+ aiohttp/__pycache__/cookiejar.cpython-311.pyc,,
28
+ aiohttp/__pycache__/formdata.cpython-311.pyc,,
29
+ aiohttp/__pycache__/hdrs.cpython-311.pyc,,
30
+ aiohttp/__pycache__/helpers.cpython-311.pyc,,
31
+ aiohttp/__pycache__/http.cpython-311.pyc,,
32
+ aiohttp/__pycache__/http_exceptions.cpython-311.pyc,,
33
+ aiohttp/__pycache__/http_parser.cpython-311.pyc,,
34
+ aiohttp/__pycache__/http_websocket.cpython-311.pyc,,
35
+ aiohttp/__pycache__/http_writer.cpython-311.pyc,,
36
+ aiohttp/__pycache__/log.cpython-311.pyc,,
37
+ aiohttp/__pycache__/multipart.cpython-311.pyc,,
38
+ aiohttp/__pycache__/payload.cpython-311.pyc,,
39
+ aiohttp/__pycache__/payload_streamer.cpython-311.pyc,,
40
+ aiohttp/__pycache__/pytest_plugin.cpython-311.pyc,,
41
+ aiohttp/__pycache__/resolver.cpython-311.pyc,,
42
+ aiohttp/__pycache__/streams.cpython-311.pyc,,
43
+ aiohttp/__pycache__/tcp_helpers.cpython-311.pyc,,
44
+ aiohttp/__pycache__/test_utils.cpython-311.pyc,,
45
+ aiohttp/__pycache__/tracing.cpython-311.pyc,,
46
+ aiohttp/__pycache__/typedefs.cpython-311.pyc,,
47
+ aiohttp/__pycache__/web.cpython-311.pyc,,
48
+ aiohttp/__pycache__/web_app.cpython-311.pyc,,
49
+ aiohttp/__pycache__/web_exceptions.cpython-311.pyc,,
50
+ aiohttp/__pycache__/web_fileresponse.cpython-311.pyc,,
51
+ aiohttp/__pycache__/web_log.cpython-311.pyc,,
52
+ aiohttp/__pycache__/web_middlewares.cpython-311.pyc,,
53
+ aiohttp/__pycache__/web_protocol.cpython-311.pyc,,
54
+ aiohttp/__pycache__/web_request.cpython-311.pyc,,
55
+ aiohttp/__pycache__/web_response.cpython-311.pyc,,
56
+ aiohttp/__pycache__/web_routedef.cpython-311.pyc,,
57
+ aiohttp/__pycache__/web_runner.cpython-311.pyc,,
58
+ aiohttp/__pycache__/web_server.cpython-311.pyc,,
59
+ aiohttp/__pycache__/web_urldispatcher.cpython-311.pyc,,
60
+ aiohttp/__pycache__/web_ws.cpython-311.pyc,,
61
+ aiohttp/__pycache__/worker.cpython-311.pyc,,
62
+ aiohttp/_cookie_helpers.py,sha256=8I8Vs6jDJOWRGIpN5BMFzEeGh4IkfJuRuXwZV69sT64,14453
63
+ aiohttp/_cparser.pxd,sha256=U14CjuQydabOyggX9s65CrROinPyCjqPWgwDZEdof3k,4495
64
+ aiohttp/_find_header.pxd,sha256=BFUSmxhemBtblqxzjzH3x03FfxaWlTyuAIOz8YZ5_nM,70
65
+ aiohttp/_headers.pxi,sha256=1MhCe6Un_KI1tpO85HnDfzVO94BhcirLanAOys5FIHA,2090
66
+ aiohttp/_http_parser.cp311-win_amd64.pyd,sha256=URzXBiFRrnJPHxlNAJyqOM8MK7-scJtUdtzINUoFde0,252928
67
+ aiohttp/_http_parser.pyx,sha256=APyHZD3Ubeyk6evj99bNQuEYtfBYFVLaXkxBjcCQDLc,34825
68
+ aiohttp/_http_writer.cp311-win_amd64.pyd,sha256=bSsb_8XOsDIrmpJFFrrJW7vJHKCELCBAimdY-yui1dw,45568
69
+ aiohttp/_http_writer.pyx,sha256=GtaoTzlPgHYLLzWZsXDFb2UVrkZMwD7iDHnbLuFuyx0,4987
70
+ aiohttp/_websocket/.hash/mask.pxd.hash,sha256=TL0gGYyJWxqG8dWwa08B74WGg6-0M6_Breqrff-AiZg,115
71
+ aiohttp/_websocket/.hash/mask.pyx.hash,sha256=7xo6f01JaOQmaUNij3dQlOgxkEC1edkAIhwpeOvimLI,115
72
+ aiohttp/_websocket/.hash/reader_c.pxd.hash,sha256=k1rDYvO9XZNVM5_ZylVA9ebsx1eUgibBeyqyGpjbzps,119
73
+ aiohttp/_websocket/__init__.py,sha256=R51KWH5kkdtDLb7T-ilztksbfweKCy3t22SgxGtiY-4,45
74
+ aiohttp/_websocket/__pycache__/__init__.cpython-311.pyc,,
75
+ aiohttp/_websocket/__pycache__/helpers.cpython-311.pyc,,
76
+ aiohttp/_websocket/__pycache__/models.cpython-311.pyc,,
77
+ aiohttp/_websocket/__pycache__/reader.cpython-311.pyc,,
78
+ aiohttp/_websocket/__pycache__/reader_c.cpython-311.pyc,,
79
+ aiohttp/_websocket/__pycache__/reader_py.cpython-311.pyc,,
80
+ aiohttp/_websocket/__pycache__/writer.cpython-311.pyc,,
81
+ aiohttp/_websocket/helpers.py,sha256=TLiE1IPkJvC7LJ45slO4Dv3bQZeoytk7o8VbQ50rXq0,5174
82
+ aiohttp/_websocket/mask.cp311-win_amd64.pyd,sha256=GQTrrvRT9oHMoCL9TmroiTD-3sFuMLh3l8vnL1s3GUQ,34816
83
+ aiohttp/_websocket/mask.pxd,sha256=41TdSZvhcbYSW_Vrw7bF4r_yoor2njtdaZ3bmvK6-jw,115
84
+ aiohttp/_websocket/mask.pyx,sha256=Ro7dOOv43HAAqNMz3xyCA11ppcn-vARIvjycStTEYww,1445
85
+ aiohttp/_websocket/models.py,sha256=BunZRA5HYC-kyVUoZGWa8GexXCbQtD115YX5Mpcpnyg,3059
86
+ aiohttp/_websocket/reader.py,sha256=1r0cJ-jdFgbSrC6-jI0zjEA1CppzoUn8u_wiebrVVO0,1061
87
+ aiohttp/_websocket/reader_c.cp311-win_amd64.pyd,sha256=PvwuAqdsFLhetapr7uvkYEzzDBuVf5csh3sQV4pjX_s,141824
88
+ aiohttp/_websocket/reader_c.pxd,sha256=-tmQaRk5sRazAheek47vR-bLq_X-WjC7RlwWJt5ethQ,2795
89
+ aiohttp/_websocket/reader_c.py,sha256=iqMe_OM7dqmP7JFGCcJa2i8Mm8DeMIR6WSEKCyuzRBA,20582
90
+ aiohttp/_websocket/reader_py.py,sha256=iqMe_OM7dqmP7JFGCcJa2i8Mm8DeMIR6WSEKCyuzRBA,20582
91
+ aiohttp/_websocket/writer.py,sha256=ZRViY21_RUMJ_0FkBMkdqxsJtegI3hEmGaPYT8l0iv4,11520
92
+ aiohttp/abc.py,sha256=-I9aWFLKrOvnXWgHOvipOltt6laouPnwuw9Tai9AfiY,7806
93
+ aiohttp/base_protocol.py,sha256=DMc_sU8zbVWVwATQlWOX5aZwEj5bse1KRPqVlcetPIc,4828
94
+ aiohttp/client.py,sha256=Bm1gvFrm7aC1kvu6dZAeI6BOjPWh0QEcQrL41-hyoGk,66120
95
+ aiohttp/client_exceptions.py,sha256=KyIV7-ryEh3MaxIEBQ0HD57B4JVOLbMnaOlpIhHzHB4,12035
96
+ aiohttp/client_middleware_digest_auth.py,sha256=UuL-g3Y24GyE-HgIBRC4kh_oqmkKQA55gWpOW-6MDmI,19536
97
+ aiohttp/client_middlewares.py,sha256=FEVIXFkQ58n5bhK4BGEqqDCWnDh-GNJmWq20I5Yt6SU,1973
98
+ aiohttp/client_proto.py,sha256=dFcDXFYThsGh9j-n6xMHe2xT2ITkLna6DZYTWMZSA_0,13003
99
+ aiohttp/client_reqrep.py,sha256=LGnxZS1STacCcms_6dg3smrHvGdJiKpo5uQyGfsdSyk,56261
100
+ aiohttp/client_ws.py,sha256=sFoIQL-gmpcs3v7Bw_8yUhrKt5lmv1hGUcbOr7zfQyo,20028
101
+ aiohttp/compression_utils.py,sha256=y4SDiHyB8VuZIsQMW3M9c1iWMWjgZCp2BE0GTR0k4Es,16287
102
+ aiohttp/connector.py,sha256=YBA1nFwBm1cnPUgEgvwH2J_Qo3q8W18pYvNsEUdm4V8,71887
103
+ aiohttp/cookiejar.py,sha256=uEc9nrelZB2WqRRMntaTqRXT9LJpyedoeBPCBi7fNC0,26493
104
+ aiohttp/formdata.py,sha256=Jcw6cAGKjpru27SmGBm-UNfOHZAQyO2KTyvYR21xTw0,6698
105
+ aiohttp/hdrs.py,sha256=jq-SdfkXAqKyzrKzFo8pZe3PNHQ1o1IDnCTtm7CD6Ic,5227
106
+ aiohttp/helpers.py,sha256=V_2x_uoHErVPkvTwMat6rUjWWugNEZwTYIns3_EFyBA,34063
107
+ aiohttp/http.py,sha256=Xn2HkR8TbSDzn61cGEV9jE1xLk0ARilSM-EiRVab8r4,2155
108
+ aiohttp/http_exceptions.py,sha256=ygc4acVHHwly81wobO5DIylr3eqnY_lDssVsBxomaOg,3233
109
+ aiohttp/http_parser.py,sha256=Mw4i_146zVxHsNPSB6R7oAJq0lI19xbzJCE4OwUY2Lo,46387
110
+ aiohttp/http_websocket.py,sha256=w0bnSv39CdpIe9MEGCYKDe1bJ3gdd-_bVxDzNHHRulY,1024
111
+ aiohttp/http_writer.py,sha256=be03ggFiHIX3pfAl-HxZKRXwON9Sy1NdBE6pnzmycCI,12983
112
+ aiohttp/log.py,sha256=zYUTvXsMQ9Sz1yNN8kXwd5Qxu49a1FzjZ_wQqriEc8M,333
113
+ aiohttp/multipart.py,sha256=QHLZyPjD8NhRLTFGNQhoBs9pE3YkRN69cGzV-beVN7U,45407
114
+ aiohttp/payload.py,sha256=Z9pA7gzhFAmnzEpMdwFwe0ZZowHRfdRLSkzHSN6Y7Sw,42618
115
+ aiohttp/payload_streamer.py,sha256=c8yoX72AYHs6NxqCqmSfQDRF-z2-v1kKIYn6kj68F78,2304
116
+ aiohttp/py.typed,sha256=3VVwXUAWVEVX7sDwyYDnW5ZdBC9_Z9AJAFfLCleUW0k,8
117
+ aiohttp/pytest_plugin.py,sha256=UBFjeBelwm6ntI142CcMyApghdNWLkrbrVnjr9cfBGE,13415
118
+ aiohttp/resolver.py,sha256=v5XBorVS7muvsrpPL7tp_i56MIFUe9vOtV5sbs9ZF40,10227
119
+ aiohttp/streams.py,sha256=kb-fn5g7OeG00-iXTe3YhwZkeH6uZ1vaKwKV4AW2uQ8,24887
120
+ aiohttp/tcp_helpers.py,sha256=K-hhGh3jd6qCEnHJo8LvFyfJwBjh99UKI7A0aSRVhj4,998
121
+ aiohttp/test_utils.py,sha256=KfckS2iyREqj5zQu-SfbQVII1aJgmTFioGIhOJCzzQY,25444
122
+ aiohttp/tracing.py,sha256=V9235J6nmipQTTnUQ8i0FIRXsPofmBjCDAqUxboHRjI,14953
123
+ aiohttp/typedefs.py,sha256=CylMHRAB8RDel6JaKBUf_vK2IqQDlH2de7p069JmDS4,1733
124
+ aiohttp/web.py,sha256=JMA0M1hSe5Ko9SLAocVxOPUCIJRIdIxAoLl9QyFB2GY,19019
125
+ aiohttp/web_app.py,sha256=7C7I68hH9qiwE3fDey9rFXWvQOWTJRMT537Fl4mWKdk,19989
126
+ aiohttp/web_exceptions.py,sha256=kvUYL7SgFay-gBJize8vQtXq4SpGwRKe8O88rsdO3no,10804
127
+ aiohttp/web_fileresponse.py,sha256=-LmkkQs3PvW_DuLGuJFhifCtufaE0e0MAlivN4n5K9w,16823
128
+ aiohttp/web_log.py,sha256=pK085S6qTyS2JY7xJw5Bv4nzn3lnaTwAGan4sFiweR4,8718
129
+ aiohttp/web_middlewares.py,sha256=5W5T1jtBYr8906JO79K9ytcqa9M4uQgwqTenXHdI-1A,4273
130
+ aiohttp/web_protocol.py,sha256=XnlLONO17BqbySgfYFzQCqJODFJXNgDFoCt5y7H-wjg,31966
131
+ aiohttp/web_request.py,sha256=xOH3WPMoaW6WVUKmgymgL_sWeKZKcilT2gEby8T7YXQ,32815
132
+ aiohttp/web_response.py,sha256=dmX64IDeA-3Fk6ytq3NmFn4b17861ikyuVNbMg7adUM,31692
133
+ aiohttp/web_routedef.py,sha256=9Eg0z0kRpmt3yP-gjZTGon0I7rJpHEd3FbI-tIyKWRE,6260
134
+ aiohttp/web_runner.py,sha256=OWQXf8llfZFtK0jdqAxucDxb5P5U5QNWCkKAYe_mIqA,13133
135
+ aiohttp/web_server.py,sha256=3kMuz9AdQji5QPzD2KBWJlCwy31HPMVfZrQEbi7omC8,3261
136
+ aiohttp/web_urldispatcher.py,sha256=-GplcHQgFl9Jw8zDeubOyyDQzXb5R647jBxNCox9aMw,45174
137
+ aiohttp/web_ws.py,sha256=1dqQ-RDuN6k20ca_ZqTYBABnpRw7uq-raFz1sUS-e_A,28238
138
+ aiohttp/worker.py,sha256=jKrmhrcE2ojY9S97r7uyX2IBMM-Fg6rEwHzLBJhGIh8,8772
venv/Lib/site-packages/aiohttp-3.14.1.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-win_amd64
5
+
venv/Lib/site-packages/aiohttp-3.14.1.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ aiohttp
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/METADATA ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: aiosignal
3
+ Version: 1.4.0
4
+ Summary: aiosignal: a list of registered asynchronous callbacks
5
+ Home-page: https://github.com/aio-libs/aiosignal
6
+ Maintainer: aiohttp team <team@aiohttp.org>
7
+ Maintainer-email: team@aiohttp.org
8
+ License: Apache 2.0
9
+ Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
10
+ Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiosignal/actions
11
+ Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiosignal
12
+ Project-URL: Docs: RTD, https://docs.aiosignal.org
13
+ Project-URL: GitHub: issues, https://github.com/aio-libs/aiosignal/issues
14
+ Project-URL: GitHub: repo, https://github.com/aio-libs/aiosignal
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Development Status :: 5 - Production/Stable
21
+ Classifier: Operating System :: POSIX
22
+ Classifier: Operating System :: MacOS :: MacOS X
23
+ Classifier: Operating System :: Microsoft :: Windows
24
+ Classifier: Framework :: AsyncIO
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/x-rst
27
+ License-File: LICENSE
28
+ Requires-Dist: frozenlist>=1.1.0
29
+ Requires-Dist: typing-extensions>=4.2; python_version < "3.13"
30
+ Dynamic: license-file
31
+
32
+ =========
33
+ aiosignal
34
+ =========
35
+
36
+ .. image:: https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg
37
+ :target: https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI
38
+ :alt: GitHub status for master branch
39
+
40
+ .. image:: https://codecov.io/gh/aio-libs/aiosignal/branch/master/graph/badge.svg?flag=pytest
41
+ :target: https://codecov.io/gh/aio-libs/aiosignal?flags[0]=pytest
42
+ :alt: codecov.io status for master branch
43
+
44
+ .. image:: https://badge.fury.io/py/aiosignal.svg
45
+ :target: https://pypi.org/project/aiosignal
46
+ :alt: Latest PyPI package version
47
+
48
+ .. image:: https://readthedocs.org/projects/aiosignal/badge/?version=latest
49
+ :target: https://aiosignal.readthedocs.io/
50
+ :alt: Latest Read The Docs
51
+
52
+ .. image:: https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F
53
+ :target: https://aio-libs.discourse.group/
54
+ :alt: Discourse group for io-libs
55
+
56
+ .. image:: https://badges.gitter.im/Join%20Chat.svg
57
+ :target: https://gitter.im/aio-libs/Lobby
58
+ :alt: Chat on Gitter
59
+
60
+ Introduction
61
+ ============
62
+
63
+ A project to manage callbacks in `asyncio` projects.
64
+
65
+ ``Signal`` is a list of registered asynchronous callbacks.
66
+
67
+ The signal's life-cycle has two stages: after creation its content
68
+ could be filled by using standard list operations: ``sig.append()``
69
+ etc.
70
+
71
+ After you call ``sig.freeze()`` the signal is *frozen*: adding, removing
72
+ and dropping callbacks is forbidden.
73
+
74
+ The only available operation is calling the previously registered
75
+ callbacks by using ``await sig.send(data)``.
76
+
77
+ For concrete usage examples see the `Signals
78
+ <https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-signals>
79
+ section of the `Web Server Advanced
80
+ <https://docs.aiohttp.org/en/stable/web_advanced.html>` chapter of the `aiohttp
81
+ documentation`_.
82
+
83
+
84
+ Installation
85
+ ------------
86
+
87
+ ::
88
+
89
+ $ pip install aiosignal
90
+
91
+
92
+ Documentation
93
+ =============
94
+
95
+ https://aiosignal.readthedocs.io/
96
+
97
+ License
98
+ =======
99
+
100
+ ``aiosignal`` is offered under the Apache 2 license.
101
+
102
+ Source code
103
+ ===========
104
+
105
+ The project is hosted on GitHub_
106
+
107
+ Please file an issue in the `bug tracker
108
+ <https://github.com/aio-libs/aiosignal/issues>`_ if you have found a bug
109
+ or have some suggestions to improve the library.
110
+
111
+ .. _GitHub: https://github.com/aio-libs/aiosignal
112
+ .. _aiohttp documentation: https://docs.aiohttp.org/
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/RECORD ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ aiosignal-1.4.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ aiosignal-1.4.0.dist-info/METADATA,sha256=CSR-8dqLxpZyjUcTDnAuQwf299EB1sSFv_nzpxznAI0,3662
3
+ aiosignal-1.4.0.dist-info/RECORD,,
4
+ aiosignal-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ aiosignal-1.4.0.dist-info/licenses/LICENSE,sha256=b9UkPpLdf5jsacesN3co50kFcJ_1J6W_mNbQJjwE9bY,11332
6
+ aiosignal-1.4.0.dist-info/top_level.txt,sha256=z45aNOKGDdrI1roqZY3BGXQ22kJFPHBmVdwtLYLtXC0,10
7
+ aiosignal/__init__.py,sha256=TIkmUG9HTBt4dfq2nISYBiZiRB2xwvFtEZydLP0HPL4,1537
8
+ aiosignal/__pycache__/__init__.cpython-311.pyc,,
9
+ aiosignal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2013-2019 Nikolay Kim and Andrew Svetlov
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
venv/Lib/site-packages/aiosignal-1.4.0.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ aiosignal
venv/Lib/site-packages/aiosignal/__init__.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ from typing import Any, Awaitable, Callable, TypeVar
3
+
4
+ from frozenlist import FrozenList
5
+
6
+ if sys.version_info >= (3, 11):
7
+ from typing import Unpack
8
+ else:
9
+ from typing_extensions import Unpack
10
+
11
+ if sys.version_info >= (3, 13):
12
+ from typing import TypeVarTuple
13
+ else:
14
+ from typing_extensions import TypeVarTuple
15
+
16
+ _T = TypeVar("_T")
17
+ _Ts = TypeVarTuple("_Ts", default=Unpack[tuple[()]])
18
+
19
+ __version__ = "1.4.0"
20
+
21
+ __all__ = ("Signal",)
22
+
23
+
24
+ class Signal(FrozenList[Callable[[Unpack[_Ts]], Awaitable[object]]]):
25
+ """Coroutine-based signal implementation.
26
+
27
+ To connect a callback to a signal, use any list method.
28
+
29
+ Signals are fired using the send() coroutine, which takes named
30
+ arguments.
31
+ """
32
+
33
+ __slots__ = ("_owner",)
34
+
35
+ def __init__(self, owner: object):
36
+ super().__init__()
37
+ self._owner = owner
38
+
39
+ def __repr__(self) -> str:
40
+ return "<Signal owner={}, frozen={}, {!r}>".format(
41
+ self._owner, self.frozen, list(self)
42
+ )
43
+
44
+ async def send(self, *args: Unpack[_Ts], **kwargs: Any) -> None:
45
+ """
46
+ Sends data to all registered receivers.
47
+ """
48
+ if not self.frozen:
49
+ raise RuntimeError("Cannot send non-frozen signal.")
50
+
51
+ for receiver in self:
52
+ await receiver(*args, **kwargs)
53
+
54
+ def __call__(
55
+ self, func: Callable[[Unpack[_Ts]], Awaitable[_T]]
56
+ ) -> Callable[[Unpack[_Ts]], Awaitable[_T]]:
57
+ """Decorator to add a function to this Signal."""
58
+ self.append(func)
59
+ return func
venv/Lib/site-packages/aiosignal/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (3.12 kB). View file
 
venv/Lib/site-packages/aiosignal/py.typed ADDED
File without changes
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/METADATA ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: annotated-doc
3
+ Version: 0.0.4
4
+ Summary: Document parameters, class attributes, return types, and variables inline, with Annotated.
5
+ Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Intended Audience :: Information Technology
9
+ Classifier: Intended Audience :: System Administrators
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Topic :: Internet
14
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Topic :: Software Development :: Libraries
17
+ Classifier: Topic :: Software Development
18
+ Classifier: Typing :: Typed
19
+ Classifier: Development Status :: 4 - Beta
20
+ Classifier: Intended Audience :: Developers
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
29
+ Project-URL: Homepage, https://github.com/fastapi/annotated-doc
30
+ Project-URL: Documentation, https://github.com/fastapi/annotated-doc
31
+ Project-URL: Repository, https://github.com/fastapi/annotated-doc
32
+ Project-URL: Issues, https://github.com/fastapi/annotated-doc/issues
33
+ Project-URL: Changelog, https://github.com/fastapi/annotated-doc/release-notes.md
34
+ Requires-Python: >=3.8
35
+ Description-Content-Type: text/markdown
36
+
37
+ # Annotated Doc
38
+
39
+ Document parameters, class attributes, return types, and variables inline, with `Annotated`.
40
+
41
+ <a href="https://github.com/fastapi/annotated-doc/actions?query=workflow%3ATest+event%3Apush+branch%3Amain" target="_blank">
42
+ <img src="https://github.com/fastapi/annotated-doc/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Test">
43
+ </a>
44
+ <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/annotated-doc" target="_blank">
45
+ <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/annotated-doc.svg" alt="Coverage">
46
+ </a>
47
+ <a href="https://pypi.org/project/annotated-doc" target="_blank">
48
+ <img src="https://img.shields.io/pypi/v/annotated-doc?color=%2334D058&label=pypi%20package" alt="Package version">
49
+ </a>
50
+ <a href="https://pypi.org/project/annotated-doc" target="_blank">
51
+ <img src="https://img.shields.io/pypi/pyversions/annotated-doc.svg?color=%2334D058" alt="Supported Python versions">
52
+ </a>
53
+
54
+ ## Installation
55
+
56
+ ```bash
57
+ pip install annotated-doc
58
+ ```
59
+
60
+ Or with `uv`:
61
+
62
+ ```Python
63
+ uv add annotated-doc
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ Import `Doc` and pass a single literal string with the documentation for the specific parameter, class attribute, return type, or variable.
69
+
70
+ For example, to document a parameter `name` in a function `hi` you could do:
71
+
72
+ ```Python
73
+ from typing import Annotated
74
+
75
+ from annotated_doc import Doc
76
+
77
+ def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
78
+ print(f"Hi, {name}!")
79
+ ```
80
+
81
+ You can also use it to document class attributes:
82
+
83
+ ```Python
84
+ from typing import Annotated
85
+
86
+ from annotated_doc import Doc
87
+
88
+ class User:
89
+ name: Annotated[str, Doc("The user's name")]
90
+ age: Annotated[int, Doc("The user's age")]
91
+ ```
92
+
93
+ The same way, you could document return types and variables, or anything that could have a type annotation with `Annotated`.
94
+
95
+ ## Who Uses This
96
+
97
+ `annotated-doc` was made for:
98
+
99
+ * [FastAPI](https://fastapi.tiangolo.com/)
100
+ * [Typer](https://typer.tiangolo.com/)
101
+ * [SQLModel](https://sqlmodel.tiangolo.com/)
102
+ * [Asyncer](https://asyncer.tiangolo.com/)
103
+
104
+ `annotated-doc` is supported by [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc), which powers reference documentation like the one in the [FastAPI Reference](https://fastapi.tiangolo.com/reference/).
105
+
106
+ ## Reasons not to use `annotated-doc`
107
+
108
+ You are already comfortable with one of the existing docstring formats, like:
109
+
110
+ * Sphinx
111
+ * numpydoc
112
+ * Google
113
+ * Keras
114
+
115
+ Your team is already comfortable using them.
116
+
117
+ You prefer having the documentation about parameters all together in a docstring, separated from the code defining them.
118
+
119
+ You care about a specific set of users, using one specific editor, and that editor already has support for the specific docstring format you use.
120
+
121
+ ## Reasons to use `annotated-doc`
122
+
123
+ * No micro-syntax to learn for newcomers, it’s **just Python** syntax.
124
+ * **Editing** would be already fully supported by default by any editor (current or future) supporting Python syntax, including syntax errors, syntax highlighting, etc.
125
+ * **Rendering** would be relatively straightforward to implement by static tools (tools that don't need runtime execution), as the information can be extracted from the AST they normally already create.
126
+ * **Deduplication of information**: the name of a parameter would be defined in a single place, not duplicated inside of a docstring.
127
+ * **Elimination** of the possibility of having **inconsistencies** when removing a parameter or class variable and **forgetting to remove** its documentation.
128
+ * **Minimization** of the probability of adding a new parameter or class variable and **forgetting to add its documentation**.
129
+ * **Elimination** of the possibility of having **inconsistencies** between the **name** of a parameter in the **signature** and the name in the docstring when it is renamed.
130
+ * **Access** to the documentation string for each symbol at **runtime**, including existing (older) Python versions.
131
+ * A more formalized way to document other symbols, like type aliases, that could use Annotated.
132
+ * **Support** for apps using FastAPI, Typer and others.
133
+ * **AI Accessibility**: AI tools will have an easier way understanding each parameter as the distance from documentation to parameter is much closer.
134
+
135
+ ## History
136
+
137
+ I ([@tiangolo](https://github.com/tiangolo)) originally wanted for this to be part of the Python standard library (in [PEP 727](https://peps.python.org/pep-0727/)), but the proposal was withdrawn as there was a fair amount of negative feedback and opposition.
138
+
139
+ The conclusion was that this was better done as an external effort, in a third-party library.
140
+
141
+ So, here it is, with a simpler approach, as a third-party library, in a way that can be used by others, starting with FastAPI and friends.
142
+
143
+ ## License
144
+
145
+ This project is licensed under the terms of the MIT license.
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/RECORD ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ annotated_doc-0.0.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ annotated_doc-0.0.4.dist-info/METADATA,sha256=Irm5KJua33dY2qKKAjJ-OhKaVBVIfwFGej_dSe3Z1TU,6566
3
+ annotated_doc-0.0.4.dist-info/RECORD,,
4
+ annotated_doc-0.0.4.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
5
+ annotated_doc-0.0.4.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
6
+ annotated_doc-0.0.4.dist-info/licenses/LICENSE,sha256=__Fwd5pqy_ZavbQFwIfxzuF4ZpHkqWpANFF-SlBKDN8,1086
7
+ annotated_doc/__init__.py,sha256=VuyxxUe80kfEyWnOrCx_Bk8hybo3aKo6RYBlkBBYW8k,52
8
+ annotated_doc/__pycache__/__init__.cpython-311.pyc,,
9
+ annotated_doc/__pycache__/main.cpython-311.pyc,,
10
+ annotated_doc/main.py,sha256=5Zfvxv80SwwLqpRW73AZyZyiM4bWma9QWRbp_cgD20s,1075
11
+ annotated_doc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/WHEEL ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: pdm-backend (2.4.5)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/entry_points.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ [console_scripts]
2
+
3
+ [gui_scripts]
4
+
venv/Lib/site-packages/annotated_doc-0.0.4.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Sebastián Ramírez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
venv/Lib/site-packages/annotated_doc/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from .main import Doc as Doc
2
+
3
+ __version__ = "0.0.4"
venv/Lib/site-packages/annotated_doc/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (273 Bytes). View file
 
venv/Lib/site-packages/annotated_doc/__pycache__/main.cpython-311.pyc ADDED
Binary file (2.02 kB). View file
 
venv/Lib/site-packages/annotated_doc/main.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Doc:
2
+ """Define the documentation of a type annotation using `Annotated`, to be
3
+ used in class attributes, function and method parameters, return values,
4
+ and variables.
5
+
6
+ The value should be a positional-only string literal to allow static tools
7
+ like editors and documentation generators to use it.
8
+
9
+ This complements docstrings.
10
+
11
+ The string value passed is available in the attribute `documentation`.
12
+
13
+ Example:
14
+
15
+ ```Python
16
+ from typing import Annotated
17
+ from annotated_doc import Doc
18
+
19
+ def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
20
+ print(f"Hi, {name}!")
21
+ ```
22
+ """
23
+
24
+ def __init__(self, documentation: str, /) -> None:
25
+ self.documentation = documentation
26
+
27
+ def __repr__(self) -> str:
28
+ return f"Doc({self.documentation!r})"
29
+
30
+ def __hash__(self) -> int:
31
+ return hash(self.documentation)
32
+
33
+ def __eq__(self, other: object) -> bool:
34
+ if not isinstance(other, Doc):
35
+ return NotImplemented
36
+ return self.documentation == other.documentation
venv/Lib/site-packages/annotated_doc/py.typed ADDED
File without changes
venv/Lib/site-packages/anyio-4.14.0.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/Lib/site-packages/anyio-4.14.0.dist-info/METADATA ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: anyio
3
+ Version: 4.14.0
4
+ Summary: High-level concurrency and networking framework on top of asyncio or Trio
5
+ Author-email: Alex Grönholm <alex.gronholm@nextday.fi>
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://anyio.readthedocs.io/en/latest/
8
+ Project-URL: Changelog, https://anyio.readthedocs.io/en/stable/versionhistory.html
9
+ Project-URL: Source code, https://github.com/agronholm/anyio
10
+ Project-URL: Issue tracker, https://github.com/agronholm/anyio/issues
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Framework :: AnyIO
14
+ Classifier: Typing :: Typed
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/x-rst
25
+ License-File: LICENSE
26
+ Requires-Dist: exceptiongroup>=1.0.2; python_version < "3.11"
27
+ Requires-Dist: idna>=2.8
28
+ Requires-Dist: typing_extensions>=4.5; python_version < "3.13"
29
+ Provides-Extra: trio
30
+ Requires-Dist: trio>=0.32.0; extra == "trio"
31
+ Dynamic: license-file
32
+
33
+ .. image:: https://github.com/agronholm/anyio/actions/workflows/test.yml/badge.svg
34
+ :target: https://github.com/agronholm/anyio/actions/workflows/test.yml
35
+ :alt: Build Status
36
+ .. image:: https://coveralls.io/repos/github/agronholm/anyio/badge.svg?branch=master
37
+ :target: https://coveralls.io/github/agronholm/anyio?branch=master
38
+ :alt: Code Coverage
39
+ .. image:: https://readthedocs.org/projects/anyio/badge/?version=latest
40
+ :target: https://anyio.readthedocs.io/en/latest/?badge=latest
41
+ :alt: Documentation
42
+ .. image:: https://badges.gitter.im/gitterHQ/gitter.svg
43
+ :target: https://gitter.im/python-trio/AnyIO
44
+ :alt: Gitter chat
45
+ .. image:: https://tidelift.com/badges/package/pypi/anyio
46
+ :target: https://tidelift.com/subscription/pkg/pypi-anyio
47
+ :alt: Tidelift
48
+
49
+ AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio_ or
50
+ Trio_. It implements Trio-like `structured concurrency`_ (SC) on top of asyncio and works in harmony
51
+ with the native SC of Trio itself.
52
+
53
+ Applications and libraries written against AnyIO's API will run unmodified on either asyncio_ or
54
+ Trio_. AnyIO can also be adopted into a library or application incrementally – bit by bit, no full
55
+ refactoring necessary. It will blend in with the native libraries of your chosen backend.
56
+
57
+ To find out why you might want to use AnyIO's APIs instead of asyncio's, you can read about it
58
+ `here <https://anyio.readthedocs.io/en/stable/why.html>`_.
59
+
60
+ Documentation
61
+ -------------
62
+
63
+ View full documentation at: https://anyio.readthedocs.io/
64
+
65
+ Features
66
+ --------
67
+
68
+ AnyIO offers the following functionality:
69
+
70
+ * Task groups (nurseries_ in trio terminology)
71
+ * High-level networking (TCP, UDP and UNIX sockets)
72
+
73
+ * `Happy eyeballs`_ algorithm for TCP connections (more robust than that of asyncio on Python
74
+ 3.8)
75
+ * async/await style UDP sockets (unlike asyncio where you still have to use Transports and
76
+ Protocols)
77
+
78
+ * A versatile API for byte streams and object streams
79
+ * Inter-task synchronization and communication (locks, conditions, events, semaphores, object
80
+ streams)
81
+ * Worker threads
82
+ * Subprocesses
83
+ * Subinterpreter support for code parallelization (on Python 3.13 and later)
84
+ * Asynchronous file I/O (using worker threads)
85
+ * Signal handling
86
+ * Asynchronous versions of the functools_ and itertools_ modules
87
+
88
+ AnyIO also comes with its own pytest_ plugin which also supports asynchronous fixtures.
89
+ It even works with the popular Hypothesis_ library.
90
+
91
+ .. _asyncio: https://docs.python.org/3/library/asyncio.html
92
+ .. _Trio: https://github.com/python-trio/trio
93
+ .. _structured concurrency: https://en.wikipedia.org/wiki/Structured_concurrency
94
+ .. _nurseries: https://trio.readthedocs.io/en/stable/reference-core.html#nurseries-and-spawning
95
+ .. _Happy eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs
96
+ .. _pytest: https://docs.pytest.org/en/latest/
97
+ .. _functools: https://docs.python.org/3/library/functools.html
98
+ .. _itertools: https://docs.python.org/3/library/itertools.html
99
+ .. _Hypothesis: https://hypothesis.works/
100
+
101
+ Security contact information
102
+ ----------------------------
103
+
104
+ To report a security vulnerability, please use the `Tidelift security contact`_.
105
+ Tidelift will coordinate the fix and disclosure.
106
+
107
+ .. _Tidelift security contact: https://tidelift.com/security
venv/Lib/site-packages/anyio-4.14.0.dist-info/RECORD ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ anyio-4.14.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ anyio-4.14.0.dist-info/METADATA,sha256=ZozV8u8z7Ya7tmsk9Uetxz7-QFNpHH2nVBLy041h6xo,4645
3
+ anyio-4.14.0.dist-info/RECORD,,
4
+ anyio-4.14.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ anyio-4.14.0.dist-info/entry_points.txt,sha256=_d6Yu6uiaZmNe0CydowirE9Cmg7zUL2g08tQpoS3Qvc,39
6
+ anyio-4.14.0.dist-info/licenses/LICENSE,sha256=U2GsncWPLvX9LpsJxoKXwX8ElQkJu8gCO9uC6s8iwrA,1081
7
+ anyio-4.14.0.dist-info/top_level.txt,sha256=QglSMiWX8_5dpoVAEIHdEYzvqFMdSYWmCj6tYw2ITkQ,6
8
+ anyio/__init__.py,sha256=HitUIfzvAojSeaHVmJ9rFn8k_yI63G6s_jUL2QChf4U,6405
9
+ anyio/__pycache__/__init__.cpython-311.pyc,,
10
+ anyio/__pycache__/from_thread.cpython-311.pyc,,
11
+ anyio/__pycache__/functools.cpython-311.pyc,,
12
+ anyio/__pycache__/itertools.cpython-311.pyc,,
13
+ anyio/__pycache__/lowlevel.cpython-311.pyc,,
14
+ anyio/__pycache__/pytest_plugin.cpython-311.pyc,,
15
+ anyio/__pycache__/to_interpreter.cpython-311.pyc,,
16
+ anyio/__pycache__/to_process.cpython-311.pyc,,
17
+ anyio/__pycache__/to_thread.cpython-311.pyc,,
18
+ anyio/_backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ anyio/_backends/__pycache__/__init__.cpython-311.pyc,,
20
+ anyio/_backends/__pycache__/_asyncio.cpython-311.pyc,,
21
+ anyio/_backends/__pycache__/_trio.cpython-311.pyc,,
22
+ anyio/_backends/_asyncio.py,sha256=kX_Zv3F_SnWqWqSLmfPsDFxvsJLaATSeivzg6Gho3Rs,101971
23
+ anyio/_backends/_trio.py,sha256=vR0ZgxVnOo4AHhHcHVG0worMc-3ZNpAZ6Vxh0m0ZZC0,45189
24
+ anyio/_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ anyio/_core/__pycache__/__init__.cpython-311.pyc,,
26
+ anyio/_core/__pycache__/_asyncio_selector_thread.cpython-311.pyc,,
27
+ anyio/_core/__pycache__/_contextmanagers.cpython-311.pyc,,
28
+ anyio/_core/__pycache__/_eventloop.cpython-311.pyc,,
29
+ anyio/_core/__pycache__/_exceptions.cpython-311.pyc,,
30
+ anyio/_core/__pycache__/_fileio.cpython-311.pyc,,
31
+ anyio/_core/__pycache__/_resources.cpython-311.pyc,,
32
+ anyio/_core/__pycache__/_signals.cpython-311.pyc,,
33
+ anyio/_core/__pycache__/_sockets.cpython-311.pyc,,
34
+ anyio/_core/__pycache__/_streams.cpython-311.pyc,,
35
+ anyio/_core/__pycache__/_subprocesses.cpython-311.pyc,,
36
+ anyio/_core/__pycache__/_synchronization.cpython-311.pyc,,
37
+ anyio/_core/__pycache__/_tasks.cpython-311.pyc,,
38
+ anyio/_core/__pycache__/_tempfile.cpython-311.pyc,,
39
+ anyio/_core/__pycache__/_testing.cpython-311.pyc,,
40
+ anyio/_core/__pycache__/_typedattr.cpython-311.pyc,,
41
+ anyio/_core/_asyncio_selector_thread.py,sha256=2PdxFM3cs02Kp6BSppbvmRT7q7asreTW5FgBxEsflBo,5626
42
+ anyio/_core/_contextmanagers.py,sha256=YInBCabiEeS-UaP_Jdxa1CaFC71ETPW8HZTHIM8Rsc8,7215
43
+ anyio/_core/_eventloop.py,sha256=ByZUeJD9alMfcyTseRo5IzTO0IltEul_Gyq9iqSjqDk,6658
44
+ anyio/_core/_exceptions.py,sha256=OfzLO4Z3Hog1TnipbIn72YNtkoYxS4lHW9MqKDeGc88,4936
45
+ anyio/_core/_fileio.py,sha256=hHfyV0bXDL-R2ZNnInwse3nmTAd36AIz1cBxgmAwzAQ,31358
46
+ anyio/_core/_resources.py,sha256=NbmU5O5UX3xEyACnkmYX28Fmwdl-f-ny0tHym26e0w0,435
47
+ anyio/_core/_signals.py,sha256=mjTBB2hTKNPRlU0IhnijeQedpWOGERDiMjSlJQsFrug,1016
48
+ anyio/_core/_sockets.py,sha256=9FU423j52XBBfGVr6MdzPTdyw8bGrzApZ5m338-AtsY,35286
49
+ anyio/_core/_streams.py,sha256=FczFwIgDpnkK0bODWJXMpsUJYdvAD04kaUaGzJU8DK0,1806
50
+ anyio/_core/_subprocesses.py,sha256=tkmkPKEkEaiMD8C9WRZBlmgjOYRDRbZdte6e-unay2E,7916
51
+ anyio/_core/_synchronization.py,sha256=U14eUp9tqcP95OcCG7s3A1MZU9WLw84lOS4YB-H795s,21591
52
+ anyio/_core/_tasks.py,sha256=ELL2jscaSW0Jw_xA6MtQlm3xwvFEzjTbc1u9Tteyt0I,13244
53
+ anyio/_core/_tempfile.py,sha256=jE2w59FRF3yRo4vjkjfZF2YcqsBZvc66VWRwrJGDYGk,19624
54
+ anyio/_core/_testing.py,sha256=u7MPqGXwpTxqI7hclSdNA30z2GH1Nw258uwKvy_RfBg,2340
55
+ anyio/_core/_typedattr.py,sha256=P4ozZikn3-DbpoYcvyghS_FOYAgbmUxeoU8-L_07pZM,2508
56
+ anyio/abc/__init__.py,sha256=6mWhcl_pGXhrgZVHP_TCfMvIXIOp9mroEFM90fYCU_U,2869
57
+ anyio/abc/__pycache__/__init__.cpython-311.pyc,,
58
+ anyio/abc/__pycache__/_eventloop.cpython-311.pyc,,
59
+ anyio/abc/__pycache__/_resources.cpython-311.pyc,,
60
+ anyio/abc/__pycache__/_sockets.cpython-311.pyc,,
61
+ anyio/abc/__pycache__/_streams.cpython-311.pyc,,
62
+ anyio/abc/__pycache__/_subprocesses.cpython-311.pyc,,
63
+ anyio/abc/__pycache__/_tasks.cpython-311.pyc,,
64
+ anyio/abc/__pycache__/_testing.cpython-311.pyc,,
65
+ anyio/abc/_eventloop.py,sha256=OqWYSEj0TmwL_xniCJt3_jHFWsuMk9THk8tCTGsKapI,10681
66
+ anyio/abc/_resources.py,sha256=DrYvkNN1hH6Uvv5_5uKySvDsnknGVDe8FCKfko0VtN8,783
67
+ anyio/abc/_sockets.py,sha256=OmVDrfemVvF9c5K1tpBgQyV6fn5v0XyCExLAqBOGz9o,13124
68
+ anyio/abc/_streams.py,sha256=HYvna1iZbWcwLROTO6IhLX79RTRLPShZMWe0sG1q54I,7481
69
+ anyio/abc/_subprocesses.py,sha256=cumAPJTktOQtw63IqG0lDpyZqu_l1EElvQHMiwJgL08,2067
70
+ anyio/abc/_tasks.py,sha256=m-FtE4phxeNIELSG7A3H7VUz3jA2Ib5J2JIew8-PS6o,6642
71
+ anyio/abc/_testing.py,sha256=9YYM2AXsYFvf4PLjUEr6yRxDiUeB5QbY_gOg0X_C6lY,2034
72
+ anyio/from_thread.py,sha256=JYsbaCaIB_Iit6kNhtXSteJGt4PcQ7ncq0nIpcelIrg,19265
73
+ anyio/functools.py,sha256=T4JS8IXq-x1S0Lbo2owF8l9fza2KypO147QLeyz4cjs,11797
74
+ anyio/itertools.py,sha256=QV-9mnRCr2yBph8g01QFvN-bQ_Yle-8Sl13YSydBlMI,16168
75
+ anyio/lowlevel.py,sha256=WPtppHfI2qs1nokzjn8elL8LvyqI05AK5Zslhlo71A4,6242
76
+ anyio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
+ anyio/pytest_plugin.py,sha256=paMpI_VMNQf2bir0LfvgMpXSiYJoHDzWdKUVTyoHmvQ,13609
78
+ anyio/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
+ anyio/streams/__pycache__/__init__.cpython-311.pyc,,
80
+ anyio/streams/__pycache__/buffered.cpython-311.pyc,,
81
+ anyio/streams/__pycache__/file.cpython-311.pyc,,
82
+ anyio/streams/__pycache__/memory.cpython-311.pyc,,
83
+ anyio/streams/__pycache__/stapled.cpython-311.pyc,,
84
+ anyio/streams/__pycache__/text.cpython-311.pyc,,
85
+ anyio/streams/__pycache__/tls.cpython-311.pyc,,
86
+ anyio/streams/buffered.py,sha256=v3xKtjFHgNV41g2SvMAkA_qd2t9WYlCI1_lNGCAatw0,6650
87
+ anyio/streams/file.py,sha256=msnrotVKGMQomUu_Rj2qz9MvIdUp6d3JGr7MOEO8kV4,4428
88
+ anyio/streams/memory.py,sha256=F0zwzvFJKAhX_LRZGoKzzqDC2oMM-f-yyTBrEYEGOaU,10740
89
+ anyio/streams/stapled.py,sha256=T8Xqwf8K6EgURPxbt1N4i7A8BAk-gScv-GRhjLXIf_o,4390
90
+ anyio/streams/text.py,sha256=BcVAGJw1VRvtIqnv-o0Rb0pwH7p8vwlvl21xHq522ag,5765
91
+ anyio/streams/tls.py,sha256=DQVkXUvsTEYKkBO8dlVU7j_5H8QOtLy4sGi1Wrjqevo,15303
92
+ anyio/to_interpreter.py,sha256=_mLngrMy97TMR6VbW4Y6YzDUk9ZuPcQMPlkuyRh3C9k,7100
93
+ anyio/to_process.py,sha256=68qhLfce7MeXysid4fOpmhfWkgdo7Z7-9BC0VyUciIE,9809
94
+ anyio/to_thread.py,sha256=f6h_k2d743GBv9FhAnhM_YpTvWgIrzBy9cOE0eJ1UJw,2693
venv/Lib/site-packages/anyio-4.14.0.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
venv/Lib/site-packages/anyio-4.14.0.dist-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [pytest11]
2
+ anyio = anyio.pytest_plugin
venv/Lib/site-packages/anyio-4.14.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Alex Grönholm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
venv/Lib/site-packages/anyio-4.14.0.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ anyio
venv/Lib/site-packages/anyio/__init__.py ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from ._core._contextmanagers import AsyncContextManagerMixin as AsyncContextManagerMixin
4
+ from ._core._contextmanagers import ContextManagerMixin as ContextManagerMixin
5
+ from ._core._eventloop import current_time as current_time
6
+ from ._core._eventloop import get_all_backends as get_all_backends
7
+ from ._core._eventloop import get_available_backends as get_available_backends
8
+ from ._core._eventloop import get_cancelled_exc_class as get_cancelled_exc_class
9
+ from ._core._eventloop import run as run
10
+ from ._core._eventloop import sleep as sleep
11
+ from ._core._eventloop import sleep_forever as sleep_forever
12
+ from ._core._eventloop import sleep_until as sleep_until
13
+ from ._core._exceptions import BrokenResourceError as BrokenResourceError
14
+ from ._core._exceptions import BrokenWorkerInterpreter as BrokenWorkerInterpreter
15
+ from ._core._exceptions import BrokenWorkerProcess as BrokenWorkerProcess
16
+ from ._core._exceptions import BusyResourceError as BusyResourceError
17
+ from ._core._exceptions import ClosedResourceError as ClosedResourceError
18
+ from ._core._exceptions import ConnectionFailed as ConnectionFailed
19
+ from ._core._exceptions import DelimiterNotFound as DelimiterNotFound
20
+ from ._core._exceptions import EndOfStream as EndOfStream
21
+ from ._core._exceptions import IncompleteRead as IncompleteRead
22
+ from ._core._exceptions import NoEventLoopError as NoEventLoopError
23
+ from ._core._exceptions import RunFinishedError as RunFinishedError
24
+ from ._core._exceptions import TaskCancelled as TaskCancelled
25
+ from ._core._exceptions import TaskFailed as TaskFailed
26
+ from ._core._exceptions import TaskNotFinished as TaskNotFinished
27
+ from ._core._exceptions import TypedAttributeLookupError as TypedAttributeLookupError
28
+ from ._core._exceptions import WouldBlock as WouldBlock
29
+ from ._core._fileio import AsyncFile as AsyncFile
30
+ from ._core._fileio import Path as Path
31
+ from ._core._fileio import open_file as open_file
32
+ from ._core._fileio import wrap_file as wrap_file
33
+ from ._core._resources import aclose_forcefully as aclose_forcefully
34
+ from ._core._signals import open_signal_receiver as open_signal_receiver
35
+ from ._core._sockets import TCPConnectable as TCPConnectable
36
+ from ._core._sockets import UNIXConnectable as UNIXConnectable
37
+ from ._core._sockets import as_connectable as as_connectable
38
+ from ._core._sockets import connect_tcp as connect_tcp
39
+ from ._core._sockets import connect_unix as connect_unix
40
+ from ._core._sockets import create_connected_udp_socket as create_connected_udp_socket
41
+ from ._core._sockets import (
42
+ create_connected_unix_datagram_socket as create_connected_unix_datagram_socket,
43
+ )
44
+ from ._core._sockets import create_tcp_listener as create_tcp_listener
45
+ from ._core._sockets import create_udp_socket as create_udp_socket
46
+ from ._core._sockets import create_unix_datagram_socket as create_unix_datagram_socket
47
+ from ._core._sockets import create_unix_listener as create_unix_listener
48
+ from ._core._sockets import getaddrinfo as getaddrinfo
49
+ from ._core._sockets import getnameinfo as getnameinfo
50
+ from ._core._sockets import notify_closing as notify_closing
51
+ from ._core._sockets import wait_readable as wait_readable
52
+ from ._core._sockets import wait_socket_readable as wait_socket_readable
53
+ from ._core._sockets import wait_socket_writable as wait_socket_writable
54
+ from ._core._sockets import wait_writable as wait_writable
55
+ from ._core._streams import create_memory_object_stream as create_memory_object_stream
56
+ from ._core._subprocesses import open_process as open_process
57
+ from ._core._subprocesses import run_process as run_process
58
+ from ._core._synchronization import CapacityLimiter as CapacityLimiter
59
+ from ._core._synchronization import (
60
+ CapacityLimiterStatistics as CapacityLimiterStatistics,
61
+ )
62
+ from ._core._synchronization import Condition as Condition
63
+ from ._core._synchronization import ConditionStatistics as ConditionStatistics
64
+ from ._core._synchronization import Event as Event
65
+ from ._core._synchronization import EventStatistics as EventStatistics
66
+ from ._core._synchronization import Lock as Lock
67
+ from ._core._synchronization import LockStatistics as LockStatistics
68
+ from ._core._synchronization import ResourceGuard as ResourceGuard
69
+ from ._core._synchronization import Semaphore as Semaphore
70
+ from ._core._synchronization import SemaphoreStatistics as SemaphoreStatistics
71
+ from ._core._tasks import TASK_STATUS_IGNORED as TASK_STATUS_IGNORED
72
+ from ._core._tasks import CancelScope as CancelScope
73
+ from ._core._tasks import TaskHandle as TaskHandle
74
+ from ._core._tasks import create_task_group as create_task_group
75
+ from ._core._tasks import current_effective_deadline as current_effective_deadline
76
+ from ._core._tasks import fail_after as fail_after
77
+ from ._core._tasks import move_on_after as move_on_after
78
+ from ._core._tempfile import NamedTemporaryFile as NamedTemporaryFile
79
+ from ._core._tempfile import SpooledTemporaryFile as SpooledTemporaryFile
80
+ from ._core._tempfile import TemporaryDirectory as TemporaryDirectory
81
+ from ._core._tempfile import TemporaryFile as TemporaryFile
82
+ from ._core._tempfile import gettempdir as gettempdir
83
+ from ._core._tempfile import gettempdirb as gettempdirb
84
+ from ._core._tempfile import mkdtemp as mkdtemp
85
+ from ._core._tempfile import mkstemp as mkstemp
86
+ from ._core._testing import TaskInfo as TaskInfo
87
+ from ._core._testing import get_current_task as get_current_task
88
+ from ._core._testing import get_running_tasks as get_running_tasks
89
+ from ._core._testing import wait_all_tasks_blocked as wait_all_tasks_blocked
90
+ from ._core._typedattr import TypedAttributeProvider as TypedAttributeProvider
91
+ from ._core._typedattr import TypedAttributeSet as TypedAttributeSet
92
+ from ._core._typedattr import typed_attribute as typed_attribute
93
+
94
+ # Re-export imports so they look like they live directly in this package
95
+ for __value in list(locals().values()):
96
+ if getattr(__value, "__module__", "").startswith("anyio."):
97
+ __value.__module__ = __name__
98
+
99
+
100
+ del __value
101
+
102
+
103
+ def __getattr__(attr: str) -> type[BrokenWorkerInterpreter]:
104
+ """Support deprecated aliases."""
105
+ if attr == "BrokenWorkerIntepreter":
106
+ import warnings
107
+
108
+ warnings.warn(
109
+ "The 'BrokenWorkerIntepreter' alias is deprecated, use 'BrokenWorkerInterpreter' instead.",
110
+ DeprecationWarning,
111
+ stacklevel=2,
112
+ )
113
+ return BrokenWorkerInterpreter
114
+
115
+ raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
venv/Lib/site-packages/anyio/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (6.25 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/from_thread.cpython-311.pyc ADDED
Binary file (28.1 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/functools.cpython-311.pyc ADDED
Binary file (17.7 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/itertools.cpython-311.pyc ADDED
Binary file (27.2 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/lowlevel.cpython-311.pyc ADDED
Binary file (9.87 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/pytest_plugin.cpython-311.pyc ADDED
Binary file (19.4 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/to_interpreter.cpython-311.pyc ADDED
Binary file (11.4 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/to_process.cpython-311.pyc ADDED
Binary file (13.9 kB). View file
 
venv/Lib/site-packages/anyio/__pycache__/to_thread.cpython-311.pyc ADDED
Binary file (3.46 kB). View file
 
venv/Lib/site-packages/anyio/_backends/__init__.py ADDED
File without changes
venv/Lib/site-packages/anyio/_backends/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (202 Bytes). View file
 
venv/Lib/site-packages/anyio/_backends/__pycache__/_asyncio.cpython-311.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7e6583f4e712e4898c3bd6e51f2df4888c86930e3c135abd628f048bedf8c1d
3
+ size 155105
venv/Lib/site-packages/anyio/_backends/__pycache__/_trio.cpython-311.pyc ADDED
Binary file (84.7 kB). View file
 
venv/Lib/site-packages/anyio/_backends/_asyncio.py ADDED
The diff for this file is too large to render. See raw diff
 
venv/Lib/site-packages/anyio/_backends/_trio.py ADDED
@@ -0,0 +1,1456 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import array
4
+ import math
5
+ import os
6
+ import socket
7
+ import sys
8
+ import types
9
+ import weakref
10
+ from collections.abc import (
11
+ AsyncGenerator,
12
+ AsyncIterator,
13
+ Awaitable,
14
+ Callable,
15
+ Collection,
16
+ Coroutine,
17
+ Iterable,
18
+ Sequence,
19
+ )
20
+ from contextlib import AbstractContextManager
21
+ from contextvars import Context
22
+ from dataclasses import dataclass
23
+ from functools import partial, wraps
24
+ from io import IOBase
25
+ from os import PathLike
26
+ from signal import Signals
27
+ from socket import AddressFamily, SocketKind
28
+ from types import TracebackType
29
+ from typing import (
30
+ IO,
31
+ TYPE_CHECKING,
32
+ Any,
33
+ Generic,
34
+ Literal,
35
+ NoReturn,
36
+ ParamSpec,
37
+ TypeVar,
38
+ cast,
39
+ overload,
40
+ )
41
+
42
+ import trio.from_thread
43
+ import trio.lowlevel
44
+ from outcome import Error, Outcome, Value
45
+ from trio.lowlevel import (
46
+ current_root_task,
47
+ current_task,
48
+ notify_closing,
49
+ wait_readable,
50
+ wait_writable,
51
+ )
52
+ from trio.socket import SocketType as TrioSocketType
53
+ from trio.to_thread import run_sync
54
+
55
+ from .. import (
56
+ CapacityLimiterStatistics,
57
+ EventStatistics,
58
+ LockStatistics,
59
+ RunFinishedError,
60
+ TaskInfo,
61
+ WouldBlock,
62
+ abc,
63
+ )
64
+ from .._core._eventloop import claim_worker_thread
65
+ from .._core._exceptions import (
66
+ BrokenResourceError,
67
+ BusyResourceError,
68
+ ClosedResourceError,
69
+ EndOfStream,
70
+ )
71
+ from .._core._sockets import convert_ipv6_sockaddr
72
+ from .._core._streams import create_memory_object_stream
73
+ from .._core._synchronization import (
74
+ CapacityLimiter as BaseCapacityLimiter,
75
+ )
76
+ from .._core._synchronization import Event as BaseEvent
77
+ from .._core._synchronization import Lock as BaseLock
78
+ from .._core._synchronization import (
79
+ ResourceGuard,
80
+ SemaphoreStatistics,
81
+ )
82
+ from .._core._synchronization import Semaphore as BaseSemaphore
83
+ from .._core._tasks import CancelScope as BaseCancelScope
84
+ from .._core._tasks import TaskHandle
85
+ from ..abc import IPSockAddrType, UDPPacketType, UNIXDatagramPacketType
86
+ from ..abc._eventloop import AsyncBackend, StrOrBytesPath
87
+ from ..abc._tasks import T_contra, call_for_coroutine, get_callable_name
88
+ from ..streams.memory import MemoryObjectSendStream
89
+
90
+ if TYPE_CHECKING:
91
+ from _typeshed import FileDescriptorLike
92
+
93
+ if sys.version_info >= (3, 11):
94
+ from typing import TypeVarTuple, Unpack
95
+ else:
96
+ from exceptiongroup import BaseExceptionGroup
97
+ from typing_extensions import TypeVarTuple, Unpack
98
+
99
+ T = TypeVar("T")
100
+ T_Retval = TypeVar("T_Retval")
101
+ T_co = TypeVar("T_co", covariant=True)
102
+ T_SockAddr = TypeVar("T_SockAddr", str, IPSockAddrType)
103
+ PosArgsT = TypeVarTuple("PosArgsT")
104
+ P = ParamSpec("P")
105
+
106
+
107
+ def ensure_returns_coro(
108
+ func: Callable[P, Awaitable[T_Retval]],
109
+ ) -> Callable[P, Coroutine[Any, Any, T_Retval]]:
110
+ @wraps(func)
111
+ def wrapper(*args: P.args, **kwargs: P.kwargs) -> Coroutine[Any, Any, T_Retval]:
112
+ awaitable = func(*args, **kwargs)
113
+ # Check the common case first.
114
+ if isinstance(awaitable, Coroutine):
115
+ return awaitable
116
+ elif not isinstance(awaitable, Awaitable):
117
+ # The user violated the type annotations. Still, we should pass this on to
118
+ # Trio so it can raise with an appropriate message.
119
+ return awaitable
120
+ else:
121
+
122
+ @wraps(func)
123
+ async def inner_wrapper() -> T_Retval:
124
+ return await awaitable
125
+
126
+ return inner_wrapper()
127
+
128
+ return wrapper
129
+
130
+
131
+ #
132
+ # Event loop
133
+ #
134
+
135
+ RunVar = trio.lowlevel.RunVar
136
+
137
+
138
+ #
139
+ # Timeouts and cancellation
140
+ #
141
+
142
+
143
+ class CancelScope(BaseCancelScope):
144
+ __slots__ = ("__original",)
145
+
146
+ def __new__(
147
+ cls, original: trio.CancelScope | None = None, **kwargs: object
148
+ ) -> CancelScope:
149
+ return object.__new__(cls)
150
+
151
+ def __init__(self, original: trio.CancelScope | None = None, **kwargs: Any) -> None:
152
+ self.__original = original or trio.CancelScope(**kwargs)
153
+
154
+ def __enter__(self) -> CancelScope:
155
+ self.__original.__enter__()
156
+ return self
157
+
158
+ def __exit__(
159
+ self,
160
+ exc_type: type[BaseException] | None,
161
+ exc_val: BaseException | None,
162
+ exc_tb: TracebackType | None,
163
+ ) -> bool:
164
+ return self.__original.__exit__(exc_type, exc_val, exc_tb)
165
+
166
+ def cancel(self, reason: str | None = None) -> None:
167
+ self.__original.cancel(reason)
168
+
169
+ @property
170
+ def deadline(self) -> float:
171
+ return self.__original.deadline
172
+
173
+ @deadline.setter
174
+ def deadline(self, value: float) -> None:
175
+ self.__original.deadline = value
176
+
177
+ @property
178
+ def cancel_called(self) -> bool:
179
+ return self.__original.cancel_called
180
+
181
+ @property
182
+ def cancelled_caught(self) -> bool:
183
+ return self.__original.cancelled_caught
184
+
185
+ @property
186
+ def shield(self) -> bool:
187
+ return self.__original.shield
188
+
189
+ @shield.setter
190
+ def shield(self, value: bool) -> None:
191
+ self.__original.shield = value
192
+
193
+
194
+ #
195
+ # Task groups
196
+ #
197
+
198
+ empty_start_value = object()
199
+
200
+
201
+ class _TrioTaskStatus(Generic[T_contra], abc.TaskStatus[T_contra]):
202
+ early_start_value: T_contra | object = empty_start_value
203
+ real_task_status: trio.TaskStatus[T_contra | None] | None = None
204
+
205
+ def started(self, value: T_contra | None = None) -> None:
206
+ if self.real_task_status is None:
207
+ if self.early_start_value is not empty_start_value:
208
+ raise RuntimeError("called 'started' twice on the same task status")
209
+
210
+ self.early_start_value = value
211
+ else:
212
+ self.real_task_status.started(value)
213
+
214
+
215
+ class TaskGroup(abc.TaskGroup):
216
+ def __init__(self) -> None:
217
+ self._entered = False
218
+ self._active = False
219
+ self._nursery_manager = trio.open_nursery(strict_exception_groups=True)
220
+ self.cancel_scope = None # type: ignore[assignment]
221
+
222
+ async def __aenter__(self) -> TaskGroup:
223
+ if self._entered:
224
+ raise RuntimeError("TaskGroup cannot be entered more than once")
225
+
226
+ self._entered = True
227
+ self._active = True
228
+ self._nursery = await self._nursery_manager.__aenter__()
229
+ self.cancel_scope = CancelScope(self._nursery.cancel_scope)
230
+ return self
231
+
232
+ async def __aexit__(
233
+ self,
234
+ exc_type: type[BaseException] | None,
235
+ exc_val: BaseException | None,
236
+ exc_tb: TracebackType | None,
237
+ ) -> bool:
238
+ try:
239
+ # trio.Nursery.__exit__ returns bool; .open_nursery has wrong type
240
+ return await self._nursery_manager.__aexit__(exc_type, exc_val, exc_tb) # type: ignore[return-value]
241
+ except BaseExceptionGroup as exc:
242
+ if not exc.split(trio.Cancelled)[1]:
243
+ raise trio.Cancelled._create() from exc
244
+
245
+ raise
246
+ finally:
247
+ del exc_val, exc_tb
248
+ self._active = False
249
+
250
+ def _check_active(self, coro: Coroutine | None = None) -> None:
251
+ if not self._active:
252
+ if coro is not None:
253
+ coro.close()
254
+
255
+ raise RuntimeError(
256
+ "This task group is not active; no new tasks can be started."
257
+ )
258
+
259
+ def create_task(
260
+ self,
261
+ coro: Coroutine[Any, Any, T_co],
262
+ *,
263
+ name: object = None,
264
+ context: Context | None = None,
265
+ ) -> TaskHandle[T_co]:
266
+ if not isinstance(coro, Coroutine):
267
+ raise TypeError(f"expected a coroutine, got {coro.__class__.__qualname__}")
268
+
269
+ self._check_active(coro)
270
+ handle = TaskHandle(coro, name)
271
+ if context is not None:
272
+ context.run(
273
+ partial(self._nursery.start_soon, handle._run_coro, name=handle.name)
274
+ )
275
+ else:
276
+ self._nursery.start_soon(handle._run_coro, name=handle.name)
277
+
278
+ return handle
279
+
280
+ async def start(
281
+ self,
282
+ func: Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]],
283
+ *args: Unpack[PosArgsT],
284
+ name: object = None,
285
+ return_handle: Literal[False] | Literal[True] = False,
286
+ ) -> Any:
287
+ handle: TaskHandle[T_co]
288
+
289
+ async def run_coro_with_task_status(
290
+ *, task_status: trio.TaskStatus[Any]
291
+ ) -> None:
292
+ nonlocal handle
293
+ wrapper_task_status = _TrioTaskStatus()
294
+ coro = call_for_coroutine(func, args, task_status=wrapper_task_status)
295
+ if wrapper_task_status.early_start_value is not empty_start_value:
296
+ task_status.started(wrapper_task_status.early_start_value)
297
+ else:
298
+ wrapper_task_status.real_task_status = task_status
299
+
300
+ handle = TaskHandle(coro, name)
301
+ await handle._run_coro()
302
+
303
+ self._check_active()
304
+ final_name = get_callable_name(func, name)
305
+ start_value = await self._nursery.start(
306
+ run_coro_with_task_status, name=final_name
307
+ )
308
+ if return_handle:
309
+ handle._start_value = start_value
310
+ return handle
311
+ else:
312
+ return start_value
313
+
314
+
315
+ #
316
+ # Subprocesses
317
+ #
318
+
319
+
320
+ @dataclass(eq=False)
321
+ class ReceiveStreamWrapper(abc.ByteReceiveStream):
322
+ _stream: trio.abc.ReceiveStream
323
+
324
+ async def receive(self, max_bytes: int | None = None) -> bytes:
325
+ try:
326
+ data = await self._stream.receive_some(max_bytes)
327
+ except trio.ClosedResourceError as exc:
328
+ raise ClosedResourceError from exc.__cause__
329
+ except trio.BrokenResourceError as exc:
330
+ raise BrokenResourceError from exc.__cause__
331
+
332
+ if data:
333
+ return bytes(data)
334
+ else:
335
+ raise EndOfStream
336
+
337
+ async def aclose(self) -> None:
338
+ await self._stream.aclose()
339
+
340
+
341
+ @dataclass(eq=False)
342
+ class SendStreamWrapper(abc.ByteSendStream):
343
+ _stream: trio.abc.SendStream
344
+
345
+ async def send(self, item: bytes) -> None:
346
+ try:
347
+ await self._stream.send_all(item)
348
+ except trio.ClosedResourceError as exc:
349
+ raise ClosedResourceError from exc.__cause__
350
+ except trio.BrokenResourceError as exc:
351
+ raise BrokenResourceError from exc.__cause__
352
+
353
+ async def aclose(self) -> None:
354
+ await self._stream.aclose()
355
+
356
+
357
+ @dataclass(eq=False)
358
+ class Process(abc.Process):
359
+ _process: trio.Process
360
+ _stdin: abc.ByteSendStream | None
361
+ _stdout: abc.ByteReceiveStream | None
362
+ _stderr: abc.ByteReceiveStream | None
363
+
364
+ async def aclose(self) -> None:
365
+ with CancelScope(shield=True):
366
+ if self._stdin:
367
+ await self._stdin.aclose()
368
+ if self._stdout:
369
+ await self._stdout.aclose()
370
+ if self._stderr:
371
+ await self._stderr.aclose()
372
+
373
+ try:
374
+ await self.wait()
375
+ except BaseException:
376
+ self.kill()
377
+ with CancelScope(shield=True):
378
+ await self.wait()
379
+ raise
380
+
381
+ async def wait(self) -> int:
382
+ return await self._process.wait()
383
+
384
+ def terminate(self) -> None:
385
+ self._process.terminate()
386
+
387
+ def kill(self) -> None:
388
+ self._process.kill()
389
+
390
+ def send_signal(self, signal: Signals) -> None:
391
+ self._process.send_signal(signal)
392
+
393
+ @property
394
+ def pid(self) -> int:
395
+ return self._process.pid
396
+
397
+ @property
398
+ def returncode(self) -> int | None:
399
+ return self._process.returncode
400
+
401
+ @property
402
+ def stdin(self) -> abc.ByteSendStream | None:
403
+ return self._stdin
404
+
405
+ @property
406
+ def stdout(self) -> abc.ByteReceiveStream | None:
407
+ return self._stdout
408
+
409
+ @property
410
+ def stderr(self) -> abc.ByteReceiveStream | None:
411
+ return self._stderr
412
+
413
+
414
+ class _ProcessPoolShutdownInstrument(trio.abc.Instrument):
415
+ def after_run(self) -> None:
416
+ super().after_run()
417
+
418
+
419
+ current_default_worker_process_limiter: trio.lowlevel.RunVar = RunVar(
420
+ "current_default_worker_process_limiter"
421
+ )
422
+
423
+
424
+ async def _shutdown_process_pool(workers: set[abc.Process]) -> None:
425
+ try:
426
+ await trio.sleep(math.inf)
427
+ except trio.Cancelled:
428
+ for process in workers:
429
+ if process.returncode is None:
430
+ process.kill()
431
+
432
+ with CancelScope(shield=True):
433
+ for process in workers:
434
+ await process.aclose()
435
+
436
+
437
+ #
438
+ # Sockets and networking
439
+ #
440
+
441
+
442
+ class _TrioSocketMixin(Generic[T_SockAddr]):
443
+ def __init__(self, trio_socket: TrioSocketType) -> None:
444
+ self._trio_socket = trio_socket
445
+ self._closed = False
446
+
447
+ def _check_closed(self) -> None:
448
+ if self._closed:
449
+ raise ClosedResourceError
450
+ if self._trio_socket.fileno() < 0:
451
+ raise BrokenResourceError
452
+
453
+ @property
454
+ def _raw_socket(self) -> socket.socket:
455
+ return self._trio_socket._sock # type: ignore[attr-defined]
456
+
457
+ async def aclose(self) -> None:
458
+ if self._trio_socket.fileno() >= 0:
459
+ self._closed = True
460
+ self._trio_socket.close()
461
+
462
+ def _convert_socket_error(self, exc: BaseException) -> NoReturn:
463
+ if isinstance(exc, trio.ClosedResourceError):
464
+ raise ClosedResourceError from exc
465
+ elif self._trio_socket.fileno() < 0 and self._closed:
466
+ raise ClosedResourceError from None
467
+ elif isinstance(exc, OSError):
468
+ raise BrokenResourceError from exc
469
+ else:
470
+ raise exc
471
+
472
+
473
+ class SocketStream(_TrioSocketMixin, abc.SocketStream):
474
+ def __init__(self, trio_socket: TrioSocketType) -> None:
475
+ super().__init__(trio_socket)
476
+ self._receive_guard = ResourceGuard("reading from")
477
+ self._send_guard = ResourceGuard("writing to")
478
+
479
+ async def receive(self, max_bytes: int = 65536) -> bytes:
480
+ with self._receive_guard:
481
+ try:
482
+ data = await self._trio_socket.recv(max_bytes)
483
+ except BaseException as exc:
484
+ self._convert_socket_error(exc)
485
+
486
+ if data:
487
+ return data
488
+ else:
489
+ raise EndOfStream
490
+
491
+ async def send(self, item: bytes) -> None:
492
+ with self._send_guard:
493
+ view = memoryview(item)
494
+ while view:
495
+ try:
496
+ bytes_sent = await self._trio_socket.send(view)
497
+ except BaseException as exc:
498
+ self._convert_socket_error(exc)
499
+
500
+ view = view[bytes_sent:]
501
+
502
+ async def send_eof(self) -> None:
503
+ self._trio_socket.shutdown(socket.SHUT_WR)
504
+
505
+
506
+ class UNIXSocketStream(SocketStream, abc.UNIXSocketStream):
507
+ async def receive_fds(self, msglen: int, maxfds: int) -> tuple[bytes, list[int]]:
508
+ if not isinstance(msglen, int) or msglen < 0:
509
+ raise ValueError("msglen must be a non-negative integer")
510
+ if not isinstance(maxfds, int) or maxfds < 1:
511
+ raise ValueError("maxfds must be a positive integer")
512
+
513
+ fds = array.array("i")
514
+ await trio.lowlevel.checkpoint()
515
+ with self._receive_guard:
516
+ while True:
517
+ try:
518
+ message, ancdata, flags, addr = await self._trio_socket.recvmsg(
519
+ msglen, socket.CMSG_LEN(maxfds * fds.itemsize)
520
+ )
521
+ except BaseException as exc:
522
+ self._convert_socket_error(exc)
523
+ else:
524
+ if not message and not ancdata:
525
+ raise EndOfStream
526
+
527
+ break
528
+
529
+ for cmsg_level, cmsg_type, cmsg_data in ancdata:
530
+ if cmsg_level != socket.SOL_SOCKET or cmsg_type != socket.SCM_RIGHTS:
531
+ raise RuntimeError(
532
+ f"Received unexpected ancillary data; message = {message!r}, "
533
+ f"cmsg_level = {cmsg_level}, cmsg_type = {cmsg_type}"
534
+ )
535
+
536
+ fds.frombytes(cmsg_data[: len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
537
+
538
+ return message, list(fds)
539
+
540
+ async def send_fds(self, message: bytes, fds: Collection[int | IOBase]) -> None:
541
+ if not message:
542
+ raise ValueError("message must not be empty")
543
+ if not fds:
544
+ raise ValueError("fds must not be empty")
545
+
546
+ filenos: list[int] = []
547
+ for fd in fds:
548
+ if isinstance(fd, int):
549
+ filenos.append(fd)
550
+ elif isinstance(fd, IOBase):
551
+ filenos.append(fd.fileno())
552
+
553
+ fdarray = array.array("i", filenos)
554
+ await trio.lowlevel.checkpoint()
555
+ with self._send_guard:
556
+ while True:
557
+ try:
558
+ await self._trio_socket.sendmsg(
559
+ [message],
560
+ [
561
+ (
562
+ socket.SOL_SOCKET,
563
+ socket.SCM_RIGHTS,
564
+ fdarray,
565
+ )
566
+ ],
567
+ )
568
+ break
569
+ except BaseException as exc:
570
+ self._convert_socket_error(exc)
571
+
572
+
573
+ class TCPSocketListener(_TrioSocketMixin, abc.SocketListener):
574
+ def __init__(self, raw_socket: socket.socket):
575
+ super().__init__(trio.socket.from_stdlib_socket(raw_socket))
576
+ self._accept_guard = ResourceGuard("accepting connections from")
577
+
578
+ async def accept(self) -> SocketStream:
579
+ with self._accept_guard:
580
+ try:
581
+ trio_socket, _addr = await self._trio_socket.accept()
582
+ except BaseException as exc:
583
+ self._convert_socket_error(exc)
584
+
585
+ trio_socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
586
+ return SocketStream(trio_socket)
587
+
588
+
589
+ class UNIXSocketListener(_TrioSocketMixin, abc.SocketListener):
590
+ def __init__(self, raw_socket: socket.socket):
591
+ super().__init__(trio.socket.from_stdlib_socket(raw_socket))
592
+ self._accept_guard = ResourceGuard("accepting connections from")
593
+
594
+ async def accept(self) -> UNIXSocketStream:
595
+ with self._accept_guard:
596
+ try:
597
+ trio_socket, _addr = await self._trio_socket.accept()
598
+ except BaseException as exc:
599
+ self._convert_socket_error(exc)
600
+
601
+ return UNIXSocketStream(trio_socket)
602
+
603
+
604
+ class UDPSocket(_TrioSocketMixin[IPSockAddrType], abc.UDPSocket):
605
+ def __init__(self, trio_socket: TrioSocketType) -> None:
606
+ super().__init__(trio_socket)
607
+ self._receive_guard = ResourceGuard("reading from")
608
+ self._send_guard = ResourceGuard("writing to")
609
+
610
+ async def receive(self) -> tuple[bytes, IPSockAddrType]:
611
+ with self._receive_guard:
612
+ try:
613
+ data, addr = await self._trio_socket.recvfrom(65536)
614
+ return data, convert_ipv6_sockaddr(addr)
615
+ except BaseException as exc:
616
+ self._convert_socket_error(exc)
617
+
618
+ async def send(self, item: UDPPacketType) -> None:
619
+ with self._send_guard:
620
+ try:
621
+ await self._trio_socket.sendto(*item)
622
+ except BaseException as exc:
623
+ self._convert_socket_error(exc)
624
+
625
+
626
+ class ConnectedUDPSocket(_TrioSocketMixin[IPSockAddrType], abc.ConnectedUDPSocket):
627
+ def __init__(self, trio_socket: TrioSocketType) -> None:
628
+ super().__init__(trio_socket)
629
+ self._receive_guard = ResourceGuard("reading from")
630
+ self._send_guard = ResourceGuard("writing to")
631
+
632
+ async def receive(self) -> bytes:
633
+ with self._receive_guard:
634
+ try:
635
+ return await self._trio_socket.recv(65536)
636
+ except BaseException as exc:
637
+ self._convert_socket_error(exc)
638
+
639
+ async def send(self, item: bytes) -> None:
640
+ with self._send_guard:
641
+ try:
642
+ await self._trio_socket.send(item)
643
+ except BaseException as exc:
644
+ self._convert_socket_error(exc)
645
+
646
+
647
+ class UNIXDatagramSocket(_TrioSocketMixin[str], abc.UNIXDatagramSocket):
648
+ def __init__(self, trio_socket: TrioSocketType) -> None:
649
+ super().__init__(trio_socket)
650
+ self._receive_guard = ResourceGuard("reading from")
651
+ self._send_guard = ResourceGuard("writing to")
652
+
653
+ async def receive(self) -> UNIXDatagramPacketType:
654
+ with self._receive_guard:
655
+ try:
656
+ data, addr = await self._trio_socket.recvfrom(65536)
657
+ return data, addr
658
+ except BaseException as exc:
659
+ self._convert_socket_error(exc)
660
+
661
+ async def send(self, item: UNIXDatagramPacketType) -> None:
662
+ with self._send_guard:
663
+ try:
664
+ await self._trio_socket.sendto(*item)
665
+ except BaseException as exc:
666
+ self._convert_socket_error(exc)
667
+
668
+
669
+ class ConnectedUNIXDatagramSocket(
670
+ _TrioSocketMixin[str], abc.ConnectedUNIXDatagramSocket
671
+ ):
672
+ def __init__(self, trio_socket: TrioSocketType) -> None:
673
+ super().__init__(trio_socket)
674
+ self._receive_guard = ResourceGuard("reading from")
675
+ self._send_guard = ResourceGuard("writing to")
676
+
677
+ async def receive(self) -> bytes:
678
+ with self._receive_guard:
679
+ try:
680
+ return await self._trio_socket.recv(65536)
681
+ except BaseException as exc:
682
+ self._convert_socket_error(exc)
683
+
684
+ async def send(self, item: bytes) -> None:
685
+ with self._send_guard:
686
+ try:
687
+ await self._trio_socket.send(item)
688
+ except BaseException as exc:
689
+ self._convert_socket_error(exc)
690
+
691
+
692
+ #
693
+ # Synchronization
694
+ #
695
+
696
+
697
+ class Event(BaseEvent):
698
+ __slots__ = ("__original",)
699
+
700
+ def __new__(cls) -> Event:
701
+ return object.__new__(cls)
702
+
703
+ def __init__(self) -> None:
704
+ self.__original = trio.Event()
705
+
706
+ def is_set(self) -> bool:
707
+ return self.__original.is_set()
708
+
709
+ async def wait(self) -> None:
710
+ return await self.__original.wait()
711
+
712
+ def statistics(self) -> EventStatistics:
713
+ orig_statistics = self.__original.statistics()
714
+ return EventStatistics(tasks_waiting=orig_statistics.tasks_waiting)
715
+
716
+ def set(self) -> None:
717
+ self.__original.set()
718
+
719
+
720
+ class Lock(BaseLock):
721
+ __slots__ = "_fast_acquire", "__original"
722
+
723
+ def __new__(cls, *, fast_acquire: bool = False) -> Lock:
724
+ return object.__new__(cls)
725
+
726
+ def __init__(self, *, fast_acquire: bool = False) -> None:
727
+ self._fast_acquire = fast_acquire
728
+ self.__original = trio.Lock()
729
+
730
+ @staticmethod
731
+ def _convert_runtime_error_msg(exc: RuntimeError) -> None:
732
+ if exc.args == ("attempt to re-acquire an already held Lock",):
733
+ exc.args = ("Attempted to acquire an already held Lock",)
734
+
735
+ async def acquire(self) -> None:
736
+ if not self._fast_acquire:
737
+ try:
738
+ await self.__original.acquire()
739
+ except RuntimeError as exc:
740
+ self._convert_runtime_error_msg(exc)
741
+ raise
742
+
743
+ return
744
+
745
+ # This is the "fast path" where we don't let other tasks run
746
+ await trio.lowlevel.checkpoint_if_cancelled()
747
+ try:
748
+ self.__original.acquire_nowait()
749
+ except trio.WouldBlock:
750
+ await self.__original._lot.park()
751
+ except RuntimeError as exc:
752
+ self._convert_runtime_error_msg(exc)
753
+ raise
754
+
755
+ def acquire_nowait(self) -> None:
756
+ try:
757
+ self.__original.acquire_nowait()
758
+ except trio.WouldBlock:
759
+ raise WouldBlock from None
760
+ except RuntimeError as exc:
761
+ self._convert_runtime_error_msg(exc)
762
+ raise
763
+
764
+ def locked(self) -> bool:
765
+ return self.__original.locked()
766
+
767
+ def release(self) -> None:
768
+ self.__original.release()
769
+
770
+ def statistics(self) -> LockStatistics:
771
+ orig_statistics = self.__original.statistics()
772
+ owner = TrioTaskInfo(orig_statistics.owner) if orig_statistics.owner else None
773
+ return LockStatistics(
774
+ orig_statistics.locked, owner, orig_statistics.tasks_waiting
775
+ )
776
+
777
+
778
+ class Semaphore(BaseSemaphore):
779
+ __slots__ = ("__original",)
780
+
781
+ def __new__(
782
+ cls,
783
+ initial_value: int,
784
+ *,
785
+ max_value: int | None = None,
786
+ fast_acquire: bool = False,
787
+ ) -> Semaphore:
788
+ return object.__new__(cls)
789
+
790
+ def __init__(
791
+ self,
792
+ initial_value: int,
793
+ *,
794
+ max_value: int | None = None,
795
+ fast_acquire: bool = False,
796
+ ) -> None:
797
+ super().__init__(initial_value, max_value=max_value, fast_acquire=fast_acquire)
798
+ self.__original = trio.Semaphore(initial_value, max_value=max_value)
799
+
800
+ async def acquire(self) -> None:
801
+ if not self._fast_acquire:
802
+ await self.__original.acquire()
803
+ return
804
+
805
+ # This is the "fast path" where we don't let other tasks run
806
+ await trio.lowlevel.checkpoint_if_cancelled()
807
+ try:
808
+ self.__original.acquire_nowait()
809
+ except trio.WouldBlock:
810
+ await self.__original._lot.park()
811
+
812
+ def acquire_nowait(self) -> None:
813
+ try:
814
+ self.__original.acquire_nowait()
815
+ except trio.WouldBlock:
816
+ raise WouldBlock from None
817
+
818
+ @property
819
+ def max_value(self) -> int | None:
820
+ return self.__original.max_value
821
+
822
+ @property
823
+ def value(self) -> int:
824
+ return self.__original.value
825
+
826
+ def release(self) -> None:
827
+ self.__original.release()
828
+
829
+ def statistics(self) -> SemaphoreStatistics:
830
+ orig_statistics = self.__original.statistics()
831
+ return SemaphoreStatistics(orig_statistics.tasks_waiting)
832
+
833
+
834
+ class CapacityLimiter(BaseCapacityLimiter):
835
+ __slots__ = ("__original",)
836
+
837
+ def __new__(
838
+ cls,
839
+ total_tokens: float | None = None,
840
+ *,
841
+ original: trio.CapacityLimiter | None = None,
842
+ ) -> CapacityLimiter:
843
+ return object.__new__(cls)
844
+
845
+ def __init__(
846
+ self,
847
+ total_tokens: float | None = None,
848
+ *,
849
+ original: trio.CapacityLimiter | None = None,
850
+ ) -> None:
851
+ if original is not None:
852
+ self.__original = original
853
+ else:
854
+ assert total_tokens is not None
855
+ self.__original = trio.CapacityLimiter(total_tokens)
856
+
857
+ async def __aenter__(self) -> None:
858
+ return await self.__original.__aenter__()
859
+
860
+ async def __aexit__(
861
+ self,
862
+ exc_type: type[BaseException] | None,
863
+ exc_val: BaseException | None,
864
+ exc_tb: TracebackType | None,
865
+ ) -> None:
866
+ await self.__original.__aexit__(exc_type, exc_val, exc_tb)
867
+
868
+ @property
869
+ def total_tokens(self) -> float:
870
+ return self.__original.total_tokens
871
+
872
+ @total_tokens.setter
873
+ def total_tokens(self, value: float) -> None:
874
+ self.__original.total_tokens = value
875
+
876
+ @property
877
+ def borrowed_tokens(self) -> int:
878
+ return self.__original.borrowed_tokens
879
+
880
+ @property
881
+ def available_tokens(self) -> float:
882
+ return self.__original.available_tokens
883
+
884
+ def acquire_nowait(self) -> None:
885
+ self.__original.acquire_nowait()
886
+
887
+ def acquire_on_behalf_of_nowait(self, borrower: object) -> None:
888
+ self.__original.acquire_on_behalf_of_nowait(borrower)
889
+
890
+ async def acquire(self) -> None:
891
+ await self.__original.acquire()
892
+
893
+ async def acquire_on_behalf_of(self, borrower: object) -> None:
894
+ await self.__original.acquire_on_behalf_of(borrower)
895
+
896
+ def release(self) -> None:
897
+ return self.__original.release()
898
+
899
+ def release_on_behalf_of(self, borrower: object) -> None:
900
+ return self.__original.release_on_behalf_of(borrower)
901
+
902
+ def statistics(self) -> CapacityLimiterStatistics:
903
+ orig = self.__original.statistics()
904
+ return CapacityLimiterStatistics(
905
+ borrowed_tokens=orig.borrowed_tokens,
906
+ total_tokens=orig.total_tokens,
907
+ borrowers=tuple(orig.borrowers),
908
+ tasks_waiting=orig.tasks_waiting,
909
+ )
910
+
911
+
912
+ _capacity_limiter_wrapper: trio.lowlevel.RunVar = RunVar("_capacity_limiter_wrapper")
913
+
914
+
915
+ #
916
+ # Signal handling
917
+ #
918
+
919
+
920
+ class _SignalReceiver:
921
+ _iterator: AsyncIterator[int]
922
+
923
+ def __init__(self, signals: tuple[Signals, ...]):
924
+ self._signals = signals
925
+
926
+ def __enter__(self) -> _SignalReceiver:
927
+ self._cm = trio.open_signal_receiver(*self._signals)
928
+ self._iterator = self._cm.__enter__()
929
+ return self
930
+
931
+ def __exit__(
932
+ self,
933
+ exc_type: type[BaseException] | None,
934
+ exc_val: BaseException | None,
935
+ exc_tb: TracebackType | None,
936
+ ) -> bool | None:
937
+ return self._cm.__exit__(exc_type, exc_val, exc_tb)
938
+
939
+ def __aiter__(self) -> _SignalReceiver:
940
+ return self
941
+
942
+ async def __anext__(self) -> Signals:
943
+ signum = await self._iterator.__anext__()
944
+ return Signals(signum)
945
+
946
+
947
+ #
948
+ # Testing and debugging
949
+ #
950
+
951
+
952
+ class TestRunner(abc.TestRunner):
953
+ def __init__(self, **options: Any) -> None:
954
+ from queue import Queue
955
+
956
+ self._call_queue: Queue[Callable[[], object]] = Queue()
957
+ self._send_stream: (
958
+ MemoryObjectSendStream[tuple[Awaitable[Any], list[Outcome]]] | None
959
+ ) = None
960
+ self._options = options
961
+
962
+ def __exit__(
963
+ self,
964
+ exc_type: type[BaseException] | None,
965
+ exc_val: BaseException | None,
966
+ exc_tb: types.TracebackType | None,
967
+ ) -> None:
968
+ if self._send_stream:
969
+ self._send_stream.close()
970
+ while self._send_stream is not None:
971
+ self._call_queue.get()()
972
+
973
+ def is_running(self) -> bool:
974
+ return trio.lowlevel.in_trio_task()
975
+
976
+ async def _run_tests_and_fixtures(self) -> None:
977
+ self._send_stream, receive_stream = create_memory_object_stream[
978
+ tuple[Awaitable[Any], list[Outcome]]
979
+ ](1)
980
+ with receive_stream:
981
+ async for awaitable, outcome_holder in receive_stream:
982
+ try:
983
+ retval = await awaitable
984
+ except BaseException as exc:
985
+ outcome_holder.append(Error(exc))
986
+ else:
987
+ outcome_holder.append(Value(retval))
988
+
989
+ def _main_task_finished(self, outcome: object) -> None:
990
+ self._send_stream = None
991
+
992
+ def _call_in_runner_task(
993
+ self,
994
+ func: Callable[P, Awaitable[T_Retval]],
995
+ /,
996
+ *args: P.args,
997
+ **kwargs: P.kwargs,
998
+ ) -> T_Retval:
999
+ if self._send_stream is None:
1000
+ trio.lowlevel.start_guest_run(
1001
+ self._run_tests_and_fixtures,
1002
+ run_sync_soon_threadsafe=self._call_queue.put,
1003
+ done_callback=self._main_task_finished,
1004
+ **self._options,
1005
+ )
1006
+ while self._send_stream is None:
1007
+ self._call_queue.get()()
1008
+
1009
+ outcome_holder: list[Outcome] = []
1010
+ self._send_stream.send_nowait((func(*args, **kwargs), outcome_holder))
1011
+ while not outcome_holder:
1012
+ self._call_queue.get()()
1013
+
1014
+ return outcome_holder[0].unwrap()
1015
+
1016
+ def run_asyncgen_fixture(
1017
+ self,
1018
+ fixture_func: Callable[..., AsyncGenerator[T_Retval, Any]],
1019
+ kwargs: dict[str, Any],
1020
+ ) -> Iterable[T_Retval]:
1021
+ asyncgen = fixture_func(**kwargs)
1022
+ fixturevalue: T_Retval = self._call_in_runner_task(asyncgen.asend, None)
1023
+
1024
+ yield fixturevalue
1025
+
1026
+ try:
1027
+ self._call_in_runner_task(asyncgen.asend, None)
1028
+ except StopAsyncIteration:
1029
+ pass
1030
+ else:
1031
+ self._call_in_runner_task(asyncgen.aclose)
1032
+ raise RuntimeError("Async generator fixture did not stop")
1033
+
1034
+ def run_fixture(
1035
+ self,
1036
+ fixture_func: Callable[..., Coroutine[Any, Any, T_Retval]],
1037
+ kwargs: dict[str, Any],
1038
+ ) -> T_Retval:
1039
+ return self._call_in_runner_task(fixture_func, **kwargs)
1040
+
1041
+ def run_test(
1042
+ self, test_func: Callable[..., Coroutine[Any, Any, Any]], kwargs: dict[str, Any]
1043
+ ) -> None:
1044
+ self._call_in_runner_task(test_func, **kwargs)
1045
+
1046
+
1047
+ class TrioTaskInfo(TaskInfo):
1048
+ def __init__(self, task: trio.lowlevel.Task):
1049
+ parent_id = None
1050
+ if task.parent_nursery and task.parent_nursery.parent_task:
1051
+ parent_id = id(task.parent_nursery.parent_task)
1052
+
1053
+ super().__init__(id(task), parent_id, task.name, task.coro)
1054
+ self._task = weakref.proxy(task)
1055
+
1056
+ def has_pending_cancellation(self) -> bool:
1057
+ try:
1058
+ return self._task._cancel_status.effectively_cancelled
1059
+ except ReferenceError:
1060
+ # If the task is no longer around, it surely doesn't have a cancellation
1061
+ # pending
1062
+ return False
1063
+
1064
+
1065
+ class TrioBackend(AsyncBackend):
1066
+ @classmethod
1067
+ def run(
1068
+ cls,
1069
+ func: Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]],
1070
+ args: tuple[Unpack[PosArgsT]],
1071
+ kwargs: dict[str, Any],
1072
+ options: dict[str, Any],
1073
+ ) -> T_Retval:
1074
+ assert not kwargs, "unreachable, and not supported by Trio"
1075
+ return trio.run(ensure_returns_coro(func), *args, **options)
1076
+
1077
+ @classmethod
1078
+ def current_token(cls) -> object:
1079
+ return trio.lowlevel.current_trio_token()
1080
+
1081
+ @classmethod
1082
+ def current_time(cls) -> float:
1083
+ return trio.current_time()
1084
+
1085
+ @classmethod
1086
+ def cancelled_exception_class(cls) -> type[BaseException]:
1087
+ return trio.Cancelled
1088
+
1089
+ @classmethod
1090
+ async def checkpoint(cls) -> None:
1091
+ await trio.lowlevel.checkpoint()
1092
+
1093
+ @classmethod
1094
+ async def checkpoint_if_cancelled(cls) -> None:
1095
+ await trio.lowlevel.checkpoint_if_cancelled()
1096
+
1097
+ @classmethod
1098
+ async def cancel_shielded_checkpoint(cls) -> None:
1099
+ await trio.lowlevel.cancel_shielded_checkpoint()
1100
+
1101
+ @classmethod
1102
+ async def sleep(cls, delay: float) -> None:
1103
+ await trio.sleep(delay)
1104
+
1105
+ @classmethod
1106
+ def create_cancel_scope(
1107
+ cls, *, deadline: float = math.inf, shield: bool = False
1108
+ ) -> abc.CancelScope:
1109
+ return CancelScope(deadline=deadline, shield=shield)
1110
+
1111
+ @classmethod
1112
+ def current_effective_deadline(cls) -> float:
1113
+ return trio.current_effective_deadline()
1114
+
1115
+ @classmethod
1116
+ def create_task_group(cls) -> abc.TaskGroup:
1117
+ return TaskGroup()
1118
+
1119
+ @classmethod
1120
+ def create_event(cls) -> abc.Event:
1121
+ return Event()
1122
+
1123
+ @classmethod
1124
+ def create_lock(cls, *, fast_acquire: bool) -> Lock:
1125
+ return Lock(fast_acquire=fast_acquire)
1126
+
1127
+ @classmethod
1128
+ def create_semaphore(
1129
+ cls,
1130
+ initial_value: int,
1131
+ *,
1132
+ max_value: int | None = None,
1133
+ fast_acquire: bool = False,
1134
+ ) -> abc.Semaphore:
1135
+ return Semaphore(initial_value, max_value=max_value, fast_acquire=fast_acquire)
1136
+
1137
+ @classmethod
1138
+ def create_capacity_limiter(cls, total_tokens: float) -> CapacityLimiter:
1139
+ return CapacityLimiter(total_tokens)
1140
+
1141
+ @classmethod
1142
+ async def run_sync_in_worker_thread(
1143
+ cls,
1144
+ func: Callable[[Unpack[PosArgsT]], T_Retval],
1145
+ args: tuple[Unpack[PosArgsT]],
1146
+ abandon_on_cancel: bool = False,
1147
+ limiter: abc.CapacityLimiter | None = None,
1148
+ ) -> T_Retval:
1149
+ def wrapper() -> T_Retval:
1150
+ with claim_worker_thread(TrioBackend, token):
1151
+ return func(*args)
1152
+
1153
+ token = TrioBackend.current_token()
1154
+ return await run_sync(
1155
+ wrapper,
1156
+ abandon_on_cancel=abandon_on_cancel,
1157
+ limiter=cast(trio.CapacityLimiter, limiter),
1158
+ )
1159
+
1160
+ @classmethod
1161
+ def check_cancelled(cls) -> None:
1162
+ trio.from_thread.check_cancelled()
1163
+
1164
+ @classmethod
1165
+ def run_async_from_thread(
1166
+ cls,
1167
+ func: Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]],
1168
+ args: tuple[Unpack[PosArgsT]],
1169
+ token: object,
1170
+ ) -> T_co:
1171
+ trio_token = cast("trio.lowlevel.TrioToken | None", token)
1172
+ try:
1173
+ return trio.from_thread.run(func, *args, trio_token=trio_token)
1174
+ except trio.RunFinishedError:
1175
+ raise RunFinishedError from None
1176
+
1177
+ @classmethod
1178
+ def run_sync_from_thread(
1179
+ cls,
1180
+ func: Callable[[Unpack[PosArgsT]], T_Retval],
1181
+ args: tuple[Unpack[PosArgsT]],
1182
+ token: object,
1183
+ ) -> T_Retval:
1184
+ trio_token = cast("trio.lowlevel.TrioToken | None", token)
1185
+ try:
1186
+ return trio.from_thread.run_sync(func, *args, trio_token=trio_token)
1187
+ except trio.RunFinishedError:
1188
+ raise RunFinishedError from None
1189
+
1190
+ @classmethod
1191
+ async def open_process(
1192
+ cls,
1193
+ command: StrOrBytesPath | Sequence[StrOrBytesPath],
1194
+ *,
1195
+ stdin: int | IO[Any] | None,
1196
+ stdout: int | IO[Any] | None,
1197
+ stderr: int | IO[Any] | None,
1198
+ **kwargs: Any,
1199
+ ) -> Process:
1200
+ def convert_item(item: StrOrBytesPath) -> str:
1201
+ str_or_bytes = os.fspath(item)
1202
+ if isinstance(str_or_bytes, str):
1203
+ return str_or_bytes
1204
+ else:
1205
+ return os.fsdecode(str_or_bytes)
1206
+
1207
+ if isinstance(command, (str, bytes, PathLike)):
1208
+ process = await trio.lowlevel.open_process(
1209
+ convert_item(command),
1210
+ stdin=stdin,
1211
+ stdout=stdout,
1212
+ stderr=stderr,
1213
+ shell=True,
1214
+ **kwargs,
1215
+ )
1216
+ else:
1217
+ process = await trio.lowlevel.open_process(
1218
+ [convert_item(item) for item in command],
1219
+ stdin=stdin,
1220
+ stdout=stdout,
1221
+ stderr=stderr,
1222
+ shell=False,
1223
+ **kwargs,
1224
+ )
1225
+
1226
+ stdin_stream = SendStreamWrapper(process.stdin) if process.stdin else None
1227
+ stdout_stream = ReceiveStreamWrapper(process.stdout) if process.stdout else None
1228
+ stderr_stream = ReceiveStreamWrapper(process.stderr) if process.stderr else None
1229
+ return Process(process, stdin_stream, stdout_stream, stderr_stream)
1230
+
1231
+ @classmethod
1232
+ def setup_process_pool_exit_at_shutdown(cls, workers: set[abc.Process]) -> None:
1233
+ trio.lowlevel.spawn_system_task(_shutdown_process_pool, workers)
1234
+
1235
+ @classmethod
1236
+ async def connect_tcp(
1237
+ cls, host: str, port: int, local_address: IPSockAddrType | None = None
1238
+ ) -> SocketStream:
1239
+ family = socket.AF_INET6 if ":" in host else socket.AF_INET
1240
+ trio_socket = trio.socket.socket(family)
1241
+ trio_socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
1242
+ if local_address:
1243
+ await trio_socket.bind(local_address)
1244
+
1245
+ try:
1246
+ await trio_socket.connect((host, port))
1247
+ except BaseException:
1248
+ trio_socket.close()
1249
+ raise
1250
+
1251
+ return SocketStream(trio_socket)
1252
+
1253
+ @classmethod
1254
+ async def connect_unix(cls, path: str | bytes) -> abc.UNIXSocketStream:
1255
+ trio_socket = trio.socket.socket(socket.AF_UNIX)
1256
+ try:
1257
+ await trio_socket.connect(path)
1258
+ except BaseException:
1259
+ trio_socket.close()
1260
+ raise
1261
+
1262
+ return UNIXSocketStream(trio_socket)
1263
+
1264
+ @classmethod
1265
+ def create_tcp_listener(cls, sock: socket.socket) -> abc.SocketListener:
1266
+ return TCPSocketListener(sock)
1267
+
1268
+ @classmethod
1269
+ def create_unix_listener(cls, sock: socket.socket) -> abc.SocketListener:
1270
+ return UNIXSocketListener(sock)
1271
+
1272
+ @classmethod
1273
+ async def create_udp_socket(
1274
+ cls,
1275
+ family: socket.AddressFamily,
1276
+ local_address: IPSockAddrType | None,
1277
+ remote_address: IPSockAddrType | None,
1278
+ reuse_port: bool,
1279
+ ) -> UDPSocket | ConnectedUDPSocket:
1280
+ trio_socket = trio.socket.socket(family=family, type=socket.SOCK_DGRAM)
1281
+
1282
+ if reuse_port:
1283
+ trio_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
1284
+
1285
+ if local_address:
1286
+ await trio_socket.bind(local_address)
1287
+
1288
+ if remote_address:
1289
+ await trio_socket.connect(remote_address)
1290
+ return ConnectedUDPSocket(trio_socket)
1291
+ else:
1292
+ return UDPSocket(trio_socket)
1293
+
1294
+ @classmethod
1295
+ @overload
1296
+ async def create_unix_datagram_socket(
1297
+ cls, raw_socket: socket.socket, remote_path: None
1298
+ ) -> abc.UNIXDatagramSocket: ...
1299
+
1300
+ @classmethod
1301
+ @overload
1302
+ async def create_unix_datagram_socket(
1303
+ cls, raw_socket: socket.socket, remote_path: str | bytes
1304
+ ) -> abc.ConnectedUNIXDatagramSocket: ...
1305
+
1306
+ @classmethod
1307
+ async def create_unix_datagram_socket(
1308
+ cls, raw_socket: socket.socket, remote_path: str | bytes | None
1309
+ ) -> abc.UNIXDatagramSocket | abc.ConnectedUNIXDatagramSocket:
1310
+ trio_socket = trio.socket.from_stdlib_socket(raw_socket)
1311
+
1312
+ if remote_path:
1313
+ await trio_socket.connect(remote_path)
1314
+ return ConnectedUNIXDatagramSocket(trio_socket)
1315
+ else:
1316
+ return UNIXDatagramSocket(trio_socket)
1317
+
1318
+ @classmethod
1319
+ async def getaddrinfo(
1320
+ cls,
1321
+ host: bytes | str | None,
1322
+ port: str | int | None,
1323
+ *,
1324
+ family: int | AddressFamily = 0,
1325
+ type: int | SocketKind = 0,
1326
+ proto: int = 0,
1327
+ flags: int = 0,
1328
+ ) -> Sequence[
1329
+ tuple[
1330
+ AddressFamily,
1331
+ SocketKind,
1332
+ int,
1333
+ str,
1334
+ tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes],
1335
+ ]
1336
+ ]:
1337
+ return await trio.socket.getaddrinfo(host, port, family, type, proto, flags)
1338
+
1339
+ @classmethod
1340
+ async def getnameinfo(
1341
+ cls, sockaddr: IPSockAddrType, flags: int = 0
1342
+ ) -> tuple[str, str]:
1343
+ return await trio.socket.getnameinfo(sockaddr, flags)
1344
+
1345
+ @classmethod
1346
+ async def wait_readable(cls, obj: FileDescriptorLike) -> None:
1347
+ try:
1348
+ await wait_readable(obj)
1349
+ except trio.ClosedResourceError as exc:
1350
+ raise ClosedResourceError().with_traceback(exc.__traceback__) from None
1351
+ except trio.BusyResourceError:
1352
+ raise BusyResourceError("reading from") from None
1353
+
1354
+ @classmethod
1355
+ async def wait_writable(cls, obj: FileDescriptorLike) -> None:
1356
+ try:
1357
+ await wait_writable(obj)
1358
+ except trio.ClosedResourceError as exc:
1359
+ raise ClosedResourceError().with_traceback(exc.__traceback__) from None
1360
+ except trio.BusyResourceError:
1361
+ raise BusyResourceError("writing to") from None
1362
+
1363
+ @classmethod
1364
+ def notify_closing(cls, obj: FileDescriptorLike) -> None:
1365
+ notify_closing(obj)
1366
+
1367
+ @classmethod
1368
+ async def wrap_listener_socket(cls, sock: socket.socket) -> abc.SocketListener:
1369
+ if hasattr(socket, "AF_UNIX") and sock.family == socket.AF_UNIX:
1370
+ return UNIXSocketListener(sock)
1371
+
1372
+ return TCPSocketListener(sock)
1373
+
1374
+ @classmethod
1375
+ async def wrap_stream_socket(cls, sock: socket.socket) -> SocketStream:
1376
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1377
+ return SocketStream(trio_sock)
1378
+
1379
+ @classmethod
1380
+ async def wrap_unix_stream_socket(cls, sock: socket.socket) -> UNIXSocketStream:
1381
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1382
+ return UNIXSocketStream(trio_sock)
1383
+
1384
+ @classmethod
1385
+ async def wrap_udp_socket(cls, sock: socket.socket) -> UDPSocket:
1386
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1387
+ return UDPSocket(trio_sock)
1388
+
1389
+ @classmethod
1390
+ async def wrap_connected_udp_socket(cls, sock: socket.socket) -> ConnectedUDPSocket:
1391
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1392
+ return ConnectedUDPSocket(trio_sock)
1393
+
1394
+ @classmethod
1395
+ async def wrap_unix_datagram_socket(cls, sock: socket.socket) -> UNIXDatagramSocket:
1396
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1397
+ return UNIXDatagramSocket(trio_sock)
1398
+
1399
+ @classmethod
1400
+ async def wrap_connected_unix_datagram_socket(
1401
+ cls, sock: socket.socket
1402
+ ) -> ConnectedUNIXDatagramSocket:
1403
+ trio_sock = trio.socket.from_stdlib_socket(sock)
1404
+ return ConnectedUNIXDatagramSocket(trio_sock)
1405
+
1406
+ @classmethod
1407
+ def current_default_thread_limiter(cls) -> CapacityLimiter:
1408
+ try:
1409
+ return _capacity_limiter_wrapper.get()
1410
+ except LookupError:
1411
+ limiter = CapacityLimiter(
1412
+ original=trio.to_thread.current_default_thread_limiter()
1413
+ )
1414
+ _capacity_limiter_wrapper.set(limiter)
1415
+ return limiter
1416
+
1417
+ @classmethod
1418
+ def open_signal_receiver(
1419
+ cls, *signals: Signals
1420
+ ) -> AbstractContextManager[AsyncIterator[Signals]]:
1421
+ return _SignalReceiver(signals)
1422
+
1423
+ @classmethod
1424
+ def get_current_task(cls) -> TaskInfo:
1425
+ task = current_task()
1426
+ return TrioTaskInfo(task)
1427
+
1428
+ @classmethod
1429
+ def get_running_tasks(cls) -> Sequence[TaskInfo]:
1430
+ root_task = current_root_task()
1431
+ assert root_task
1432
+ task_infos = [TrioTaskInfo(root_task)]
1433
+ nurseries = root_task.child_nurseries
1434
+ while nurseries:
1435
+ new_nurseries: list[trio.Nursery] = []
1436
+ for nursery in nurseries:
1437
+ for task in nursery.child_tasks:
1438
+ task_infos.append(TrioTaskInfo(task))
1439
+ new_nurseries.extend(task.child_nurseries)
1440
+
1441
+ nurseries = new_nurseries
1442
+
1443
+ return task_infos
1444
+
1445
+ @classmethod
1446
+ async def wait_all_tasks_blocked(cls) -> None:
1447
+ from trio.testing import wait_all_tasks_blocked
1448
+
1449
+ await wait_all_tasks_blocked()
1450
+
1451
+ @classmethod
1452
+ def create_test_runner(cls, options: dict[str, Any]) -> TestRunner:
1453
+ return TestRunner(**options)
1454
+
1455
+
1456
+ backend_class = TrioBackend
venv/Lib/site-packages/anyio/_core/__init__.py ADDED
File without changes
venv/Lib/site-packages/anyio/_core/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (198 Bytes). View file