Skip to content
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

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

Closed
NateJose123 opened this issue Apr 27, 2022 · 3 comments · Fixed by #41
Closed
Assignees

Comments

@NateJose123
Copy link

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
Copy link
Contributor

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
Copy link
Member

@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
Copy link
Member

ladyada commented Jun 5, 2022

@tekktrik yah go ahead and update the requirements/deps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants