The inline doc for read and write operations in {busio,bitbangio}.{I2C,SPI} says that the end values may be None, in which case they default to len(buf). However, the default value is really INT_MAX. If you give None explicitly, you'll get an error.
Related to adafruit/Adafruit_CircuitPython_BusDevice#45.
Either None should be handled or the doc should be changed.