<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objarray.c, 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>2021-03-15T13:57:36+00:00</updated>
<entry>
<title>run code formatting script</title>
<updated>2021-03-15T13:57:36+00:00</updated>
<author>
<name>microDev</name>
<email>70126934+microDev1@users.noreply.github.com</email>
</author>
<published>2021-03-15T13:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a52eb88031620a81521b937f2a0651dbac2bb350'/>
<id>urn:sha1:a52eb88031620a81521b937f2a0651dbac2bb350</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add ifdef-guard</title>
<updated>2021-02-20T23:41:08+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-02-20T23:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a04369e0f58623079bc6f1f33f847e5c08b2d587'/>
<id>urn:sha1:a04369e0f58623079bc6f1f33f847e5c08b2d587</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: memoryview: implement memoryview.cast if CPYTHON_COMPAT</title>
<updated>2021-02-20T16:35:36+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2021-02-20T16:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=646eb9a7db654ebbbb8c1f85ba362a24db0dc77e'/>
<id>urn:sha1:646eb9a7db654ebbbb8c1f85ba362a24db0dc77e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>modstruct: Improve compliance with python3</title>
<updated>2020-09-12T19:07:23+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-09-12T18:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=54d97251fe2dd4939652a186bf703885e654b4d1'/>
<id>urn:sha1:54d97251fe2dd4939652a186bf703885e654b4d1</id>
<content type='text'>
While checking whether we can enable -Wimplicit-fallthrough, I encountered
a diagnostic in mp_binary_set_val_array_from_int which led to discovering
the following bug:
```
&gt;&gt;&gt; struct.pack("xb", 3)
b'\x03\x03'
```
That is, the next value (3) was used as the value of a padding byte, while
standard Python always fills "x" bytes with zeros.  I initially thought
this had to do with the unintentional fallthrough, but it doesn't.
Instead, this code would relate to an array.array with a typecode of
padding ('x'), which is ALSO not desktop Python compliant:
```
&gt;&gt;&gt; array.array('x', (1, 2, 3))
array('x', [1, 0, 0])
```
Possibly this is dead code that used to be shared between struct-setting
and array-setting, but it no longer is.

I also discovered that the argument list length for struct.pack
and struct.pack_into were not checked, and that the length of binary data
passed to array.array was not checked to be a multiple of the element
size.

I have corrected all of these to conform more closely to standard Python
and revised some tests where necessary.  Some tests for micropython-specific
behavior that does not conform to standard Python and is not present
in CircuitPython was deleted outright.
</content>
</entry>
<entry>
<title>Turn off find when CPYTHON_COMPAT is off</title>
<updated>2020-07-21T22:40:51+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-21T22:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6db10f9c7deba015dc89090f0957ebbd742cfa8e'/>
<id>urn:sha1:6db10f9c7deba015dc89090f0957ebbd742cfa8e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Only add .find without CPYTHON_COMPAT</title>
<updated>2020-07-21T20:08:42+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-21T20:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=900edb2b8e118ff36b708afe65363e5929f00ad8'/>
<id>urn:sha1:900edb2b8e118ff36b708afe65363e5929f00ad8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add cast for mpy-cross warning</title>
<updated>2020-07-18T00:55:06+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-18T00:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f38a9c8d2991a94df9d629ae33ec25fa32b61af9'/>
<id>urn:sha1:f38a9c8d2991a94df9d629ae33ec25fa32b61af9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add find varients to bytearray</title>
<updated>2020-07-18T00:07:37+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-16T00:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b157aa6b8d925cbf29ceeb96da3a455f3a77f3b'/>
<id>urn:sha1:4b157aa6b8d925cbf29ceeb96da3a455f3a77f3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add license to some obvious files.</title>
<updated>2020-07-06T18:16:25+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-06-03T22:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34b4993d63a6b576f29d624385c681f679b4124c'/>
<id>urn:sha1:34b4993d63a6b576f29d624385c681f679b4124c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make decode only apply to bytearray and not array as well</title>
<updated>2020-05-15T21:32:44+00:00</updated>
<author>
<name>Thea Flowers</name>
<email>me@thea.codes</email>
</author>
<published>2020-05-15T21:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0876034adb8487f45c88224cb1ce29743848244e'/>
<id>urn:sha1:0876034adb8487f45c88224cb1ce29743848244e</id>
<content type='text'>
</content>
</entry>
</feed>
