<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/basics/gen_yield_from.py, 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>2018-02-27T04:39:31+00:00</updated>
<entry>
<title>py/vm: Fix case of handling raised StopIteration within yield from.</title>
<updated>2018-02-27T04:39:31+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-27T04:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=22ade2f5c4ac88c90a013cbf4b81c8d795487f33'/>
<id>urn:sha1:22ade2f5c4ac88c90a013cbf4b81c8d795487f33</id>
<content type='text'>
This patch concerns the handling of an NLR-raised StopIteration, raised
during a call to mp_resume() which is handling the yield from opcode.

Previously, commit 6738c1dded8e436686f85008ec0a4fc47406ab7a introduced code
to handle this case, along with a test.  It seems that it was lucky that
the test worked because the code did not correctly handle the stack pointer
(sp).

Furthermore, commit 79d996a57b351e0ef354eb1e2f644b194433cc73 improved the
way mp_resume() propagated certain exceptions: it changed raising an NLR
value to returning MP_VM_RETURN_EXCEPTION.  This change meant that the
test introduced in gen_yield_from_ducktype.py was no longer hitting the
code introduced in 6738c1dded8e436686f85008ec0a4fc47406ab7a.

The patch here does two things:

1. Fixes the handling of sp in the VM for the case that yield from is
   interrupted by a StopIteration raised via NLR.

2. Introduces a new test to check this handling of sp and re-covers the
   code in the VM.
</content>
</entry>
<entry>
<title>tests: Rename test scripts, changing - to _ for consistency.</title>
<updated>2014-07-05T05:14:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-07-05T05:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=539681fffd96082ca3b5d18643d4f08f65c47170'/>
<id>urn:sha1:539681fffd96082ca3b5d18643d4f08f65c47170</id>
<content type='text'>
From now on, all new tests must use underscore.

Addresses issue #727.
</content>
</entry>
</feed>
