<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/shared-bindings, branch 5.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=5.0.0-beta.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-12-10T20:03:06+00:00</updated>
<entry>
<title>audiocore: Add MP3File using Adafruit_MP3 library</title>
<updated>2019-12-10T20:03:06+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-11-26T15:29:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a08d9e6d8e0059c8aa59feadd7b94d95d691e273'/>
<id>urn:sha1:a08d9e6d8e0059c8aa59feadd7b94d95d691e273</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge pull request #2353 from jepler/audiosample-protocol</title>
<updated>2019-12-09T22:50:16+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2019-12-09T22:50:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=19ac8aea8ca7656ecfdac597448feab493803669'/>
<id>urn:sha1:19ac8aea8ca7656ecfdac597448feab493803669</id>
<content type='text'>
Convert audiosamples to use micropython "protocols" (safely)</content>
</entry>
<entry>
<title>Merge pull request #2301 from tannewt/support_extended_advertising</title>
<updated>2019-12-07T04:51:05+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@adafruit.com</email>
</author>
<published>2019-12-07T04:51:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f5e913101ce868ff5338586aa56c36af91a87ad2'/>
<id>urn:sha1:f5e913101ce868ff5338586aa56c36af91a87ad2</id>
<content type='text'>
Add support for extended (&gt;31 byte) BLE advertisements.</content>
</entry>
<entry>
<title>Check connection validity after service discovery.</title>
<updated>2019-12-07T00:03:14+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-12-05T23:02:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=da0ea979ff651e6358e99b6369a22b9184e2f7e6'/>
<id>urn:sha1:da0ea979ff651e6358e99b6369a22b9184e2f7e6</id>
<content type='text'>
Fixes #2347
</content>
</entry>
<entry>
<title>Merge pull request #2356 from tannewt/central_pairing</title>
<updated>2019-12-06T20:19:40+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@adafruit.com</email>
</author>
<published>2019-12-06T20:19:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=559ce6a949ae10eda869684f8155a0127bc588e2'/>
<id>urn:sha1:559ce6a949ae10eda869684f8155a0127bc588e2</id>
<content type='text'>
Add connection interval and debugging</content>
</entry>
<entry>
<title>Make _bleio.Connection.disconnect() idempotent</title>
<updated>2019-12-05T13:40:53+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-12-05T13:35:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e30dde0afc71bbd0e01bfa9454589ef2b553d75a'/>
<id>urn:sha1:e30dde0afc71bbd0e01bfa9454589ef2b553d75a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add connection interval and debugging</title>
<updated>2019-12-04T22:39:02+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-11-23T00:33:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=17c8356b8c06ac160bf9fad6b6b4b8b1095d8dcd'/>
<id>urn:sha1:17c8356b8c06ac160bf9fad6b6b4b8b1095d8dcd</id>
<content type='text'>
This also sets TinyUSB to master and to not include its submodules.

It also fixes an old displayio example comment and retries gattc
reads.
</content>
</entry>
<entry>
<title>audiosample: convert to use a protocol</title>
<updated>2019-12-04T15:31:52+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-12-04T15:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=feb8eb935bd69ce855533bf9a4316e3025602c1a'/>
<id>urn:sha1:feb8eb935bd69ce855533bf9a4316e3025602c1a</id>
<content type='text'>
This eases addition of new sample sources, since the manual virtual
function dispatch functions are just calls via a protocol
</content>
</entry>
<entry>
<title>protocols: Allow them to be (optionally) type-safe</title>
<updated>2019-12-04T15:29:57+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-12-03T20:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=238e12123690debaf2cf8488fb2a4d4003a06506'/>
<id>urn:sha1:238e12123690debaf2cf8488fb2a4d4003a06506</id>
<content type='text'>
Protocols are nice, but there is no way for C code to verify whether
a type's "protocol" structure actually implements some particular
protocol.  As a result, you can pass an object that implements the
"vfs" protocol to one that expects the "stream" protocol, and the
opposite of awesomeness ensues.

This patch adds an OPTIONAL (but enabled by default) protocol identifier
as the first member of any protocol structure.  This identifier is
simply a unique QSTR chosen by the protocol designer and used by each
protocol implementer.  When checking for protocol support, instead of
just checking whether the object's type has a non-NULL protocol field,
use `mp_proto_get` which implements the protocol check when possible.

The existing protocols are now named:
    protocol_framebuf
    protocol_i2c
    protocol_pin
    protocol_stream
    protocol_spi
    protocol_vfs
(most of these are unused in CP and are just inherited from MP; vfs and
stream are definitely used though)

I did not find any crashing examples, but here's one to give a flavor of what
is improved, using `micropython_coverage`.  Before the change,
the vfs "ioctl" protocol is invoked, and the result is not intelligible
as json (but it could have resulted in a hard fault, potentially):

    &gt;&gt;&gt; import uos, ujson
    &gt;&gt;&gt; u = uos.VfsPosix('/tmp')
    &gt;&gt;&gt; ujson.load(u)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    ValueError: syntax error in JSON

After the change, the vfs object is correctly detected as not supporting
the stream protocol:
    &gt;&gt;&gt; ujson.load(p)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    OSError: stream operation not supported
</content>
</entry>
<entry>
<title>'seconds'</title>
<updated>2019-11-27T19:49:39+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-11-27T19:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d089f16656f4b6de1f524c691d2135dd0fcbc37d'/>
<id>urn:sha1:d089f16656f4b6de1f524c691d2135dd0fcbc37d</id>
<content type='text'>
</content>
</entry>
</feed>
