arrow: Broken Python 2.x support in new release 0.11.0
Hello,
New release (0.11.0) is broken for Python 2.x users, below you can find steps to reproduce:
~/.virtualenvs/tmp-455f8c1518baad7 via tmp-455f8c1518baad7
➔ python --version
Python 2.7.14
~/.virtualenvs/tmp-455f8c1518baad7 via tmp-455f8c1518baad7
➔ pip install arrow
Collecting arrow
Collecting python-dateutil (from arrow)
Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->arrow)
Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, arrow
Successfully installed arrow-0.11.0 python-dateutil-2.6.1 six-1.11.0
~/.virtualenvs/tmp-455f8c1518baad7 via tmp-455f8c1518baad7
➔ python
Python 2.7.14 (default, Sep 25 2017, 09:53:22)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ng/.virtualenvs/tmp-455f8c1518baad7/lib/python2.7/site-packages/arrow/__init__.py", line 3, in <module>
from .arrow import Arrow
File "/Users/ng/.virtualenvs/tmp-455f8c1518baad7/lib/python2.7/site-packages/arrow/arrow.py", line 19, in <module>
from arrow import util, locales, parser, formatter
File "/Users/ng/.virtualenvs/tmp-455f8c1518baad7/lib/python2.7/site-packages/arrow/parser.py", line 12, in <module>
from backports.functools_lru_cache import lru_cache # pragma: no cover
ImportError: No module named backports.functools_lru_cache
>>>
Could you fix this please?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 44 (10 by maintainers)
Commits related to this issue
- Update setup.py to support <2.7 As suggested in #495 adds support for Python 2.6 and lower — committed to wilmardo/arrow by wilmardo 6 years ago
I am running into this issue when installing audreyr/cookiecutter (due to cookiecutter > jinja2-time > arrow).
The issue seems to be that pip looks for
backports.functools_lru_cache>=1.2.1
and not the pinnedbackports.functools_lru_cache==1.2.1
. If I remove the 1.5 version and install the 1.2.1 it works fine.What does needs fixing here and where does it needs to be fixed?
pip install
pip install -v
test import
pip install --user backports.functools_lru_cache==1.2.1
test import with 1.2.1
I am also seeing this issue on 0.12.1
I uninstalled 0.12.1, installed 0.12.0 and it worked fine.
Thanks for letting us know!
I think it is worth compiling a list of solutions to try if this issue occurs again for someone in the future:
pip install --upgrade pip
2.7.16
@systemcatch Good catch! 👍
Opened the PR to hotfix this for now, also reopened the issue over at
jaraco/backports.functools_lru_cache
Thank you!