I am getting a deprecation warning while running tests for an app that I have installed/used in a django site. The deprecated feature is django/utils but the actual file that was using the deprecated feature is not given. Is there a way to get django to tell me which file is giving the deprecation warning or do I have to manually go through every single file in the app to find the reference? I am still new to testing in Django so I appreciate the help very much.
Asked
Active
Viewed 804 times
1
-
what is the full text of the warning? – MattDMo Dec 16 '13 at 03:53
-
/usr/local/lib/python2.7/dist-packages/django/utils/hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead DeprecationWarning) – johnmic07 Dec 16 '13 at 04:00
-
It looks like I might have asked a duplicate: http://stackoverflow.com/questions/12266765/django-track-down-causes-of-deprecationwarning?rq=1 – johnmic07 Dec 16 '13 at 04:16
1 Answers
1
Run python using error warnings to give you full traceback:
python -Werror ./manage.py runserver # or whatever command gave the error
and you should be able to track down where it's coming from.
The dupe you mentioned will also work.

MattDMo
- 100,794
- 21
- 241
- 231
-
my output for that is: `DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead ` – johnmic07 Dec 16 '13 at 04:23
-
I ended up using `grep hashcompat *` to track down the source of the error manually – johnmic07 Dec 22 '13 at 00:59