Message245691
| Author |
abukaj |
| Recipients |
abukaj |
| Date |
2015年06月23日.14:12:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1435068729.87.0.403412824944.issue24490@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The error occurs when there was a warning before the call to filterwarnings():
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.warn('aa', DeprecationWarning)
>>> warnings.filterwarnings('always')
>>> warnings.warn('aa', DeprecationWarning)
>>>
When filterwarnings() is called before warnings, everything is working as expected:
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.filterwarnings('always')
>>> warnings.warn('aa', DeprecationWarning)
__main__:1: DeprecationWarning: aa
>>> warnings.warn('aa', DeprecationWarning)
__main__:1: DeprecationWarning: aa
>>> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年06月23日 14:12:09 | abukaj | set | recipients:
+ abukaj |
| 2015年06月23日 14:12:09 | abukaj | set | messageid: <1435068729.87.0.403412824944.issue24490@psf.upfronthosting.co.za> |
| 2015年06月23日 14:12:09 | abukaj | link | issue24490 messages |
| 2015年06月23日 14:12:09 | abukaj | create |
|