<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_quote"><div dir="ltr">On Thu, Jun 21, 2018 at 2:57 PM Jeroen Demeyer <<a href="mailto:J.Demeyer@ugent.be" target="_blank">J.Demeyer@ugent.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2018-06-20 17:42, INADA Naoki wrote:<br>
> I don't have any idea about changing METH_FASTCALL more.<br>
> If Victor and Serhiy think so, and PyPy maintainers like it too, I want<br>
> to make it public<br>
> as soon as possible.<br>
<br>
There are two different things here:<br>
<br>
The first is documenting METH_FASTCALL such that everybody can create <br>
built-in functions using the METH_FASTCALL signature. I think that the <br>
API for METH_FASTCALL (without or with METH_KEYWORDS) is fine, so I <br>
support making it public. This is really just a documentation issue, so <br>
I see no reason why it couldn't be added to 3.7.0 if we're fast.<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">As ​Serhiy noted, argument parsing API (_PyArg_ParseStack) is not public too.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So METH_FASTCALL is incomplete for pure C extension authors even if it's documented.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So I don't have strong opinion for documenting it on 3.7.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Consensus about not changing it (without METH_KEYWORDS) on 3.8 seems enough</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">to me (and Cython).</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Then, _PyArg_ParseStack API should be considered first for make it public on Python 3.8.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">(bikeshedding: The name *Stack* feels not good.  It implies Python VM stack.  But this</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">API can be used not only with VM stack.)</font></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The API for calling functions using the FASTCALL convention is more of a <br>
mess though. There are functions taking keyword arguments as dict and <br>
functions taking them as tuple. As I mentioned in PEP 580, I'd like to <br>
merge these and simply allow either a dict or a tuple. Since this would <br>
require an API change, this won't be for 3.7.0.<br>
<br></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I like proposed API too.  But I think we should focus on METH_FASTCALL without</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">METH_KEYWORDS first.  Making _PyObject_FastCall() public is significant step for 3.8.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:sans-serif">-- </span><br></div></div><div dir="ltr" class="gmail-m_2753227363760715539gmail_signature">INADA Naoki  <<a href="mailto:songofacandy@gmail.com" target="_blank">songofacandy@gmail.com</a>></div></div>