-
Notifications
You must be signed in to change notification settings - Fork 35
Fix CircuitPython compatibility #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
On CircuitPython, bytearray objects have no split method. Emulate the specific form that we need. Testing performed: tests still pass, _and_ it works on a device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with:
t = bytearray("abc;def")
_buffer_split0(t, ';')
Output: bytearray(b'abc')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully with get request. No longer get
AttributeError: 'bytearray' object has no attribute 'split'
Thanks for the testing! |
Just ran across this same issue while upgrading my pyportal to CP6.0 and Adafruit_CircuitPython_Requests-1.8.0.zip |
thankx!! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.9.4 from 2.9.3: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#98 from kmatch98/blank_text Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.0.2 from 1.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#8 from ladyada/main > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#7 from makermelissa/main > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#6 from ladyada/main > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#3 from makermelissa/main Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.8.1 from 1.8.0: > Merge pull request adafruit/Adafruit_CircuitPython_Requests#53 from jepler/circuitpython-compat
I think there are still some
|
@anecdata I am seeing this as well. It seems like it works the first call and then not on subsequent calls. But my testing was limited to |
@askpatrickw I was GETting from my own server, but like yours it seems to happen on the first call in code.py. I didn't explore it too deeply... it's very intermittent and I wasn't catching it, so I reset. |
Closes #52
On CircuitPython, bytearray objects have no split method. Emulate the specific form that we need.
Testing performed: tests still pass, and it works on a device.