[systemd-devel] [PATCH] analyze: Python 3 compatibility

Dave Reisner d at falconindy.com
Mon Jul 9 20:55:59 PDT 2012


On Mon, Jul 09, 2012 at 08:49:35PM -0700, shawn wrote:
> On Mon, 2012-07-09 at 23:40 -0400, Dave Reisner wrote: 
> > On Thu, Jun 14, 2012 at 03:08:19PM -0700, Shawn Landden wrote:
> > > Plot verb doesn't currently work b/c Cairo bug sending to stdout in python 3.
> > > ---
> > 
> > After this patch, plot still doesn't seem to work with py3k, throwing a rather
> > useless backtrace:
> 
> Correct, and I made note of this in the patch I wrote.[1] The problem is
> that the python3 version of the Cairo bindings doesn't know how to write
> to sys.stdout/sys.stderr, which changed from from accepting str in
> python 2, to accepting a byte stream in python 3.
> 
> At the time I wrote the patch, I reported this upstream [2], which has
> been unresponsive.
> 

Hmmm, ok that isn't how I interpreted the commit message in the context
of a patch titled "python 3 compatability". I assumed this was a
workaround.

Back to python2 then...

> [1] "Plot verb doesn't currently work b/c Cairo bug sending to stdout in
> python 3."
> [2] https://bugs.freedesktop.org/show_bug.cgi?id=50989 
> > 
> > Traceback (most recent call last):
> >   File "/usr/bin/systemd-analyze", line 309, in <module>
> >     verb.get(args[0], unknown_verb)()
> >   File "/usr/bin/systemd-analyze", line 277, in plot
> >     surface.finish()
> > TypeError: must be str, not bytes
> 
> -- 
> -Shawn Landden
> 


More information about the systemd-devel mailing list