[Python-modules-commits] r30285 - in packages/configobj/trunk/debian/patches (2 files)
bdrung at users.alioth.debian.org
bdrung at users.alioth.debian.org
Wed Aug 27 15:17:02 UTC 2014
Date: Wednesday, August 27, 2014 @ 15:17:02
Author: bdrung
Revision: 30285
Fix deprecation warning test case.
Added:
packages/configobj/trunk/debian/patches/fix-deprecation.patch
Modified:
packages/configobj/trunk/debian/patches/series
Added: packages/configobj/trunk/debian/patches/fix-deprecation.patch
===================================================================
--- packages/configobj/trunk/debian/patches/fix-deprecation.patch (rev 0)
+++ packages/configobj/trunk/debian/patches/fix-deprecation.patch 2014-08-27 15:17:02 UTC (rev 30285)
@@ -0,0 +1,37 @@
+Description: Fix deprecation warning test case.
+ The stacklevel parameter of the warnings.warn function is only required
+ when wrapper functions are used (to hide the wrapper functions).
+ .
+ The test case needs to be modified to print deprecation warnings (instead
+ of just ignoring them).
+Author: Benjamin Drung <benjamin.drung at profitbricks.com>
+
+--- a/configobj.py
++++ b/configobj.py
+@@ -1205,7 +1205,7 @@
+ import warnings
+ warnings.warn('Passing in an options dictionary to ConfigObj() is '
+ 'deprecated. Use **options instead.',
+- DeprecationWarning, stacklevel=2)
++ DeprecationWarning)
+
+ # TODO: check the values too.
+ for entry in options:
+--- a/tests/test_configobj.py
++++ b/tests/test_configobj.py
+@@ -2,6 +2,7 @@
+ from __future__ import unicode_literals
+ import os
+ import re
++import warnings
+
+ from codecs import BOM_UTF8
+ from warnings import catch_warnings
+@@ -107,6 +108,7 @@
+
+
+ def test_options_deprecation():
++ warnings.simplefilter('always', DeprecationWarning)
+ with catch_warnings(record=True) as log:
+ ConfigObj(options={})
+
Modified: packages/configobj/trunk/debian/patches/series
===================================================================
--- packages/configobj/trunk/debian/patches/series 2014-08-27 15:12:52 UTC (rev 30284)
+++ packages/configobj/trunk/debian/patches/series 2014-08-27 15:17:02 UTC (rev 30285)
@@ -1,2 +1,3 @@
eggify.diff
#triplequotes.diff
+fix-deprecation.patch
More information about the Python-modules-commits
mailing list