ant-ray-nightly 3.0.0.dev20251006__cp311-cp311-macosx_14_0_arm64.whl → 3.0.0.dev20251015__cp311-cp311-macosx_14_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ant-ray-nightly might be problematic. Click here for more details.

Files changed (104) hide show
  1. {ant_ray_nightly-3.0.0.dev20251006.dist-info → ant_ray_nightly-3.0.0.dev20251015.dist-info}/METADATA +82 -82
  2. {ant_ray_nightly-3.0.0.dev20251006.dist-info → ant_ray_nightly-3.0.0.dev20251015.dist-info}/RECORD +101 -101
  3. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/.hash/_cparser.pxd.hash +1 -1
  4. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/.hash/_find_header.pxd.hash +1 -1
  5. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/.hash/_http_parser.pyx.hash +1 -1
  6. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/.hash/_http_writer.pyx.hash +1 -1
  7. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/.hash/hdrs.py.hash +1 -1
  8. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/__init__.py +1 -1
  9. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_cookie_helpers.py +2 -6
  10. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_http_parser.cpython-311-darwin.so +0 -0
  11. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_http_parser.pyx +1 -3
  12. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_http_writer.cpython-311-darwin.so +0 -0
  13. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_http_writer.pyx +9 -7
  14. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/.hash/mask.pxd.hash +1 -1
  15. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/.hash/mask.pyx.hash +1 -1
  16. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/.hash/reader_c.pxd.hash +1 -1
  17. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/mask.cpython-311-darwin.so +0 -0
  18. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/reader_c.cpython-311-darwin.so +0 -0
  19. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/abc.py +1 -1
  20. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/client_reqrep.py +13 -4
  21. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/compression_utils.py +31 -0
  22. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/formdata.py +1 -1
  23. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/http_parser.py +18 -3
  24. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/multipart.py +4 -0
  25. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/streams.py +8 -0
  26. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/web_fileresponse.py +4 -4
  27. ray/_private/runtime_env/agent/thirdparty_files/aiohttp/web_urldispatcher.py +3 -1
  28. ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/METADATA +24 -12
  29. ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/RECORD +33 -33
  30. ray/_private/runtime_env/agent/thirdparty_files/attr/__init__.pyi +4 -4
  31. ray/_private/runtime_env/agent/thirdparty_files/attr/_compat.py +8 -3
  32. ray/_private/runtime_env/agent/thirdparty_files/attr/_funcs.py +45 -16
  33. ray/_private/runtime_env/agent/thirdparty_files/attr/_make.py +334 -95
  34. ray/_private/runtime_env/agent/thirdparty_files/attr/_next_gen.py +58 -7
  35. ray/_private/runtime_env/agent/thirdparty_files/attr/_version_info.py +3 -0
  36. ray/_private/runtime_env/agent/thirdparty_files/attr/validators.py +51 -13
  37. ray/_private/runtime_env/agent/thirdparty_files/attr/validators.pyi +59 -5
  38. ray/_private/runtime_env/agent/thirdparty_files/attrs/__init__.py +4 -1
  39. ray/_private/runtime_env/agent/thirdparty_files/attrs/__init__.pyi +58 -7
  40. ray/_private/runtime_env/agent/thirdparty_files/{attrs-25.3.0.dist-info → attrs-25.4.0.dist-info}/METADATA +63 -60
  41. ray/_private/runtime_env/agent/thirdparty_files/{attrs-25.3.0.dist-info → attrs-25.4.0.dist-info}/RECORD +15 -15
  42. ray/_private/runtime_env/agent/thirdparty_files/frozenlist/__init__.py +1 -1
  43. ray/_private/runtime_env/agent/thirdparty_files/frozenlist/_frozenlist.cpython-311-darwin.so +0 -0
  44. ray/_private/runtime_env/agent/thirdparty_files/{frozenlist-1.7.0.dist-info → frozenlist-1.8.0.dist-info}/METADATA +47 -1
  45. ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.8.0.dist-info/RECORD +12 -0
  46. ray/_private/runtime_env/agent/thirdparty_files/idna/codec.py +1 -1
  47. ray/_private/runtime_env/agent/thirdparty_files/idna/core.py +1 -1
  48. ray/_private/runtime_env/agent/thirdparty_files/idna/idnadata.py +72 -6
  49. ray/_private/runtime_env/agent/thirdparty_files/idna/package_data.py +1 -1
  50. ray/_private/runtime_env/agent/thirdparty_files/idna/uts46data.py +891 -731
  51. ray/_private/runtime_env/agent/thirdparty_files/{idna-3.10.dist-info → idna-3.11.dist-info}/METADATA +37 -78
  52. ray/_private/runtime_env/agent/thirdparty_files/idna-3.11.dist-info/RECORD +22 -0
  53. ray/_private/runtime_env/agent/thirdparty_files/{idna-3.10.dist-info → idna-3.11.dist-info}/WHEEL +1 -1
  54. ray/_private/runtime_env/agent/thirdparty_files/{idna-3.10.dist-info → idna-3.11.dist-info/licenses}/LICENSE.md +1 -1
  55. ray/_private/runtime_env/agent/thirdparty_files/multidict/__init__.py +9 -8
  56. ray/_private/runtime_env/agent/thirdparty_files/multidict/_multidict.cpython-311-darwin.so +0 -0
  57. ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/METADATA +2 -1
  58. ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/RECORD +8 -8
  59. ray/_private/runtime_env/agent/thirdparty_files/propcache/__init__.py +1 -1
  60. ray/_private/runtime_env/agent/thirdparty_files/propcache/_helpers_c.cpython-311-darwin.so +0 -0
  61. ray/_private/runtime_env/agent/thirdparty_files/propcache/_helpers_c.pyx +4 -5
  62. ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/METADATA +31 -1
  63. ray/_private/runtime_env/agent/thirdparty_files/propcache-0.4.1.dist-info/RECORD +18 -0
  64. ray/_private/runtime_env/agent/thirdparty_files/yarl/__init__.py +1 -1
  65. ray/_private/runtime_env/agent/thirdparty_files/yarl/_quoting_c.cpython-311-darwin.so +0 -0
  66. ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/METADATA +20 -1
  67. ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/RECORD +9 -9
  68. ray/core/src/ray/gcs/gcs_server +0 -0
  69. ray/thirdparty_files/setproctitle-1.2.2.dist-info/RECORD +1 -1
  70. ray/thirdparty_files/setproctitle.cpython-311-darwin.so +0 -0
  71. ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.7.0.dist-info/RECORD +0 -12
  72. ray/_private/runtime_env/agent/thirdparty_files/idna-3.10.dist-info/RECORD +0 -22
  73. ray/_private/runtime_env/agent/thirdparty_files/propcache-0.4.0.dist-info/RECORD +0 -18
  74. {ant_ray_nightly-3.0.0.dev20251006.dist-info → ant_ray_nightly-3.0.0.dev20251015.dist-info}/WHEEL +0 -0
  75. {ant_ray_nightly-3.0.0.dev20251006.dist-info → ant_ray_nightly-3.0.0.dev20251015.dist-info}/entry_points.txt +0 -0
  76. {ant_ray_nightly-3.0.0.dev20251006.dist-info → ant_ray_nightly-3.0.0.dev20251015.dist-info}/top_level.txt +0 -0
  77. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/INSTALLER +0 -0
  78. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/REQUESTED +0 -0
  79. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/WHEEL +0 -0
  80. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/licenses/LICENSE.txt +0 -0
  81. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/licenses/vendor/llhttp/LICENSE +0 -0
  82. /ray/_private/runtime_env/agent/thirdparty_files/{aiohttp-3.12.15.dist-info → aiohttp-3.13.0.dist-info}/top_level.txt +0 -0
  83. /ray/_private/runtime_env/agent/thirdparty_files/{attrs-25.3.0.dist-info → attrs-25.4.0.dist-info}/INSTALLER +0 -0
  84. /ray/_private/runtime_env/agent/thirdparty_files/{attrs-25.3.0.dist-info → attrs-25.4.0.dist-info}/WHEEL +0 -0
  85. /ray/_private/runtime_env/agent/thirdparty_files/{attrs-25.3.0.dist-info → attrs-25.4.0.dist-info}/licenses/LICENSE +0 -0
  86. /ray/_private/runtime_env/agent/thirdparty_files/{frozenlist-1.7.0.dist-info → frozenlist-1.8.0.dist-info}/INSTALLER +0 -0
  87. /ray/_private/runtime_env/agent/thirdparty_files/{frozenlist-1.7.0.dist-info → frozenlist-1.8.0.dist-info}/WHEEL +0 -0
  88. /ray/_private/runtime_env/agent/thirdparty_files/{frozenlist-1.7.0.dist-info → frozenlist-1.8.0.dist-info}/licenses/LICENSE +0 -0
  89. /ray/_private/runtime_env/agent/thirdparty_files/{frozenlist-1.7.0.dist-info → frozenlist-1.8.0.dist-info}/top_level.txt +0 -0
  90. /ray/_private/runtime_env/agent/thirdparty_files/{idna-3.10.dist-info → idna-3.11.dist-info}/INSTALLER +0 -0
  91. /ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/INSTALLER +0 -0
  92. /ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/WHEEL +0 -0
  93. /ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/licenses/LICENSE +0 -0
  94. /ray/_private/runtime_env/agent/thirdparty_files/{multidict-6.6.4.dist-info → multidict-6.7.0.dist-info}/top_level.txt +0 -0
  95. /ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/INSTALLER +0 -0
  96. /ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/WHEEL +0 -0
  97. /ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/licenses/LICENSE +0 -0
  98. /ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/licenses/NOTICE +0 -0
  99. /ray/_private/runtime_env/agent/thirdparty_files/{propcache-0.4.0.dist-info → propcache-0.4.1.dist-info}/top_level.txt +0 -0
  100. /ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/INSTALLER +0 -0
  101. /ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/WHEEL +0 -0
  102. /ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/licenses/LICENSE +0 -0
  103. /ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/licenses/NOTICE +0 -0
  104. /ray/_private/runtime_env/agent/thirdparty_files/{yarl-1.21.0.dist-info → yarl-1.22.0.dist-info}/top_level.txt +0 -0
@@ -21,6 +21,18 @@ try:
21
21
  except ImportError: # pragma: no cover
22
22
  HAS_BROTLI = False
23
23
 
24
+ if sys.version_info >= (3, 14):
25
+ import compression.zstd # noqa: I900
26
+
27
+ HAS_ZSTD = True
28
+ else:
29
+ try:
30
+ import zstandard
31
+
32
+ HAS_ZSTD = True
33
+ except ImportError:
34
+ HAS_ZSTD = False
35
+
24
36
  MAX_SYNC_CHUNK_SIZE = 1024
25
37
 
26
38
 
@@ -276,3 +288,22 @@ class BrotliDecompressor:
276
288
  if hasattr(self._obj, "flush"):
277
289
  return cast(bytes, self._obj.flush())
278
290
  return b""
291
+
292
+
293
+ class ZSTDDecompressor:
294
+ def __init__(self) -> None:
295
+ if not HAS_ZSTD:
296
+ raise RuntimeError(
297
+ "The zstd decompression is not available. "
298
+ "Please install `zstandard` module"
299
+ )
300
+ if sys.version_info >= (3, 14):
301
+ self._obj = compression.zstd.ZstdDecompressor()
302
+ else:
303
+ self._obj = zstandard.ZstdDecompressor()
304
+
305
+ def decompress_sync(self, data: bytes) -> bytes:
306
+ return self._obj.decompress(data)
307
+
308
+ def flush(self) -> bytes:
309
+ return b""
@@ -110,7 +110,7 @@ class FormData:
110
110
 
111
111
  elif isinstance(rec, (list, tuple)) and len(rec) == 2:
112
112
  k, fp = rec
113
- self.add_field(k, fp) # type: ignore[arg-type]
113
+ self.add_field(k, fp)
114
114
 
115
115
  else:
116
116
  raise TypeError(
@@ -26,7 +26,13 @@ from yarl import URL
26
26
 
27
27
  from . import hdrs
28
28
  from .base_protocol import BaseProtocol
29
- from .compression_utils import HAS_BROTLI, BrotliDecompressor, ZLibDecompressor
29
+ from .compression_utils import (
30
+ HAS_BROTLI,
31
+ HAS_ZSTD,
32
+ BrotliDecompressor,
33
+ ZLibDecompressor,
34
+ ZSTDDecompressor,
35
+ )
30
36
  from .helpers import (
31
37
  _EXC_SENTINEL,
32
38
  DEBUG,
@@ -546,7 +552,7 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
546
552
  enc = headers.get(hdrs.CONTENT_ENCODING)
547
553
  if enc:
548
554
  enc = enc.lower()
549
- if enc in ("gzip", "deflate", "br"):
555
+ if enc in ("gzip", "deflate", "br", "zstd"):
550
556
  encoding = enc
551
557
 
552
558
  # chunking
@@ -958,10 +964,11 @@ class DeflateBuffer:
958
964
  def __init__(self, out: StreamReader, encoding: Optional[str]) -> None:
959
965
  self.out = out
960
966
  self.size = 0
967
+ out.total_compressed_bytes = self.size
961
968
  self.encoding = encoding
962
969
  self._started_decoding = False
963
970
 
964
- self.decompressor: Union[BrotliDecompressor, ZLibDecompressor]
971
+ self.decompressor: Union[BrotliDecompressor, ZLibDecompressor, ZSTDDecompressor]
965
972
  if encoding == "br":
966
973
  if not HAS_BROTLI: # pragma: no cover
967
974
  raise ContentEncodingError(
@@ -969,6 +976,13 @@ class DeflateBuffer:
969
976
  "Please install `Brotli`"
970
977
  )
971
978
  self.decompressor = BrotliDecompressor()
979
+ elif encoding == "zstd":
980
+ if not HAS_ZSTD:
981
+ raise ContentEncodingError(
982
+ "Can not decode content-encoding: zstandard (zstd). "
983
+ "Please install `zstandard`"
984
+ )
985
+ self.decompressor = ZSTDDecompressor()
972
986
  else:
973
987
  self.decompressor = ZLibDecompressor(encoding=encoding)
974
988
 
@@ -984,6 +998,7 @@ class DeflateBuffer:
984
998
  return
985
999
 
986
1000
  self.size += size
1001
+ self.out.total_compressed_bytes = self.size
987
1002
 
988
1003
  # RFC1950
989
1004
  # bits 0..3 = CM = 0b1000 = 8 = "deflate"
@@ -114,6 +114,10 @@ def parse_content_disposition(
114
114
  while parts:
115
115
  item = parts.pop(0)
116
116
 
117
+ if not item: # To handle trailing semicolons
118
+ warnings.warn(BadContentDispositionHeader(header))
119
+ continue
120
+
117
121
  if "=" not in item:
118
122
  warnings.warn(BadContentDispositionHeader(header))
119
123
  return None, {}
@@ -130,6 +130,7 @@ class StreamReader(AsyncStreamReaderMixin):
130
130
  "_eof_callbacks",
131
131
  "_eof_counter",
132
132
  "total_bytes",
133
+ "total_compressed_bytes",
133
134
  )
134
135
 
135
136
  def __init__(
@@ -159,6 +160,7 @@ class StreamReader(AsyncStreamReaderMixin):
159
160
  self._eof_callbacks: List[Callable[[], None]] = []
160
161
  self._eof_counter = 0
161
162
  self.total_bytes = 0
163
+ self.total_compressed_bytes: Optional[int] = None
162
164
 
163
165
  def __repr__(self) -> str:
164
166
  info = [self.__class__.__name__]
@@ -250,6 +252,12 @@ class StreamReader(AsyncStreamReaderMixin):
250
252
  finally:
251
253
  self._eof_waiter = None
252
254
 
255
+ @property
256
+ def total_raw_bytes(self) -> int:
257
+ if self.total_compressed_bytes is None:
258
+ return self.total_bytes
259
+ return self.total_compressed_bytes
260
+
253
261
  def unread_data(self, data: bytes) -> None:
254
262
  """rollback reading some data from stream, inserting it to buffer head."""
255
263
  warnings.warn(
@@ -164,8 +164,8 @@ class FileResponse(StreamResponse):
164
164
  ) -> Optional[AbstractStreamWriter]:
165
165
  self.set_status(HTTPNotModified.status_code)
166
166
  self._length_check = False
167
- self.etag = etag_value # type: ignore[assignment]
168
- self.last_modified = last_modified # type: ignore[assignment]
167
+ self.etag = etag_value
168
+ self.last_modified = last_modified
169
169
  # Delete any Content-Length headers provided by user. HTTP 304
170
170
  # should always have empty response body
171
171
  return await super().prepare(request)
@@ -395,8 +395,8 @@ class FileResponse(StreamResponse):
395
395
  # compress.
396
396
  self._compression = False
397
397
 
398
- self.etag = f"{st.st_mtime_ns:x}-{st.st_size:x}" # type: ignore[assignment]
399
- self.last_modified = file_mtime # type: ignore[assignment]
398
+ self.etag = f"{st.st_mtime_ns:x}-{st.st_size:x}"
399
+ self.last_modified = file_mtime
400
400
  self.content_length = count
401
401
 
402
402
  self._headers[hdrs.ACCEPT_RANGES] = "bytes"
@@ -194,6 +194,8 @@ class AbstractRoute(abc.ABC):
194
194
  ):
195
195
  pass
196
196
  elif inspect.isgeneratorfunction(handler):
197
+ if TYPE_CHECKING:
198
+ assert False
197
199
  warnings.warn(
198
200
  "Bare generators are deprecated, use @coroutine wrapper",
199
201
  DeprecationWarning,
@@ -978,7 +980,7 @@ class View(AbstractView):
978
980
  assert isinstance(ret, StreamResponse)
979
981
  return ret
980
982
 
981
- def __await__(self) -> Generator[Any, None, StreamResponse]:
983
+ def __await__(self) -> Generator[None, None, StreamResponse]:
982
984
  return self._iter().__await__()
983
985
 
984
986
  def _raise_allowed_methods(self) -> NoReturn:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiohttp
3
- Version: 3.12.15
3
+ Version: 3.13.0
4
4
  Summary: Async http client/server framework (asyncio)
5
5
  Home-page: https://github.com/aio-libs/aiohttp
6
6
  Maintainer: aiohttp team <team@aiohttp.org>
@@ -27,6 +27,7 @@ Classifier: Programming Language :: Python :: 3.10
27
27
  Classifier: Programming Language :: Python :: 3.11
28
28
  Classifier: Programming Language :: Python :: 3.12
29
29
  Classifier: Programming Language :: Python :: 3.13
30
+ Classifier: Programming Language :: Python :: 3.14
30
31
  Classifier: Topic :: Internet :: WWW/HTTP
31
32
  Requires-Python: >=3.9
32
33
  Description-Content-Type: text/x-rst
@@ -44,6 +45,7 @@ Provides-Extra: speedups
44
45
  Requires-Dist: aiodns>=3.3.0; extra == "speedups"
45
46
  Requires-Dist: Brotli; platform_python_implementation == "CPython" and extra == "speedups"
46
47
  Requires-Dist: brotlicffi; platform_python_implementation != "CPython" and extra == "speedups"
48
+ Requires-Dist: zstandard; (platform_python_implementation == "CPython" and python_version < "3.14") and extra == "speedups"
47
49
  Dynamic: license-file
48
50
 
49
51
  ==================================
@@ -65,25 +67,21 @@ Async http client/server framework
65
67
  :target: https://codecov.io/gh/aio-libs/aiohttp
66
68
  :alt: codecov.io status for master branch
67
69
 
68
- .. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
69
- :target: https://codspeed.io/aio-libs/aiohttp
70
- :alt: Codspeed.io status for aiohttp
71
-
72
70
  .. image:: https://badge.fury.io/py/aiohttp.svg
73
71
  :target: https://pypi.org/project/aiohttp
74
72
  :alt: Latest PyPI package version
75
73
 
74
+ .. image:: https://img.shields.io/pypi/dm/aiohttp
75
+ :target: https://pypistats.org/packages/aiohttp
76
+ :alt: Downloads count
77
+
76
78
  .. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
77
79
  :target: https://docs.aiohttp.org/
78
80
  :alt: Latest Read The Docs
79
81
 
80
- .. 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
81
- :target: https://matrix.to/#/%23aio-libs:matrix.org
82
- :alt: Matrix Room #aio-libs:matrix.org
83
-
84
- .. 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
85
- :target: https://matrix.to/#/%23aio-libs-space:matrix.org
86
- :alt: Matrix Space — #aio-libs-space:matrix.org
82
+ .. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
83
+ :target: https://codspeed.io/aio-libs/aiohttp
84
+ :alt: Codspeed.io status for aiohttp
87
85
 
88
86
 
89
87
  Key Features
@@ -249,3 +247,17 @@ Benchmarks
249
247
  If you are interested in efficiency, the AsyncIO community maintains a
250
248
  list of benchmarks on the official wiki:
251
249
  https://github.com/python/asyncio/wiki/Benchmarks
250
+
251
+ --------
252
+
253
+ .. 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
254
+ :target: https://matrix.to/#/%23aio-libs:matrix.org
255
+ :alt: Matrix Room — #aio-libs:matrix.org
256
+
257
+ .. 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
258
+ :target: https://matrix.to/#/%23aio-libs-space:matrix.org
259
+ :alt: Matrix Space — #aio-libs-space:matrix.org
260
+
261
+ .. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=aiohttp
262
+ :target: https://insights.linuxfoundation.org/project/aiohttp
263
+ :alt: LFX Health Score
@@ -1,17 +1,17 @@
1
- aiohttp-3.12.15.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
- aiohttp-3.12.15.dist-info/METADATA,sha256=uZt4MMQKfAQbpmxyQ63yHApgfILSD4loMGxE79YfMKE,7657
3
- aiohttp-3.12.15.dist-info/RECORD,,
4
- aiohttp-3.12.15.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- aiohttp-3.12.15.dist-info/WHEEL,sha256=sunMa2yiYbrNLGeMVDqEA0ayyJbHlex7SCn1TZrEq60,136
6
- aiohttp-3.12.15.dist-info/licenses/LICENSE.txt,sha256=n4DQ2311WpQdtFchcsJw7L2PCCuiFd3QlZhZQu2Uqes,588
7
- aiohttp-3.12.15.dist-info/licenses/vendor/llhttp/LICENSE,sha256=68qFTgE0zSVtZzYnwgSZ9CV363S6zwi58ltianPJEnc,1105
8
- aiohttp-3.12.15.dist-info/top_level.txt,sha256=iv-JIaacmTl-hSho3QmphcKnbRRYx1st47yjz_178Ro,8
9
- aiohttp/.hash/_cparser.pxd.hash,sha256=j9RLRsv_6YYVDVckgylDv7myK7To6uVoKaOd45JIHXY,64
10
- aiohttp/.hash/_find_header.pxd.hash,sha256=BtbSPeZ2eOtt807jecTkoEeBQ4C5AiBxjzbvJj9eV6E,64
11
- aiohttp/.hash/_http_parser.pyx.hash,sha256=xAEdqCJjxfZOoz1HAYOJSvhXRmldlGzS0-ICkDNXp2Y,64
12
- aiohttp/.hash/_http_writer.pyx.hash,sha256=gFrTY7VEARZbbvOr0txsB4Kbot2EX1xkOCPZR3lu3rA,64
13
- aiohttp/.hash/hdrs.py.hash,sha256=LtOwhipa1RSijAkQISL_oWWzED2PRlxP8CZwWOx62Tc,64
14
- aiohttp/__init__.py,sha256=_g5Icol1-XPd2n0J5OVA9f4m9MPY5dD1wUgj7rzsAUA,8303
1
+ aiohttp-3.13.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ aiohttp-3.13.0.dist-info/METADATA,sha256=MMgGAtplXaCYPIJajnkzKVOSQolGCMLIMMhrr1XaCLM,8147
3
+ aiohttp-3.13.0.dist-info/RECORD,,
4
+ aiohttp-3.13.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ aiohttp-3.13.0.dist-info/WHEEL,sha256=sunMa2yiYbrNLGeMVDqEA0ayyJbHlex7SCn1TZrEq60,136
6
+ aiohttp-3.13.0.dist-info/licenses/LICENSE.txt,sha256=n4DQ2311WpQdtFchcsJw7L2PCCuiFd3QlZhZQu2Uqes,588
7
+ aiohttp-3.13.0.dist-info/licenses/vendor/llhttp/LICENSE,sha256=68qFTgE0zSVtZzYnwgSZ9CV363S6zwi58ltianPJEnc,1105
8
+ aiohttp-3.13.0.dist-info/top_level.txt,sha256=iv-JIaacmTl-hSho3QmphcKnbRRYx1st47yjz_178Ro,8
9
+ aiohttp/.hash/_cparser.pxd.hash,sha256=oIlezvoJGZE6-ZImy9DWJWJ9jmK4nobbsaEmkgwBkoQ,122
10
+ aiohttp/.hash/_find_header.pxd.hash,sha256=e5PYiyDzMXiyZFd4-ALGxEv49PjPhij4cOmV12aVFxQ,126
11
+ aiohttp/.hash/_http_parser.pyx.hash,sha256=uZXIPLEavqt5Jm9vL0S00wn80OVkI1YeLE5jEFSeCUc,126
12
+ aiohttp/.hash/_http_writer.pyx.hash,sha256=MboJpn5z8wdmkkOhQ70m726h2Ddc9N1uep6wI4MG3kI,126
13
+ aiohttp/.hash/hdrs.py.hash,sha256=1gLWu377IP_KPjc8HykpPdBQiMz2hKNE9YumrEChURQ,117
14
+ aiohttp/__init__.py,sha256=V8eLpNvuyUF7ZLcqI6e1ydaeZSwnDQZXcL_ouRH-mCo,8302
15
15
  aiohttp/__pycache__/__init__.cpython-311.pyc,,
16
16
  aiohttp/__pycache__/_cookie_helpers.cpython-311.pyc,,
17
17
  aiohttp/__pycache__/abc.cpython-311.pyc,,
@@ -60,17 +60,17 @@ aiohttp/__pycache__/web_server.cpython-311.pyc,,
60
60
  aiohttp/__pycache__/web_urldispatcher.cpython-311.pyc,,
61
61
  aiohttp/__pycache__/web_ws.cpython-311.pyc,,
62
62
  aiohttp/__pycache__/worker.cpython-311.pyc,,
63
- aiohttp/_cookie_helpers.py,sha256=xjCVZKrQIfH1bwN5UeNrem8kevnXwZcBoNY94yyk8Qc,12418
63
+ aiohttp/_cookie_helpers.py,sha256=uncmWVWETXBH-IAAOlT5bHZSaOhGaV7rY9u75B7f2Yg,12247
64
64
  aiohttp/_cparser.pxd,sha256=UnbUYCHg4NdXfgyRVYAMv2KTLWClB4P-xCrvtj_r7ew,4295
65
65
  aiohttp/_find_header.pxd,sha256=0GfwFCPN2zxEKTO1_MA5sYq2UfzsG8kcV3aTqvwlz3g,68
66
66
  aiohttp/_headers.pxi,sha256=n701k28dVPjwRnx5j6LpJhLTfj7dqu2vJt7f0O60Oyg,2007
67
- aiohttp/_http_parser.cpython-311-darwin.so,sha256=sBi9TPqZv5aifEvIiUQSQSCQeGCucCorp_EBDx_gl9E,372816
68
- aiohttp/_http_parser.pyx,sha256=1L07PKuJjgDGQuqlmy965a5aoTdOaYWX99gFowLyPiE,28239
69
- aiohttp/_http_writer.cpython-311-darwin.so,sha256=67l94ZY0RF26G8MRRA0Jn5YR1vqE8dSyE8kEdqk7hE4,100016
70
- aiohttp/_http_writer.pyx,sha256=96seJigne4J3LVnB3DAzwTSV12nfZ7HR1JsaR0p13VI,4561
71
- aiohttp/_websocket/.hash/mask.pxd.hash,sha256=1l0t0G2gky43IXuRTduT2EnQlMuoUdITrBrQksCLlzA,64
72
- aiohttp/_websocket/.hash/mask.pyx.hash,sha256=iM53azQIY5pydRZUsfEP3HbS6JrhrXR-haTK4TGoWrQ,64
73
- aiohttp/_websocket/.hash/reader_c.pxd.hash,sha256=kGVrGDxNmLUb06ygH-Adi2O8Jjx1ujeIU0c58tfZaxA,64
67
+ aiohttp/_http_parser.cpython-311-darwin.so,sha256=PS1qjK82rqHdVfIfYg4yrwenuQa93BNYBI7WwP4smMk,435872
68
+ aiohttp/_http_parser.pyx,sha256=tmA1PaJn7H8U1nyXtoHJV44pxYVzqXAf1UgJaYPaw28,28219
69
+ aiohttp/_http_writer.cpython-311-darwin.so,sha256=-TawmTiQ9yxtLW-aoXCpkbxlNdRCFSUMyPQgqmNl9Bs,109392
70
+ aiohttp/_http_writer.pyx,sha256=VlFEBM6HoVv8a0AAJtc6JwFlsv2-cDE8-gB94p3dfhQ,4664
71
+ aiohttp/_websocket/.hash/mask.pxd.hash,sha256=ebMpBz5iaBd0tWsl9uYmnJXclUn2ZLaM1HImB0y86MQ,129
72
+ aiohttp/_websocket/.hash/mask.pyx.hash,sha256=Td1g3PCFM0DQsJEXruY4pygFu0ScpCxKmncwQFpaStk,129
73
+ aiohttp/_websocket/.hash/reader_c.pxd.hash,sha256=pTDxd9-I400MmfeI7xdZ26wyS3KztJHZtChc3hCklVc,133
74
74
  aiohttp/_websocket/__init__.py,sha256=Mar3R9_vBN_Ea4lsW7iTAVXD7OKswKPGqF5xgSyt77k,44
75
75
  aiohttp/_websocket/__pycache__/__init__.cpython-311.pyc,,
76
76
  aiohttp/_websocket/__pycache__/helpers.cpython-311.pyc,,
@@ -80,44 +80,44 @@ aiohttp/_websocket/__pycache__/reader_c.cpython-311.pyc,,
80
80
  aiohttp/_websocket/__pycache__/reader_py.cpython-311.pyc,,
81
81
  aiohttp/_websocket/__pycache__/writer.cpython-311.pyc,,
82
82
  aiohttp/_websocket/helpers.py,sha256=P-XLv8IUaihKzDenVUqfKU5DJbWE5HvG8uhvUZK8Ic4,5038
83
- aiohttp/_websocket/mask.cpython-311-darwin.so,sha256=II27-0t_XRU0CeqzzKHORDrIh1v1AzLW9YBAs8pX8q8,79896
83
+ aiohttp/_websocket/mask.cpython-311-darwin.so,sha256=muZquH16bPyTbCM9btu7eGBA4cTxBtfF5ms-aKlbNsM,86072
84
84
  aiohttp/_websocket/mask.pxd,sha256=sBmZ1Amym9kW4Ge8lj1fLZ7mPPya4LzLdpkQExQXv5M,112
85
85
  aiohttp/_websocket/mask.pyx,sha256=BHjOtV0O0w7xp9p0LNADRJvGmgfPn9sGeJvSs0fL__4,1397
86
86
  aiohttp/_websocket/models.py,sha256=XAzjs_8JYszWXIgZ6R3ZRrF-tX9Q_6LiD49WRYojopM,2121
87
87
  aiohttp/_websocket/reader.py,sha256=eC4qS0c5sOeQ2ebAHLaBpIaTVFaSKX79pY2xvh3Pqyw,1030
88
- aiohttp/_websocket/reader_c.cpython-311-darwin.so,sha256=AafTEqatT2MRDAn-xXAPCWycCTM76R8odxf4W3IY3Io,227920
88
+ aiohttp/_websocket/reader_c.cpython-311-darwin.so,sha256=QsYCLJ4oZZMe-OViAij_zIwIGc56O4q2OmisZg9ZDP8,257008
89
89
  aiohttp/_websocket/reader_c.pxd,sha256=nl_njtDrzlQU0rjgGGjZDB-swguE0tX_bCPobkShVa4,2625
90
90
  aiohttp/_websocket/reader_c.py,sha256=gSsE_iSBr7-ORvOmgkCT7Jpj4_j3854i_Cp88Se1_6E,18791
91
91
  aiohttp/_websocket/reader_py.py,sha256=gSsE_iSBr7-ORvOmgkCT7Jpj4_j3854i_Cp88Se1_6E,18791
92
92
  aiohttp/_websocket/writer.py,sha256=9qCnQnCFwPmvf6U6i_7VfTldjpcDfQ_ojeCv5mXoMkw,7139
93
- aiohttp/abc.py,sha256=jA2jRYAxc217gO96C-wDXcAPcDWjVJpqXrTGfa7uwqM,7148
93
+ aiohttp/abc.py,sha256=M66F4S6m00bIEn7y4ha_XLTMDmVQ9dPihfOVB0pGfOo,7149
94
94
  aiohttp/base_protocol.py,sha256=Tp8cxUPQvv9kUPk3w6lAzk6d2MAzV3scwI_3Go3C47c,3025
95
95
  aiohttp/client.py,sha256=UmwwoDurmDDvxTwa4e1VElko4mc8_Snsvs3CA6SE-kc,57584
96
96
  aiohttp/client_exceptions.py,sha256=uyKbxI2peZhKl7lELBMx3UeusNkfpemPWpGFq0r6JeM,11367
97
97
  aiohttp/client_middleware_digest_auth.py,sha256=BIoQJ5eWL5NNkPOmezTGrceWIho8ETDvS8NKvX-3Xdw,17088
98
98
  aiohttp/client_middlewares.py,sha256=kP5N9CMzQPMGPIEydeVUiLUTLsw8Vl8Gr4qAWYdu3vM,1918
99
99
  aiohttp/client_proto.py,sha256=56_WtLStZGBFPYKzgEgY6v24JkhV1y6JEmmuxeJT2So,12110
100
- aiohttp/client_reqrep.py,sha256=5IZIhC016PMwmEg1EyGdP2byKcY8n28Dc_TLAzU2e1o,53531
100
+ aiohttp/client_reqrep.py,sha256=ckYUCHgbyr23-ypiZYNxvIQTsMpMVtoTLniNij4OlXg,53668
101
101
  aiohttp/client_ws.py,sha256=1CIjIXwyzOMIYw6AjUES4-qUwbyVHW1seJKQfg_Rta8,15109
102
- aiohttp/compression_utils.py,sha256=LDUVfDiChHNb_ojMEITJuoSEbOAQ4Qznu07vTHL-_pY,8868
102
+ aiohttp/compression_utils.py,sha256=JvEDGV2QXjYXT4Q_rjr1su-SrENoSjHiuDAScr05fJk,9632
103
103
  aiohttp/connector.py,sha256=WQetKoSW7XnHA9r4o9OWwO3-n7ymOwBd2Tg_xHNw0Bs,68456
104
104
  aiohttp/cookiejar.py,sha256=e28ZMQwJ5P0vbPX1OX4Se7-k3zeGvocFEqzGhwpG53k,18922
105
- aiohttp/formdata.py,sha256=dRmQY8LA6WSj5HzqF9tUzu_SNe6mzZ1DqXXkyg4ga20,6410
105
+ aiohttp/formdata.py,sha256=xqYMbUo1qoLYPuzY92XeR4pyEe-w-DNcToARDF3GUhA,6384
106
106
  aiohttp/hdrs.py,sha256=2rj5MyA-6yRdYPhW5UKkW4iNWhEAlGIOSBH5D4FmKNE,5111
107
107
  aiohttp/helpers.py,sha256=bblNEhp4hFimEmxMdPNxEluBY17L5YUArHYvoxzoEe4,29614
108
108
  aiohttp/http.py,sha256=8o8j8xH70OWjnfTWA9V44NR785QPxEPrUtzMXiAVpwc,1842
109
109
  aiohttp/http_exceptions.py,sha256=AZafFHgtAkAgrKZf8zYPU8VX2dq32-VAoP-UZxBLU0c,2960
110
- aiohttp/http_parser.py,sha256=SRADKjgUtYJxUgvvYTyJA0wB8WpKjTcKpzIT8fsE1aE,36896
110
+ aiohttp/http_parser.py,sha256=nXizX63zytOxjVyEds0CPuvFKa9MY96Zfv5hpZjPAhY,37372
111
111
  aiohttp/http_websocket.py,sha256=8VXFKw6KQUEmPg48GtRMB37v0gTK7A0inoxXuDxMZEc,842
112
112
  aiohttp/http_writer.py,sha256=fbRtKPYSqRbtAdr_gqpjF2-4sI1ESL8dPDF-xY_mAMY,12446
113
113
  aiohttp/log.py,sha256=BbNKx9e3VMIm0xYjZI0IcBBoS7wjdeIeSaiJE7-qK2g,325
114
- aiohttp/multipart.py,sha256=vNIFEgZUdVzYYU0wsowcx7CvsUTkqPo-LWgzupsPnL8,39901
114
+ aiohttp/multipart.py,sha256=6q6QRjKFVqaWzTbc7bkuBtXsTaQq5b2BhHxLBvAElac,40040
115
115
  aiohttp/payload.py,sha256=O6nsYNULL7AeM2cyJ6TYX73ncVnL5xJwt5AegxwMKqw,40874
116
116
  aiohttp/payload_streamer.py,sha256=ZzEYyfzcjGWkVkK3XR2pBthSCSIykYvY3Wr5cGQ2eTc,2211
117
117
  aiohttp/py.typed,sha256=sow9soTwP9T_gEAQSVh7Gb8855h04Nwmhs2We-JRgZM,7
118
118
  aiohttp/pytest_plugin.py,sha256=z4XwqmsKdyJCKxbGiA5kFf90zcedvomqk4RqjZbhKNk,12901
119
119
  aiohttp/resolver.py,sha256=gsrfUpFf8iHlcHfJvY-1fiBHW3PRvRVNb5lNZBg3zlY,10031
120
- aiohttp/streams.py,sha256=U-qTkuAqIfpJChuKEy-vYn8nQ_Z1MVcW0WO2DHiJz_o,22329
120
+ aiohttp/streams.py,sha256=cQxo6Fyu_HDWDpbezGRVPIVYtVtTbSLRF7g511DNmSs,22601
121
121
  aiohttp/tcp_helpers.py,sha256=BSadqVWaBpMFDRWnhaaR941N9MiDZ7bdTrxgCb0CW-M,961
122
122
  aiohttp/test_utils.py,sha256=ZJSzZWjC76KSbtwddTKcP6vHpUl_ozfAf3F93ewmHRU,23016
123
123
  aiohttp/tracing.py,sha256=-6aaW6l0J9uJD45LzR4cijYH0j62pt0U_nn_aVzFku4,14558
@@ -125,7 +125,7 @@ aiohttp/typedefs.py,sha256=wUlqwe9Mw9W8jT3HsYJcYk00qP3EMPz3nTkYXmeNN48,1657
125
125
  aiohttp/web.py,sha256=sG_U41AY4S_LBY9sReiBzXKJRZpXk8xgiE_l5S_UPPg,18390
126
126
  aiohttp/web_app.py,sha256=lGU_aAMN-h3wy-LTTHi6SeKH8ydt1G51BXcCspgD5ZA,19452
127
127
  aiohttp/web_exceptions.py,sha256=7nIuiwhZ39vJJ9KrWqArA5QcWbUdqkz2CLwEpJapeN8,10360
128
- aiohttp/web_fileresponse.py,sha256=EtDuw5mF7uGkjrrwSBaDQk6F1FJW4pnwE2pZGv3T1QI,16474
128
+ aiohttp/web_fileresponse.py,sha256=Xzau8EMrWNrFg3u46h4UEteg93G4zYq94CU6vy0HiqE,16362
129
129
  aiohttp/web_log.py,sha256=rX5D7xLOX2B6BMdiZ-chme_KfJfW5IXEoFwLfkfkajs,7865
130
130
  aiohttp/web_middlewares.py,sha256=sFI0AgeNjdyAjuz92QtMIpngmJSOxrqe2Jfbs4BNUu0,4165
131
131
  aiohttp/web_protocol.py,sha256=c8a0PKGqfhIAiq2RboMsy1NRza4dnj6gnXIWvJUeCF0,27015
@@ -134,6 +134,6 @@ aiohttp/web_response.py,sha256=PKcziNU4LmftXqKVvoRMrAbOeVClpSN-iznHsiWezmU,29341
134
134
  aiohttp/web_routedef.py,sha256=VT1GAx6BrawoDh5RwBwBu5wSABSqgWwAe74AUCyZAEo,6110
135
135
  aiohttp/web_runner.py,sha256=v1G1nKiOOQgFnTSR4IMc6I9ReEFDMaHtMLvO_roDM-A,11786
136
136
  aiohttp/web_server.py,sha256=-9WDKUAiR9ll-rSdwXSqG6YjaoW79d1R4y0BGSqgUMA,2888
137
- aiohttp/web_urldispatcher.py,sha256=sFkcsa8qLFkDp47_oW7Z7fiq7DcVXiff1Etn0QN8DJA,44000
137
+ aiohttp/web_urldispatcher.py,sha256=abp8PZnSfXPB89vS_9kJUenrXOu48bjTEjbHndXZ_48,44060
138
138
  aiohttp/web_ws.py,sha256=lItgmyatkXh0M6EY7JoZnSZkUl6R0wv8B88X4ILqQbU,22739
139
139
  aiohttp/worker.py,sha256=zT0iWN5Xze194bO6_VjHou0x7lR_k0MviN6Kadnk22g,8152
@@ -176,7 +176,7 @@ def attrib(
176
176
  type: None = ...,
177
177
  converter: None = ...,
178
178
  factory: None = ...,
179
- kw_only: bool = ...,
179
+ kw_only: bool | None = ...,
180
180
  eq: _EqOrderType | None = ...,
181
181
  order: _EqOrderType | None = ...,
182
182
  on_setattr: _OnSetAttrArgType | None = ...,
@@ -200,7 +200,7 @@ def attrib(
200
200
  | tuple[_ConverterType]
201
201
  | None = ...,
202
202
  factory: Callable[[], _T] | None = ...,
203
- kw_only: bool = ...,
203
+ kw_only: bool | None = ...,
204
204
  eq: _EqOrderType | None = ...,
205
205
  order: _EqOrderType | None = ...,
206
206
  on_setattr: _OnSetAttrArgType | None = ...,
@@ -223,7 +223,7 @@ def attrib(
223
223
  | tuple[_ConverterType]
224
224
  | None = ...,
225
225
  factory: Callable[[], _T] | None = ...,
226
- kw_only: bool = ...,
226
+ kw_only: bool | None = ...,
227
227
  eq: _EqOrderType | None = ...,
228
228
  order: _EqOrderType | None = ...,
229
229
  on_setattr: _OnSetAttrArgType | None = ...,
@@ -246,7 +246,7 @@ def attrib(
246
246
  | tuple[_ConverterType]
247
247
  | None = ...,
248
248
  factory: Callable[[], _T] | None = ...,
249
- kw_only: bool = ...,
249
+ kw_only: bool | None = ...,
250
250
  eq: _EqOrderType | None = ...,
251
251
  order: _EqOrderType | None = ...,
252
252
  on_setattr: _OnSetAttrArgType | None = ...,
@@ -10,7 +10,6 @@ from typing import _GenericAlias
10
10
 
11
11
 
12
12
  PYPY = platform.python_implementation() == "PyPy"
13
- PY_3_9_PLUS = sys.version_info[:2] >= (3, 9)
14
13
  PY_3_10_PLUS = sys.version_info[:2] >= (3, 10)
15
14
  PY_3_11_PLUS = sys.version_info[:2] >= (3, 11)
16
15
  PY_3_12_PLUS = sys.version_info[:2] >= (3, 12)
@@ -18,10 +17,16 @@ PY_3_13_PLUS = sys.version_info[:2] >= (3, 13)
18
17
  PY_3_14_PLUS = sys.version_info[:2] >= (3, 14)
19
18
 
20
19
 
21
- if PY_3_14_PLUS: # pragma: no cover
20
+ if PY_3_14_PLUS:
22
21
  import annotationlib
23
22
 
24
- _get_annotations = annotationlib.get_annotations
23
+ # We request forward-ref annotations to not break in the presence of
24
+ # forward references.
25
+
26
+ def _get_annotations(cls):
27
+ return annotationlib.get_annotations(
28
+ cls, format=annotationlib.Format.FORWARDREF
29
+ )
25
30
 
26
31
  else:
27
32
 
@@ -3,11 +3,28 @@
3
3
 
4
4
  import copy
5
5
 
6
- from ._compat import PY_3_9_PLUS, get_generic_base
6
+ from ._compat import get_generic_base
7
7
  from ._make import _OBJ_SETATTR, NOTHING, fields
8
8
  from .exceptions import AttrsAttributeNotFoundError
9
9
 
10
10
 
11
+ _ATOMIC_TYPES = frozenset(
12
+ {
13
+ type(None),
14
+ bool,
15
+ int,
16
+ float,
17
+ str,
18
+ complex,
19
+ bytes,
20
+ type(...),
21
+ type,
22
+ range,
23
+ property,
24
+ }
25
+ )
26
+
27
+
11
28
  def asdict(
12
29
  inst,
13
30
  recurse=True,
@@ -71,7 +88,10 @@ def asdict(
71
88
  v = value_serializer(inst, a, v)
72
89
 
73
90
  if recurse is True:
74
- if has(v.__class__):
91
+ value_type = type(v)
92
+ if value_type in _ATOMIC_TYPES:
93
+ rv[a.name] = v
94
+ elif has(value_type):
75
95
  rv[a.name] = asdict(
76
96
  v,
77
97
  recurse=True,
@@ -80,8 +100,8 @@ def asdict(
80
100
  retain_collection_types=retain_collection_types,
81
101
  value_serializer=value_serializer,
82
102
  )
83
- elif isinstance(v, (tuple, list, set, frozenset)):
84
- cf = v.__class__ if retain_collection_types is True else list
103
+ elif issubclass(value_type, (tuple, list, set, frozenset)):
104
+ cf = value_type if retain_collection_types is True else list
85
105
  items = [
86
106
  _asdict_anything(
87
107
  i,
@@ -101,7 +121,7 @@ def asdict(
101
121
  # Workaround for TypeError: cf.__new__() missing 1 required
102
122
  # positional argument (which appears, for a namedturle)
103
123
  rv[a.name] = cf(*items)
104
- elif isinstance(v, dict):
124
+ elif issubclass(value_type, dict):
105
125
  df = dict_factory
106
126
  rv[a.name] = df(
107
127
  (
@@ -142,7 +162,12 @@ def _asdict_anything(
142
162
  """
143
163
  ``asdict`` only works on attrs instances, this works on anything.
144
164
  """
145
- if getattr(val.__class__, "__attrs_attrs__", None) is not None:
165
+ val_type = type(val)
166
+ if val_type in _ATOMIC_TYPES:
167
+ rv = val
168
+ if value_serializer is not None:
169
+ rv = value_serializer(None, None, rv)
170
+ elif getattr(val_type, "__attrs_attrs__", None) is not None:
146
171
  # Attrs class.
147
172
  rv = asdict(
148
173
  val,
@@ -152,7 +177,7 @@ def _asdict_anything(
152
177
  retain_collection_types=retain_collection_types,
153
178
  value_serializer=value_serializer,
154
179
  )
155
- elif isinstance(val, (tuple, list, set, frozenset)):
180
+ elif issubclass(val_type, (tuple, list, set, frozenset)):
156
181
  if retain_collection_types is True:
157
182
  cf = val.__class__
158
183
  elif is_key:
@@ -173,7 +198,7 @@ def _asdict_anything(
173
198
  for i in val
174
199
  ]
175
200
  )
176
- elif isinstance(val, dict):
201
+ elif issubclass(val_type, dict):
177
202
  df = dict_factory
178
203
  rv = df(
179
204
  (
@@ -253,8 +278,11 @@ def astuple(
253
278
  v = getattr(inst, a.name)
254
279
  if filter is not None and not filter(a, v):
255
280
  continue
281
+ value_type = type(v)
256
282
  if recurse is True:
257
- if has(v.__class__):
283
+ if value_type in _ATOMIC_TYPES:
284
+ rv.append(v)
285
+ elif has(value_type):
258
286
  rv.append(
259
287
  astuple(
260
288
  v,
@@ -264,7 +292,7 @@ def astuple(
264
292
  retain_collection_types=retain,
265
293
  )
266
294
  )
267
- elif isinstance(v, (tuple, list, set, frozenset)):
295
+ elif issubclass(value_type, (tuple, list, set, frozenset)):
268
296
  cf = v.__class__ if retain is True else list
269
297
  items = [
270
298
  (
@@ -288,8 +316,8 @@ def astuple(
288
316
  # Workaround for TypeError: cf.__new__() missing 1 required
289
317
  # positional argument (which appears, for a namedturle)
290
318
  rv.append(cf(*items))
291
- elif isinstance(v, dict):
292
- df = v.__class__ if retain is True else dict
319
+ elif issubclass(value_type, dict):
320
+ df = value_type if retain is True else dict
293
321
  rv.append(
294
322
  df(
295
323
  (
@@ -450,10 +478,11 @@ def resolve_types(
450
478
  if getattr(cls, "__attrs_types_resolved__", None) != cls:
451
479
  import typing
452
480
 
453
- kwargs = {"globalns": globalns, "localns": localns}
454
-
455
- if PY_3_9_PLUS:
456
- kwargs["include_extras"] = include_extras
481
+ kwargs = {
482
+ "globalns": globalns,
483
+ "localns": localns,
484
+ "include_extras": include_extras,
485
+ }
457
486
 
458
487
  hints = typing.get_type_hints(cls, **kwargs)
459
488
  for field in fields(cls) if attribs is None else attribs: