adafruit / Adafruit_CircuitPython_ServoKit

CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT kits.
MIT License
69 stars 29 forks source link

Added type annotations on latest update is not backwards compatible with python3.6> #38

Closed NateJose123 closed 2 years ago

NateJose123 commented 2 years ago

Got this error:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/py_compile.py", line 129, in compile raise py_exc py_compile.PyCompileError: File "./prog.py", line 1 from future import annotations ^ SyntaxError: future feature annotations is not defined

Fixed it by upgrading python but would be great to have an update that is backwards compatible with python 3.6 and below if possible. Thanks!

dhalbert commented 2 years ago

Unfortunately, from __future__ import ... has to be the very first statement in a Python script, and so it cannot be guarded with try-except or anything like that. So we have upped the requirements to Python 3.7 for most things. Python 3.6 is end-of-life, as of four months ago.

tekktrik commented 2 years ago

@dhalbert Is this specific to this library? Happy to add Blinka>=7.0.0 as a dependency if so, and add a major up-rev if that would help.

ladyada commented 2 years ago

@tekktrik yah go ahead and update the requirements/deps