<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/micropython, branch 3.0.0-beta.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-beta.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-beta.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-11T07:54:34+00:00</updated>
<entry>
<title>py/emitnative: Implement floor-division and modulo for viper emitter.</title>
<updated>2017-10-11T07:54:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-11T07:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a3afa8cfc46913f471d5eb55da4ae22dee92c25f'/>
<id>urn:sha1:a3afa8cfc46913f471d5eb55da4ae22dee92c25f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objexcept: Prevent infinite recursion when allocating exceptions.</title>
<updated>2017-09-21T05:24:57+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-09-21T05:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96fd80db1306ed67ee967b888c1c03c136bff4fb'/>
<id>urn:sha1:96fd80db1306ed67ee967b888c1c03c136bff4fb</id>
<content type='text'>
The aim of this patch is to rewrite the functions that create exception
instances (mp_obj_exception_make_new and mp_obj_new_exception_msg_varg) so
that they do not call any functions that may raise an exception.  Otherwise
it's possible to create infinite recursion with an exception being raised
while trying to create an exception object.

The two main things that are done to accomplish this are:
1. Change mp_obj_new_exception_msg_varg to just format the string, then
   call mp_obj_exception_make_new to actually create the exception object.
2. In mp_obj_exception_make_new and mp_obj_new_exception_msg_varg try to
   allocate all memory first using functions that don't raise exceptions
   If any of the memory allocations fail (return NULL) then degrade
   gracefully by trying other options for memory allocation, eg using the
   emergency exception buffer.
3. Use a custom printer backend to conservatively format strings: if it
   can't allocate memory then it just truncates the string.

As part of this rewrite, raising an exception without a message, like
KeyError(123), will now use the emergency buffer to store the arg and
traceback data if there is no heap memory available.

Memory use with this patch is unchanged.  Code size is increased by:

   bare-arm:  +136
minimal x86:  +124
   unix x64:   +72
unix nanbox:   +96
      stm32:   +88
    esp8266:   +92
     cc3200:   +80
</content>
</entry>
<entry>
<title>tests: Convert remaining "sys.exit()" to "raise SystemExit".</title>
<updated>2017-06-10T17:34:38+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-06-10T17:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=85d809d1f4e35a511e0a56b3411126e05a31c01b'/>
<id>urn:sha1:85d809d1f4e35a511e0a56b3411126e05a31c01b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objstringio: If created from immutable object, follow copy on write policy.</title>
<updated>2017-06-09T14:33:01+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-06-05T20:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=07241cd37a732e4219257e6b2fc67a84085b37f6'/>
<id>urn:sha1:07241cd37a732e4219257e6b2fc67a84085b37f6</id>
<content type='text'>
Don't create copy of immutable object's contents until .write() is called
on BytesIO.
</content>
</entry>
<entry>
<title>tests/micropython: Add test for int.from_bytes with many zero bytes.</title>
<updated>2017-05-06T00:29:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-05-05T11:44:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dce7dd425977320b822f8bb529d123eafebe6e55'/>
<id>urn:sha1:dce7dd425977320b822f8bb529d123eafebe6e55</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Add tests for calling super and loading a method directly.</title>
<updated>2017-04-22T13:39:38+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-18T23:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=30badd1ce1fabd26e54fc445f07846306aa19cef'/>
<id>urn:sha1:30badd1ce1fabd26e54fc445f07846306aa19cef</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/micropython: Add test for micropython.kbd_intr().</title>
<updated>2017-04-18T07:24:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-18T06:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c7c14f163458046767b539c567a421076ea9a6b7'/>
<id>urn:sha1:c7c14f163458046767b539c567a421076ea9a6b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/micropython/heapalloc_iter: Improve skippability.</title>
<updated>2017-04-02T21:27:01+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-04-02T21:27:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=806c07c8989e44e1be4832fd37688e2b5828b3af'/>
<id>urn:sha1:806c07c8989e44e1be4832fd37688e2b5828b3af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/heapalloc_str: Test no-replacement case for str.replace().</title>
<updated>2017-03-22T19:17:52+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-03-22T19:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4a4bb84e9216a130050a13e20a19fbf476ed6e6c'/>
<id>urn:sha1:4a4bb84e9216a130050a13e20a19fbf476ed6e6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/micropython: Add tests for micropython.schedule().</title>
<updated>2017-03-20T04:20:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-16T07:05:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c772817deea6f3e5fe63483db77a98b65974d833'/>
<id>urn:sha1:c772817deea6f3e5fe63483db77a98b65974d833</id>
<content type='text'>
</content>
</entry>
</feed>
