<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/modio.c, branch 0.8.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.8.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.8.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-10-07T02:31:59+00:00</updated>
<entry>
<title>py: Add mp_raise_OSError(errno) helper function.</title>
<updated>2016-10-07T02:31:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-07T02:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3a0a7717304cc34a4d6ef55f767666c918c185b5'/>
<id>urn:sha1:3a0a7717304cc34a4d6ef55f767666c918c185b5</id>
<content type='text'>
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
</content>
</entry>
<entry>
<title>all: Remove 'name' member from mp_obj_module_t struct.</title>
<updated>2016-09-21T14:23:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-21T00:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f'/>
<id>urn:sha1:93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f</id>
<content type='text'>
One can instead lookup __name__ in the modules dict to get the value.
</content>
</entry>
<entry>
<title>all: Rename mp_obj_type_t::stream_p to protocol.</title>
<updated>2016-06-18T15:44:57+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-06-18T15:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=07209f8592f15435d6abbccaad5347cea2c7722e'/>
<id>urn:sha1:07209f8592f15435d6abbccaad5347cea2c7722e</id>
<content type='text'>
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
</content>
</entry>
<entry>
<title>py/stream: Support both "exact size" and "one underlying call" operations.</title>
<updated>2016-05-17T23:41:45+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-05-17T23:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f7c84b10a5f3b2f783955b01f55e0f913ac459f'/>
<id>urn:sha1:7f7c84b10a5f3b2f783955b01f55e0f913ac459f</id>
<content type='text'>
Both read and write operations support variants where either a) a single
call is made to the undelying stream implementation and returned buffer
length may be less than requested, or b) calls are repeated until requested
amount of data is collected, shorter amount is returned only in case of
EOF or error.

These operations are available from the level of C support functions to be
used by other C modules to implementations of Python methods to be used in
user-facing objects.

The rationale of these changes is to allow to write concise and robust
code to work with *blocking* streams of types prone to short reads, like
serial interfaces and sockets. Particular object types may select "exact"
vs "once" types of methods depending on their needs. E.g., for sockets,
revc() and send() methods continue to be "once", while read() and write()
thus converted to "exactly" versions.

These changes don't affect non-blocking handling, e.g. trying "exact"
method on the non-blocking socket will return as much data as available
without blocking. No data available is continued to be signaled as None
return value to read() and write().

From the point of view of CPython compatibility, this model is a cross
between its io.RawIOBase and io.BufferedIOBase abstract classes. For
blocking streams, it works as io.BufferedIOBase model (guaranteeing
lack of short reads/writes), while for non-blocking - as io.RawIOBase,
returning None in case of lack of data (instead of raising expensive
exception, as required by io.BufferedIOBase). Such a cross-behavior
should be optimal for MicroPython needs.
</content>
</entry>
<entry>
<title>py/modio: Rename module name to "uio" for consistency with other modules.</title>
<updated>2016-05-02T10:56:33+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-05-02T10:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ddb9dba2f73e6bc62326fe1aad88cdf633358d82'/>
<id>urn:sha1:ddb9dba2f73e6bc62326fe1aad88cdf633358d82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/modio: io.BufferedWriter: Describe flushing policy.</title>
<updated>2016-03-25T12:59:30+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-03-25T12:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2c81b9be28dccf973b7c3a7d791ba79ebad6b206'/>
<id>urn:sha1:2c81b9be28dccf973b7c3a7d791ba79ebad6b206</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/modio: Implement io.BufferedWriter.flush().</title>
<updated>2016-03-25T12:33:38+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-03-25T12:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=063e6e7d0aa6fa6ad9f9c65cac4eb49e4a5a6548'/>
<id>urn:sha1:063e6e7d0aa6fa6ad9f9c65cac4eb49e4a5a6548</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/modio: Initial implementation of io.BufferedWriter class.</title>
<updated>2016-03-24T23:10:49+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-03-24T23:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5d93dfbc2cca21806970d3a6a26b488191703f0b'/>
<id>urn:sha1:5d93dfbc2cca21806970d3a6a26b488191703f0b</id>
<content type='text'>
Just .write() method implemented currently.
</content>
</entry>
<entry>
<title>py: Add MP_ROM_* macros and mp_rom_* types and use them.</title>
<updated>2015-11-29T14:25:04+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T13:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cbf7674025814797f5c537d6d1c195efe58ccaaf'/>
<id>urn:sha1:cbf7674025814797f5c537d6d1c195efe58ccaaf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Use TextIOWrapper only if PY_IO_FILEIO def'd; cast size_t for print.</title>
<updated>2015-02-15T13:17:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-15T13:17:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e5039c6ff887dfbee84e7853defda2b18722e24c'/>
<id>urn:sha1:e5039c6ff887dfbee84e7853defda2b18722e24c</id>
<content type='text'>
</content>
</entry>
</feed>
