[Python-checkins] Document changes for PyCode_New regarding PEP570 (GH-13706)
Pablo Galindo
webhook-mailer at python.org
Fri May 31 14:34:02 EDT 2019
https://github.com/python/cpython/commit/545a3b8814dbf2a5391e830d69e796fb1a1d62ec
commit: 545a3b8814dbf2a5391e830d69e796fb1a1d62ec
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-05-31T19:33:41+01:00
summary:
Document changes for PyCode_New regarding PEP570 (GH-13706)
files:
M Doc/c-api/code.rst
M Doc/whatsnew/3.8.rst
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst
index e2b0b23335e3..7aa91ee84d2e 100644
--- a/Doc/c-api/code.rst
+++ b/Doc/c-api/code.rst
@@ -40,6 +40,9 @@ bound into a function.
:c:func:`PyCode_New` directly can bind you to a precise Python
version since the definition of the bytecode changes often.
+ .. versionchanged:: 3.8
+ An extra parameter is required (*posonlyargcount*) to support :PEP:`570`.
+
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 98f0c3474f26..76d00938dbec 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -1278,6 +1278,9 @@ Changes in the C API
(Contributed by Antoine Pitrou in :issue:`32388`.)
+* The :c:func:`PyCode_New` has a new parameter in the second position (*posonlyargcount*)
+ to support :pep:`570`, indicating the number of positional-only arguments.
+
CPython bytecode changes
------------------------
More information about the Python-checkins
mailing list