nephila / djangocms-installer

Console wizard to bootstrap django CMS projects
https://djangocms-installer.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
177 stars 78 forks source link

Silently downgrades django #311

Closed matthijskooijman closed 5 years ago

matthijskooijman commented 6 years ago

With the default options, the installer tries to install the lts version of django, currently 1.8. It does this by using a less-than version requirement. However, is django is already installed, this causes pip to downgrade django, causing all sorts of breakage for existing projects.

I would say that, if django is already installed and no django version is explicitely specified, using the installed version is probably what the user wants. At least it should ask before silently downgrading packages? I'm not exactly sure how to achieve this, though.

yakky commented 6 years ago

As djangocms-installer goal is to bootstrap new projects (in presumely new virtualenvs), the version managment logic is already quite complex (as it takes into account version dependencies between Django, django CMS and django CMS dependencies) and the django version can be provided (both in the command line version as well as in the wizard) I'd like to minimize the extra logic added here Maybe trying to import django and doing a version check. Feel free to contribute a solution and I'll happily review it

yakky commented 5 years ago

@matthijskooijman I think that #339 fixed the issue We can't prevent downgrades, but we can detect them and alert of any unexpected django version which has been installed

yakky commented 5 years ago

closing this as fixed by #339