]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135862: add C contiguous one-dimensional buffer requirement to `asyncio.StreamWrit...
authorKumar Aditya <kumaraditya@python.org>
Mon, 18 Aug 2025 13:06:43 +0000 (18:36 +0530)
committerGitHub <noreply@github.com>
Mon, 18 Aug 2025 13:06:43 +0000 (18:36 +0530)
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