diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-19 09:45:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 09:45:31 (GMT) |
commit | 37bb2895561d3e63a631f10875567b4e33b30c07 (patch) | |
tree | 25afc8f4882caeaef5f14e09499a5e949f218b0c /Doc/whatsnew | |
parent | 01ece63d42b830df106948db0aefa6c1ba24416a (diff) | |
download | cpython-37bb2895561d3e63a631f10875567b4e33b30c07.zip cpython-37bb2895561d3e63a631f10875567b4e33b30c07.tar.gz cpython-37bb2895561d3e63a631f10875567b4e33b30c07.tar.bz2 |
bpo-40943: PY_SSIZE_T_CLEAN required for '#' formats (GH-20784)
The PY_SSIZE_T_CLEAN macro must now be defined to use
PyArg_ParseTuple() and Py_BuildValue() "#" formats: "es#", "et#",
"s#", "u#", "y#", "z#", "U#" and "Z#". See the PEP 353.
Update _testcapi.test_buildvalue_issue38913().
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.10.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 566827b..9c1dca1 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -155,6 +155,13 @@ New Features Porting to Python 3.10 ---------------------- +* The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use + :c:func:`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use + ``#``: ``es#``, ``et#``, ``s#``, ``u#``, ``y#``, ``z#``, ``U#`` and ``Z#``. + See :ref:`Parsing arguments and building values + <arg-parsing>` and the :pep:`353`. + (Contributed by Victor Stinner in :issue:`40943`.) + * Since :c:func:`Py_TYPE()` is changed to the inline static function, ``Py_TYPE(obj) = new_type`` must be replaced with ``Py_SET_TYPE(obj, new_type)``: see :c:func:`Py_SET_TYPE()` (available since Python 3.9). For backward |