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

SyntaxError: future feature annotations is not defined in import kats #53

Closed
orenpapers opened this issue Jun 22, 2021 · 3 comments
Closed

Comments

@orenpapers
Copy link

Hi,
I am using MAC and python3.6.
Installed Kats using pip and when trying:
import kats

I get the error:

Traceback (most recent call last):
  File "/venv/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-f96c9197f95c>", line 1, in <module>
    import kats
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "venv/lib/python3.6/site-packages/kats/__init__.py", line 1, in <module>
    from . import consts   # noqa
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "venv/lib/python3.6/site-packages/kats/consts.py", line 20
    from __future__ import annotations
                                     ^
SyntaxError: future feature annotations is not defined

Any idea?

@michaelbrundage
Copy link
Contributor

Hi, it looks like this was added to Python 3.7 but not backported to 3.6: https://www.python.org/dev/peps/pep-0563/#enabling-the-future-behavior-in-python-3-7

So, either we should change the compatibility of Kats to clearly indicate 3.7+, or modify the code to use the string value of the type name (which I'm told has performance implications).

In the meantime, upgrading to Python 3.7 or 3.8 should unblock you.

@orenpapers
Copy link
Author

@michaelbrundage Do you expect it to be python3.6 compatible?
Python3.7 will have some implication on other parts of the project so I want to know if it's better to wait

@michaelbrundage
Copy link
Contributor

@orko19 we discussed with the team, and there are some other compatibility issues with 3.6. So, we will drop 3.6 support. So, 3.7 and 3.8, and we'll investigate 3.9 support ASAP.

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

No branches or pull requests

2 participants