summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2023-05-04 15:23:40 (GMT)
committerGitHub <noreply@github.com>2023-05-04 15:23:40 (GMT)
commitb7a0a521960a6e9ea46b79b51cbcc3c4ffcc7057 (patch)
treeb77c5170d60ab85bf3cba18b6dbdf09b38c77425 /Doc/whatsnew
parent04f673327530f47f002e784459037231de478412 (diff)
downloadcpython-b7a0a521960a6e9ea46b79b51cbcc3c4ffcc7057.zip
cpython-b7a0a521960a6e9ea46b79b51cbcc3c4ffcc7057.tar.gz
cpython-b7a0a521960a6e9ea46b79b51cbcc3c4ffcc7057.tar.bz2
gh-102500: Document PEP 688 (#102571)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.12.rst14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index edbf921..3fe3310a 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -149,6 +149,19 @@ New Features
In Python 3.14, the default will switch to ``'data'``.
(Contributed by Petr Viktorin in :pep:`706`.)
+PEP 688: Making the buffer protocol accessible in Python
+--------------------------------------------------------
+
+:pep:`688` introduces a way to use the :ref:`buffer protocol <bufferobjects>`
+from Python code. Classes that implement the :meth:`~object.__buffer__` method
+are now usable as buffer types.
+
+The new :class:`collections.abc.Buffer` ABC provides a standard
+way to represent buffer objects, for example in type annotations.
+The new :class:`inspect.BufferFlags` enum represents the flags that
+can be used to customize buffer creation.
+(Contributed by Jelle Zijlstra in :gh:`102500`.)
+
New Features Related to Type Hints
==================================
@@ -179,7 +192,6 @@ See :pep:`692` for more details.
(PEP written by Franek Magiera)
-
Other Language Changes
======================