Closed
Description
Since #10040 (9.2.5 and after) this happens with the i2ctarget example:
code starting...
9.789: INFO - read request to address '0x40'
Traceback (most recent call last):
File "code.py", line 38, in <module>
AttributeError: 'I2CTargetRequest' object has no attribute 'deinit'
This is apparently because the new default __exit__
requires the presence of deinit
in the object's dictionary, and I2CTargetRequest
doesn't have one. It has a close()
though, (which incidentally doesn't have a docstring).
Should I2CTargetRequest
have a deinit()
that calls common_hal_i2ctarget_i2c_target_close()
and also maybe remove the close()
method ?
circuitpython/shared-bindings/i2ctarget/I2CTarget.c
Lines 395 to 405 in d88fe10