From: Michael D. <md...@st...> - 2011-09-23 21:47:54
|
I haven't seen any of these warnings: DeprecationWarnings and PendingDeprecationWarnings are supposed to be turned of by default in a vanilla Python build. However, I'm familiar with the PyCObject/PyCapsule issue from working on the matplotlib-py3 branch. The py3 branch has changes to the local copy of PyCXX to use PyCapsule instead of CObject, since 3.2 has removed CObject altogether [1]. However, these changes were made to the Python 3 side of PyCXX only -- Python 2.6 and earlier need to continue to support PyCObject, and Python 2.7 still has PyCObject, so it didn't seem worth the effort. I missed that Python 2.7 has a PendingDeprecationWarning on for these things. I guess we should probably make the analogous changes to the Python 2 side (inside of #ifdef's so Python 2.6 and earlier continue to use PyCObject). It should be pretty straightforward to do, but I won't have a chance until Monday. [1] https://github.com/matplotlib/matplotlib-py3/commit/86a34cab1a005f9bb0d9c2a1b57b3e41fa32064a#comments <https://github.com/matplotlib/matplotlib-py3/commit/86a34cab1a005f9bb0d9c2a1b57b3e41fa32064a#comments> I submitted these changes upstream to Barry Scott, but it doesn't look like they've made it into the PyCXX SVN repository yet. Mike On 09/23/2011 04:49 PM, John Hunter wrote: > On Fri, Sep 23, 2011 at 3:42 PM, John Hunter<jd...@gm...> wrote: >> On Fri, Sep 23, 2011 at 8:02 AM, John Hunter<jd...@gm...> wrote: >>> Today is the "go-live" date for the mpl release candidate. There are >>> no more open issues tagged release_critical, so I suggest we branch >>> this afternoon. This will give people a last chance to merge in >>> remaining pull requests. If you know you are planning to handle a >>> given pull request before the branch, please drop a comment on the >>> pull request or respond here so we don't duplicate effort. Michael, >>> are you available to make the release branch this afternoon? >> >> I'm seeing lots of warnings like the ones below when running the tests >> on a linux platform (opensuse, python2.7 64bit). Should we attempt to >> silence these, or is there some cross python version call we could be >> using instead? >> >> >> /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/textpath.py:246: >> PendingDeprecationWarning: The CObject type is marked Pending >> Deprecation in Python 2.7. Please use capsule objects instead. >> font.clear() >> /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/textpath.py:247: >> PendingDeprecationWarning: The CObject type is marked Pending >> Deprecation in Python 2.7. Please use capsule objects instead. >> font.set_size(self.FONT_SCALE, self.DPI) >> > > Turns out is it more than just PDF: > > > johnh@:tmp> time python -c 'import matplotlib as m; m.test()' > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:90: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.draw_quad_mesh = self._renderer.draw_quad_mesh > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:91: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:92: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.draw_gouraud_triangles = self._renderer.draw_gouraud_triangles > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:93: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.draw_image = self._renderer.draw_image > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:94: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.copy_from_bbox = self._renderer.copy_from_bbox > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:95: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.tostring_rgba_minimized = self._renderer.tostring_rgba_minimized > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:120: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self._renderer.draw_path(gc, path, transform, rgbFace) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:228: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.clear() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:230: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_size(size, self.dpi) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:184: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_text(s, 0.0, flags=flags) # the width and height of unrotated string > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:185: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > w, h = font.get_width_height() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:186: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > d = font.get_descent() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:81: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > return self._renderer.draw_markers(*kl, **kw) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:152: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_text(s, 0, flags=flags) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:153: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.draw_glyphs_to_bitmap() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:157: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, > angle, gc) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:451: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > _png.write_png(renderer._renderer.buffer_rgba(0, 0), > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1843: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.clear() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1844: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_size(prop.get_size_in_points(), 72) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1805: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_text(s, 0.0, flags=LOAD_NO_HINTING) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1806: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > w, h = font.get_width_height() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1810: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > d = font.get_descent() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1669: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_text(s, 0.0, flags=LOAD_NO_HINTING) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1670: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > descent = font.get_descent() / 64.0 > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:957: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > sfnt = font.get_sfnt() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:965: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > pclt = font.get_sfnt_table('pclt') \ > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:967: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > post = font.get_sfnt_table('post') \ > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:764: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > width = font.load_char(unicode, > flags=LOAD_NO_SCALE|LOAD_NO_HINTING).horiAdvance > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:773: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > cmap = font.get_charmap() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:781: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > glyph_name = font.get_glyph_name(gind) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1718: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > cmap = font.get_charmap() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1764: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > glyph = font.load_char(ccode, flags=LOAD_NO_HINTING) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1752: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > glyph_name = font.get_glyph_name(gind) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:84: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > return self._renderer.draw_path_collection(*kl, **kw) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1766: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > kern = font.get_kerning( > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:214: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.flipud_in() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:579: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.set_bg( *bg) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:582: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.reset_matrix() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:583: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > numrows, numcols = im.get_size() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:586: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.set_interpolation(self._interpd[self._interpolation]) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:588: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.set_resample(self._resample) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:600: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.apply_translation(tx, ty) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:609: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.apply_scaling(rx*sx, ry*sy) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:610: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.resize(int(widthDisplay+0.5), int(heightDisplay+0.5), > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1394: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > h, w = im.get_size_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1155: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > img.flipud_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1134: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > h,w,s = im.as_rgba_str() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py:1188: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > img.flipud_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py:737: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > h,w = im.get_size_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py:744: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.flipud_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py:745: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > rows, cols, buffer = im.as_rgba_str() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py:747: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.flipud_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:570: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.charmap = font.get_charmap() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:731: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > symbol_name = cached_font.font.get_glyph_name( > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:621: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_size(fontsize, dpi) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:622: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > glyph = font.load_char( > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:211: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > info.font.draw_glyph_to_bitmap( > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:655: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > cached_font.font.set_size(fontsize, dpi) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:656: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > pclt = cached_font.font.get_sfnt_table('pclt') > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py:133: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self._renderer.draw_text_image(font_image, x, y + 1, angle, gc) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/textpath.py:246: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.clear() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/textpath.py:247: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > font.set_size(self.FONT_SCALE, self.DPI) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/textpath.py:248: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > glyph = font.load_char(ccode, flags=LOAD_NO_HINTING) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:676: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > return font.get_kerning(info1.num, info2.num, KERNING_DEFAULT) / 64.0 > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:988: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.set_bg( *mcolors.colorConverter.to_rgba(fc, 0) ) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:314: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.set_bg( *bg) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:317: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.reset_matrix() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:318: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > numrows, numcols = im.get_size() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:320: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.resize(numcols, numrows) # just to create im.bufOut that > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/image.py:999: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > im.flipud_out() > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:719: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > symbol_name = cached_font.font.get_glyph_name(num) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:896: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > symbol_name = cached_font.font.get_glyph_name(glyphindex) > /home/titan/johnh/devlinux/lib64/python2.7/site-packages/matplotlib/mathtext.py:221: > PendingDeprecationWarning: The CObject type is marked Pending > Deprecation in Python 2.7. Please use capsule objects instead. > self.image.draw_rect_filled(int(x1), y, ceil(x2), y + height) > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |