]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-135862: add C contiguous one-dimensional buffer requirement to `asyncio...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Aug 2025 13:13:19 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Aug 2025 13:13:19 +0000 (13:13 +0000)
gh-135862: add C contiguous one-dimensional buffer requirement to `asyncio.StreamWriter` docs (GH-137910)
(cherry picked from commit 1c3950abc1d403bddce5212c08d6c40e78486e9d)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Doc/library/asyncio-stream.rst

index 90c90862ca1ed3abe58dc0a21cf3011c402c33f7..e1568ae330b70fa78b39bd0e53404b350fa07344 100644 (file)
@@ -321,6 +321,9 @@ StreamWriter
          stream.write(data)
          await stream.drain()
 
+      .. note::
+         The *data* buffer should be a C contiguous one-dimensional :term:`bytes-like object <bytes-like object>`.
+
    .. method:: writelines(data)
 
       The method writes a list (or any iterable) of bytes to the underlying socket