<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/stream.c, branch 5.0.0-beta.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-09-12T02:15:10+00:00</updated>
<entry>
<title>In py/, must guard uses of RUN_BACKGROUND_TASKS</title>
<updated>2019-09-12T02:15:10+00:00</updated>
<author>
<name>jepler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-09-12T02:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=70daf007ae84240c1c512ef8e41f2e5540b6eb2e'/>
<id>urn:sha1:70daf007ae84240c1c512ef8e41f2e5540b6eb2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stream_readall: This can be long-running, run background tasks</title>
<updated>2019-09-10T01:14:02+00:00</updated>
<author>
<name>jepler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-09-10T01:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=932ac0960b01029701e6e53bb5eb9adafb182d41'/>
<id>urn:sha1:932ac0960b01029701e6e53bb5eb9adafb182d41</id>
<content type='text'>
While finding sources of clicks and buzzes in nrf i2sout, I identified
this site as one which could be long running.  Reproducer code was to
play a 22.05kHz sample and repeatedly print `os.listdir('')`
</content>
</entry>
<entry>
<title>Support print("", flush=True)</title>
<updated>2019-02-16T00:53:19+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-02-16T00:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e6b140e7a0cf07fa365269e7801bb111565cb478'/>
<id>urn:sha1:e6b140e7a0cf07fa365269e7801bb111565cb478</id>
<content type='text'>
Fixes #1127
</content>
</entry>
<entry>
<title>CharacteristicBuffer: make it be a stream class; add locking</title>
<updated>2019-01-20T00:45:35+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-01-20T00:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=28cfd8a5135a1e420b56d693cef20fc1a4721081'/>
<id>urn:sha1:28cfd8a5135a1e420b56d693cef20fc1a4721081</id>
<content type='text'>
</content>
</entry>
<entry>
<title>UART changes: timeout in secs, write bytes, etc.</title>
<updated>2018-12-03T17:04:32+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-12-03T16:00:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=80db2cec99ca5c995a0302b1d6d00ad77cfcd736'/>
<id>urn:sha1:80db2cec99ca5c995a0302b1d6d00ad77cfcd736</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Two fixes and translate more strings.</title>
<updated>2018-08-09T20:29:30+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2018-08-09T01:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96ebf5bc3fb455162286b9bc31e763f3c4f1c457'/>
<id>urn:sha1:96ebf5bc3fb455162286b9bc31e763f3c4f1c457</id>
<content type='text'>
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
</content>
</entry>
<entry>
<title>py/stream: Remove stray empty line at start of file.</title>
<updated>2018-06-20T06:26:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-20T06:26:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34344a413fb1939d476f43429a8a4e142f6fe3c0'/>
<id>urn:sha1:34344a413fb1939d476f43429a8a4e142f6fe3c0</id>
<content type='text'>
This was accidentally added in 6abede2ca9e221b6aefcaccbda0c89e367507df1
</content>
</entry>
<entry>
<title>py/stream: Update comment for mp_stream_write_adaptor.</title>
<updated>2018-06-20T05:56:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-20T05:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2c8d130f702d07041e30d808b974b0ba2a1e51e0'/>
<id>urn:sha1:2c8d130f702d07041e30d808b974b0ba2a1e51e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/stream: Introduce and use efficient mp_get_stream to access stream_p.</title>
<updated>2018-06-18T02:35:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-13T01:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6abede2ca9e221b6aefcaccbda0c89e367507df1'/>
<id>urn:sha1:6abede2ca9e221b6aefcaccbda0c89e367507df1</id>
<content type='text'>
The existing mp_get_stream_raise() helper does explicit checks that the
input object is a real pointer object, has a non-NULL stream protocol, and
has the desired stream C method (read/write/ioctl).  In most cases it is
not necessary to do these checks because it is guaranteed that the input
object has the stream protocol and desired C methods.  For example, native
objects that use the stream wrappers (eg mp_stream_readinto_obj) in their
locals dict always have the stream protocol (or else they shouldn't have
these wrappers in their locals dict).

This patch introduces an efficient mp_get_stream() which doesn't do any
checks and just extracts the stream protocol struct.  This should be used
in all cases where the argument object is known to be a stream.  The
existing mp_get_stream_raise() should be used primarily to verify that an
object does have the correct stream protocol methods.

All uses of mp_get_stream_raise() in py/stream.c have been converted to use
mp_get_stream() because the argument is guaranteed to be a proper stream
object.

This patch improves efficiency of stream operations and reduces code size.
</content>
</entry>
<entry>
<title>py/stream: Use uPy errno instead of system's for non-blocking check.</title>
<updated>2018-05-01T05:54:50+00:00</updated>
<author>
<name>Ayke van Laethem</name>
<email>aykevanlaethem@gmail.com</email>
</author>
<published>2018-04-24T15:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d43c7377564b3e1be36f627a465df2c5779a1ae8'/>
<id>urn:sha1:d43c7377564b3e1be36f627a465df2c5779a1ae8</id>
<content type='text'>
This is a more consistent use of errno codes.  For example, it may be that
a stream returns MP_EAGAIN but the mp_is_nonblocking_error() macro doesn't
catch this value because it checks for EAGAIN instead (which may have a
different value than MP_EAGAIN when MICROPY_USE_INTERNAL_ERRNO is enabled).
</content>
</entry>
</feed>
