<div dir="ltr">The RC for 3.5.2 is going out coming weekend (see <a href="https://www.python.org/dev/peps/pep-0478/">PEP 478</a>). We should get this out now, or make it the first incompatibility in 3.6 (that's also an option; 3.6 feature freeze starts September, see <a href="https://www.python.org/dev/peps/pep-0494/">PEP 494</a>).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 1:05 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"><span class=""><br>
<br>
On 2016-06-06 4:02 PM, Łukasz Langa wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The proposed patch fixes the __aiter__ in a backwards compatible way:<br>
<br>
1. ceval/GET_AITER opcode calls the __aiter__ method.<br>
<br>
2. If the returned object has an '__anext__' method, GET_AITER silently wraps it in an awaitable, which is equivalent to the following coroutine:<br>
<br>
   async def wrapper(aiter_result):<br>
       return aiter_result<br>
<br>
3. If the returned object does not have an '__anext__' method, a DeprecationWarning is raised.<br>
</blockquote>
<br></span>
There’s a problem with this approach. It will force people to write deprecated code because you never know if your library is going to run on 3.5.0 or 3.5.1. Barry, Ubuntu wily, xenial and yakkety currently package 3.5.0 or 3.5.1. When 3.5.2 is going to get released, are they going to get it? I’m pretty sure wily *isn’t* and yakkety *is* but just wanted to confirm; especially with xenial being an LTS release.<br>
<br>
</blockquote>
<br>
Yes, I agree. OTOH, I don't see any other way of resolving this.<br>
<br>
Another option would be to start raising the DeprecationWarning only in 3.6.<span class="HOEnZb"><font color="#888888"><br>
<br>
Yury</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<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/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</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>