After upgrading from django 1.3 to django 1.5 I started to see these DeprecationWarnings
during the test run:
path_to_virtualenv/lib/python2.6/site-packages/django/http/request.py:193: DeprecationWarning: HttpRequest.raw_post_data has been deprecated. Use HttpRequest.body instead.
I've searched inside the project for raw_post_data
and found nothing. So it was not directly used in the project. Then, I've manually went through INSTALLED_APPS
and found that raven
module still uses raw_post_data
and it was the cause, but..
Is it possible to see the cause of DeprecationWarning
during the test run? How to make these warnings more verbose?
raw_post_data
property even though it shouldn't. – Eyewitnessself.client.get(url, params)
. I'm pretty sure it's not relevant, because I do make such requests in many test methods, but only this one causes the warning to appear. So I guess this is because something is imported inlibs
that causes the warning. Thank you, anyway. – Groningenlibs
that is related to Django or requests / views ? In Django 1.5 theraw_post_data
property is not accessed but something could be analysing the request by iterating over all properties. Perhapsmock
? Or something inlibs
? – Eyewitnesslibs
, but nothing related to requests/views, except that there isfrom django.conf import settings
. And..here it is: raven is the cause - figured it out manually. Thank you, but I still want to know if I could have seen the cause during the test run somehow. I'll update the question. – Groningenraw_post_data
property is accessed but when theDeprecationWarning
is raised you won't know who accessed it. So there's no flag that can be enabled to make it more verbose. – Eyewitnesswarnings
module) make django treat warnings as errors, then I should get the traceback during this warning and throw it to the stdout. Thank you for help anyway! – Groningen