-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Django as a dependency. Fix #96 #132
Conversation
also add a big warning statement about possible side effects and to deter people from reporting issues about Django version mismatches. Updates README formatting a bit as well.
Pull Request Test Coverage Report for Build 293
💛 - Coveralls |
3 similar comments
Pull Request Test Coverage Report for Build 293
💛 - Coveralls |
Pull Request Test Coverage Report for Build 293
💛 - Coveralls |
Pull Request Test Coverage Report for Build 293
💛 - Coveralls |
I don't really like this change. Not sure if pylint-django is to blame, or prospector, but it seems at least the pylint-django developers are aweae that pylint-django is auto installed with prospector... The readme changes warns me not to open issues about this, but my project doesn't involve django at all, so am I still required to fix my testing setup and install a django, even when nothing in my project needs it? |
This sounds like a poor separation of concerns, @JensTimmerman. Really prospector should soften the pylint-django requirement if it is not always needed. Have you brought this up with the prospector devs? |
It's not a poor separation of concerns until recently - the point of prospector was to be a super easy "run one command" static analysis tool so it made sense to include pylint-django because automatically tuning checks for whatever framework you were using was the initial focus. I realise now that the propagation of requirements was another reason I didn't want to include django as a requirement of pyling-django. By removing pylint-django as a default install for prospector, it undermines the whole point which was "install, point it at code, get results with as little effort as possible". I still maintain that not including Django as a dependency of pylint-django is a good idea, people who don't set up their test environment properly need to deal with that and including as many warnings and clues as possible in pylint-django is the best idea - hence the DjangoNotInstalledChecker. Make it easy to diagnose but don't try to second guess every environment it will be installed into because that's too many permutations. |
(Also I should point out that the "prospector devs" is me and just me, and until recently that was true of pylint-django too, so... I am the main one to blame for faults in both 🤕 ) |
@carlio as a pylint-django developer and user I'm not really interested in prospector and I'm more in favor with @jakirkham that prospector needs to relax the pylint-django dependency. OTOH I recognize there's a valid use-case for prospector to pull in pylint-django automatically but not pull Django because, well you should already have Django. IMO both the fact that prospector has a dependency on pylint-django and the fact that I and maybe others were not aware of this lead to the conflict. @JensTimmerman brings up a valid use-case too, I don't argue about it. Can we all agree to revert the Django dependency from pylint-django and improve README where the fat warning will say that Django must be installed manually ? I can also add a GitHub issues template to warn users not to report bugs against that. |
How about an optional dependency on Django?
plus the above suggestion for README ? |
Sorry the argument doesn't seem very persuasive to me. One cannot even import My recommendation would be that |
I think there's a bug in the existing code base and the django_installed checker does not work. IMO this is the source of @jakirkham's arguments and probably some confusion too. Here's the output on a brand new virtualenv without Django (pylint-django 0.9.1):
|
also add a big warning statement about possible side effects and to deter people from reporting issues about Django version mismatches. Updates README formatting a bit as well.
@jakirkham this should fix #96.
@carlio I've read your reasoning about not listing this as a dependency and the side effects it may have. Let's see if the warning text I've added has any effect. If we start seeing consistent reports about Django version mismatches I'm all for dropping the Django dependency from
setup.py
and adjusting the warning so that folks are aware they have to install Django explicitly.