<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/basics/async_for2.py.exp, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-07-25T05:55:37+00:00</updated>
<entry>
<title>py/compile: Don't await __aiter__ special method in async-for.</title>
<updated>2020-07-25T05:55:37+00:00</updated>
<author>
<name>Jonathan Hogg</name>
<email>me@jonathanhogg.com</email>
</author>
<published>2020-07-21T17:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=901f3dce6e5e7c1501550ca0b7f3283848194a2e'/>
<id>urn:sha1:901f3dce6e5e7c1501550ca0b7f3283848194a2e</id>
<content type='text'>
MicroPython's original implementation of __aiter__ was correct for an
earlier (provisional) version of PEP492 (CPython 3.5), where __aiter__ was
an async-def function.  But that changed in the final version of PEP492 (in
CPython 3.5.2) where the function was changed to a normal one.  See
https://www.python.org/dev/peps/pep-0492/#why-aiter-does-not-return-an-awaitable
See also the note at the end of this subsection in the docs:
https://docs.python.org/3.5/reference/datamodel.html#asynchronous-iterators
And for completeness the BPO: https://bugs.python.org/issue27243

To be consistent with the Python spec as it stands today (and now that
PEP492 is final) this commit changes MicroPython's behaviour to match
CPython:  __aiter__ should return an async-iterable object, but is not
itself awaitable.

The relevant tests are updated to match.

See #6267.
</content>
</entry>
<entry>
<title>tests: Add .exp files for async tests, so they can run with Python 3.4.</title>
<updated>2016-04-13T14:56:15+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-13T14:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f7e24754564673c7a8246cd067b68b6e5de1e29'/>
<id>urn:sha1:7f7e24754564673c7a8246cd067b68b6e5de1e29</id>
<content type='text'>
</content>
</entry>
</feed>
