Closed swbsf closed 6 years ago
requirements.txt
says Django 1.5.12 https://github.com/learningequality/ka-lite/blob/master/requirements.txt#L9
I don't know how it can install Django 2....
True, but :
(env)idb-bsf-vagrant-269 ~ # pip show ka-lite
(env)idb-bsf-vagrant-269 ~ # pip show django
(env)idb-bsf-vagrant-269 ~ # pip install ka-lite==0.16.9
(...)
Downloading/unpacking Django>=1.5 (from django-js-reverse==0.5.0->ka-lite==0.16.9)
Downloading Django-2.0.tar.gz (8.0MB): 8.0MB downloaded
(...)
AttributeError: 'module' object has no attribute 'lru_cache'
So dependency is requiring Django 2.0. I'm not sure it is a good idea to downgrade Django afterward.
Not even, dependency is only requiring Django>=1.5. Therefore pip is installing latest version. So we basically need >= 1.5 and < 2.0. That's what this task is doing, nothing is updated if version already installed is good. But I got your point, this issue seems to be on ka-lite side. In the meantime this fix would be a dirty trick avoiding installation failure on all new devices. Let put it plainly, as for today, we can not install new devices with Ka-lite on.
Hi! I'm a KA Lite dev.
It is true that there is a Django dependency in KA Lite, actually it got pinned to avoid the confusion of downloading another version than what is bundled and make it predictable so it could be deleted afterwards. Yes, we never managed to unbundle an ancient version of Django because customizations to its codebase made it complicated.
In 0.16.x, the bundled Django is located here:
https://github.com/learningequality/ka-lite/tree/0.16.x/python-packages/django
We moved it in 0.17.x and introduced a script that deletes the auto-downloaded version when populating dependencies in ka-lite-static
:
https://github.com/learningequality/ka-lite/tree/0.17.x/kalite/packages/bundled/django
Downloaded dependency django 1.5.12 gets deleted when building ka-lite-static
here:
Summary: Use ka-lite-static
, it doesn't have dependencies because it bundles everything.
Background: ka-lite
with dynamic dependencies was planned at a time when we wanted to have a maintained version of KA Lite compatible with the latest versions of Django, so to make KA Lite integrate better with other projects.. etc. This still hasn't happened because the source code modifications in the bundled Django blocks us from replacing it with a vanilla Django.
Fixes #154 .
While avoiding force-upgrade of django on already installed devices.