Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import adafruit_mprls
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/temp/venv/lib/python3.7/site-packages/adafruit_mprls.py", line 37, in <module>
from adafruit_bus_device.i2c_device import I2CDevice
File "/home/pi/temp/venv/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 13, in <module>
from circuitpython_typing import ReadableBuffer, WriteableBuffer
File "/home/pi/temp/venv/lib/python3.7/site-packages/circuitpython_typing/__init__.py", line 45
def read(self, count: Optional[int] = None, /) -> Optional[bytes]:
^
SyntaxError: invalid syntax
>>>
>>> from typing import Protocol
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Protocol' from 'typing' (/usr/lib/python3.7/typing.py)
>>>
typing.Protocol
and the/
syntax for function arguments both require python 3.8. https://www.python.org/dev/peps/pep-0570/ https://www.python.org/dev/peps/pep-0544/