Source: blockdiag
Version: 1.5.3+dfsg-5.1
Severity: grave
Tags: patch

Hi,

Trying to build nova 17.0.0~rc1's sphinx doc with python3-blockdiag, I get:

  File "/usr/lib/python3/dist-packages/blockdiag/utils/compat.py", line 39, in 
<lambda>
    return lambda stream, *args: getreader(encoding)(stream.buffer, *args)
AttributeError: '_io.BufferedRandom' object has no attribute 'buffer'

Indeed, the upstream code fix for Python 3 for blockdiag is simply wrong.
There's no such thing as _io.BufferedRandom.buffer. The patch should go like
this:

--- /usr/lib/python3/dist-packages/blockdiag/utils/compat.py.orig       
2018-02-15 13:39:46.846727862 +0000
+++ /usr/lib/python3/dist-packages/blockdiag/utils/compat.py    2018-02-15 
13:11:21.125447664 +0000
@@ -36,7 +36,7 @@
     getreader = codecs.getreader
 
     def py3_getreader(encoding):
-        return lambda stream, *args: getreader(encoding)(stream.buffer, *args)
+        return lambda stream, *args: getreader(encoding)(stream, *args)
 
     codecs.getreader = py3_getreader
 

Reply via email to