v2.0.5 seems to be broken for Python 2.7
CasperWA opened this issue · 2 comments
CasperWA commented
System
- Monty version: 2.0.5
- Python version: 2.7.14
- OS version: linux (on Travis)
Summary
- Importing
loadfn
frommonty.serialization
seems to fail for Python 2.7
Example code
from monty.serialization import loadfn
Error message
Snippet from failing Travis builds.
File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pymatgen/core/composition.py", line 18, in <module>
from monty.serialization import loadfn
File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/monty/serialization.py", line 47
def loadfn(fn, *args, fmt=None, **kwargs):
^
SyntaxError: invalid syntax
Suggested solution (if known)
- As a note, it worked for v2.0.4.
Comments
Since the error comes from a sub-dependency (monty>=0.9.6
) of one of our dependencies (pymatgen<=2018.12.12
), it is difficult for me to pinpoint the error more, sorry.
shyuep commented
I can fix this, but honestly, py2.7 is going to be killed on Jan 1 2020. We are no longer going to support py27 afterwards.
shyuep commented
This has been fixed.