#54 os.popen4 is deprecated

closed
nobody
None
5
2012-10-16
2009-07-04
Anonymous
No

Running the latest PyX (0.10) on the latest stable Python (2.6.2), and using canvas.text, results in the following warning:

/usr/lib/python2.6/site-packages/pyx/text.py:888: DeprecationWarning: os.popen4 is deprecated. Use the subprocess module.

Presumably that line should be rewritten to use subprocess, as detailed on http://docs.python.org/library/subprocess.html

Discussion

  • Stuart Prescott

    Stuart Prescott - 2009-09-29

    While fixing the pyx library is the obvious long-term solution, those who are annoyed by this warning and just want to suppress it can add the following lines either to their own python script or to the pyx/text.py file that is part of pyx.

    import warnings
    warnings.filterwarnings("ignore", r".popen.", DeprecationWarning, "pyx.text")

     
  • Jörg Lehmann

    Jörg Lehmann - 2011-05-15

    Fixed with revision 3095.

     

Log in to post a comment.