To make sure I'm not crazy, I wrote a simple Python program that looks
like this:
print "************** WARNING **********************"
import warnings
warnings.warn(
"Testing the warnings module!",
PendingDeprecationWarning
)
And here are some sample runs:
$ python warning.py
************** WARNING **********************
$ python -Wall warning.py
************** WARNING **********************
warning.py:5: PendingDeprecationWarning: Testing the warnings module!
PendingDeprecationWarning
Now when I put that code in some view function in my Django app, I
always see the print statement output, but never the actual warning
message. I've tried starting the dev. server various ways, but none of
them seem to work:
$python -Wall manage.py runserver
$python -Wd manage.py runserver
I only seem to have this trouble with PendingDeprecationWarning.
UserWarning, for example, works as expected.
What am I doing wrong? I am using Python 2.5.2 and Django SVN r12623.
Thanks.
Hi,
Just to confirm I tried it and can't see them either, on python 2.6.
Don't know enough about them to shed any light on the subject, but it
isn't just you!
Peter
Any ideas? Can anyone else try this and report back? Just insert the
code below into a view function and start the dev. server with "python
-Wall manage.py runserver". Thanks.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Regards,
BN
Thanks Karen. Yes, I'm using Ubuntu, and running with --noreload
allows me to see the PendingDeprecationWarning. Is this worthy of a
bug report?