Skip to content

future feature annotations is not defined #516

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

Closed
klieret opened this issue Oct 7, 2021 · 1 comment · Fixed by #517
Closed

future feature annotations is not defined #516

klieret opened this issue Oct 7, 2021 · 1 comment · Fixed by #517

Comments

@klieret
Copy link

klieret commented Oct 7, 2021

The setup.cfg states that tikzplotlib works with python 3.6. However _save.py uses

from __future__ import annotations

which is only available from python 3.7 onward.

Hence:

In [3]: import tikzplotlib

Traceback (most recent call last):

  File "/cvmfs/belle.cern.ch/ubuntu1804/externals/v01-06-01/Linux_x86_64/common/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2910, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-3-f7494fee2594>", line 1, in <module>
    import tikzplotlib

  File "/cvmfs/belle.cern.ch/ubuntu1804/externals/v01-06-01/Linux_x86_64/opt/root/lib/ROOT.py", line 303, in _importhook
    return _orig_ihook( name, *args, **kwds )

  File "/filer/z-sv-pool12c/k/Kilian.Lieret/.python-envs/tagcal/lib/python3.6/site-packages/tikzplotlib/__init__.py", line 5, in <module>
    from ._save import Flavors, get_tikz_code, save

  File "/cvmfs/belle.cern.ch/ubuntu1804/externals/v01-06-01/Linux_x86_64/opt/root/lib/ROOT.py", line 303, in _importhook
    return _orig_ihook( name, *args, **kwds )

  File "/filer/z-sv-pool12c/k/Kilian.Lieret/.python-envs/tagcal/lib/python3.6/site-packages/tikzplotlib/_save.py", line 1
    from __future__ import annotations
                                      ^
SyntaxError: future feature annotations is not defined

@nschloe nschloe mentioned this issue Oct 7, 2021
@klieret
Copy link
Author

klieret commented Oct 7, 2021

This was introduced in f1c0c09

So a quick fix for everyone on py 3.6 is to downgrade to < 0.9.13

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.

1 participant