<div dir="ltr">Do you see any average Python users on this thread? We are trying to pick the PEP apart from the POV of having to use the complicated parts of the API in a framework. Victor's questions are reasonable.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 2, 2018 at 10:13 PM, Yury Selivanov <span dir="ltr"><<a href="mailto:yselivanov.ml@gmail.com" target="_blank">yselivanov.ml@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">I don't want to expose a SetContext operation because of, again, potential incompatibility with PEP 550, where generators expect to fully control push/pop context operation.</div><div dir="auto"><br></div><div dir="auto">Second, Context.run is 100% enough for *any* async framework to add support for PEP 567. And because the PEP is focused just on async, I think that we don't need anything more than 'run'.</div><div dir="auto"><br></div><div dir="auto">Third, I have a suspicion that we focus too much on actual Context and Context.run. These APIs are meant for asyncio/twisted/trio/etc maintainers, not for an average Python user. An average person will likely not interact with any of the PEP 567 machinery directly, wven when using PEP 567-enabled libraries like numpy/decimal.</div><div dir="auto"><br></div><div dir="auto">Yury</div><br><div class="gmail_quote"><div><div class="h5"><div>On Wed, Jan 3, 2018 at 2:56 AM Victor Stinner <<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="auto">PEP:<div dir="auto"></div></div><div dir="auto"><div dir="auto">"int PyContext_Enter(PyContext *) and int PyContext_Exit(PyContext *) allow to set and restore the context for the current OS thread."<div dir="auto"><br></div></div></div><div dir="auto"><div dir="auto"><div dir="auto">What is the difference between Enter and Exit? Why not having a single Py_SetContext() function?</div><div dir="auto"><br></div><div dir="auto">Victor</div></div></div></div></div><span class="">
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br></span>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/yselivanov.ml%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>yselivanov.ml%40gmail.com</a><br>
</blockquote></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>