* gregor herrmann <gre...@debian.org>, 2012-08-14, 22:19:
+ocfs2-tools (1.6.4-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+
+ [ Sébastien Villemot ]
+ * Remove popen2-ignore-depreciation-warn.patch: DeprecationWarnings are now
+ ignored by default in Python 2.7, and this patch messes things up
+ (Closes: #682517, LP: #923754)
Hmm. This changelog entry mislead me for a moment into thinking that
this bug is specific to Python 2.7. In fact, I could reproduce it with
python 2.6.6-12 and ocfs2console 1.6.3-2 (thanks to snapshot.d.o for
making time travels possible!).
The popen2-ignore-depreciation-warn patch is bogus and could have never
worked. What upstream code does is (simplifying a bit):
warnings.filterwarnings("error")
import gtk
warnings.filters.pop(0)
That is, it adds a warnings filter, imports gtk, then pops the filter,
thus leaving filters in the original state.
popen2-ignore-depreciation-warn turns this this nice plan into:
warnings.filterwarnings("error")
warnings.simplefilter("ignore", DeprecationWarning)
import gtk
warnings.filters.pop(0)
That is, it adds two warning filters, imports gtk, the pops the top-most
filter. Not only it doesn't disable any deprecation warnings (except
maybe in pygtk), but also turns _all_ further warnings into errors.
Ooops!
Other than the changelog entry, your debdiff looks fine. It's completely
safe to drop the patch, because upstream has already taken care of
disabling DeprecationWarnings; if you look at the shebang, you'll see:
#!/usr/bin/python -W ignore::DeprecationWarning
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org