From efb9078cae161549fa3ee21ad8a1097784131fb9 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Mon, 18 Aug 2025 18:36:43 +0530 Subject: [PATCH] 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 --- Doc/library/asyncio-stream.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 90c90862ca1ed3..e1568ae330b70f 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -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 `. + .. method:: writelines(data) The method writes a list (or any iterable) of bytes to the underlying socket