'module' object has no attribute 'lru_cache'

1,649 views
Skip to first unread message

Etienne Robillard

unread,
Dec 27, 2017, 5:07:34 AM12/27/17
to django...@googlegroups.com
Hi,

I'm trying to upgrade my development server to Django 2.0 using setup.py
develop command:

erob@marina:~/ncvs/django$ sudo python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 32, in <module>
    version = __import__('django').get_version()
  File "/home/erob/ncvs/django/django/__init__.py", line 1, in <module>
    from django.utils.version import get_version
  File "/home/erob/ncvs/django/django/utils/version.py", line 61, in
<module>
    @functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'

Why does the setup.py script attempt to import the django package?

Is it possible to upgrade Django from source when release 1.11.6 is
already installed in /usr/local ?

Thank you in advance,

Etienne

Etienne Robillard

unread,
Dec 27, 2017, 5:19:35 AM12/27/17
to django...@googlegroups.com
OK, I've read the INSTALL file and noticed that Django dropped support
for Python 2.7.

Any reasons for dropping support for Python 2.7 in the first place ?

Regards,

Etienne
--
Etienne Robillard
tka...@yandex.com
https://www.isotopesoftware.ca/

Julio Biason

unread,
Dec 27, 2017, 5:25:51 AM12/27/17
to django...@googlegroups.com
Hi Etienne,

Python 2.x will not receive any updates (security or otherwise) starting in 2020. Many projects are dropping python 2 support right now to allow people to have enough time to port their codebases to python 3.


From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Etienne Robillard <tka...@yandex.com>
Sent: Wednesday, December 27, 2017 8:18:35 AM
To: django...@googlegroups.com
Subject: Re: 'module' object has no attribute 'lru_cache'
 
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2a503d84-2c58-ecca-a8a0-aeef800f0487%40yandex.com.
For more options, visit https://groups.google.com/d/optout.

James Bennett

unread,
Dec 27, 2017, 5:29:31 AM12/27/17
to django...@googlegroups.com
On Wed, Dec 27, 2017 at 2:18 AM, Etienne Robillard <tka...@yandex.com> wrote:
OK, I've read the INSTALL file and noticed that Django dropped support for Python 2.7.

Any reasons for dropping support for Python 2.7 in the first place ?

Python 2.7 reaches its end-of-life (in terms of official bug/security support from the Python core team) in 2020. That is also when Django 1.11's end-of-life (in terms of official bug/security support from the Django team) ends.

After that, only Python 3 will be supported by the Python core team. So only Python 3 will be supported by Django.

Django 2.0 drops support for Python 2 to ensure no Django release can "outlive" official support for Python 2. If you want to continue using Python 2 with Django, you must continue using Django 1.11.

Also, it's been almost ten years since Python 3.0 was released, and you have nearly two more years. Twelve years ought to be enough to make the switch :)
Reply all
Reply to author
Forward
0 new messages