title: binascii.unhexlify working differently in Python 3.2 and Python3.4?
body: <p>I used to work on <code>Linux Mint</code>, and the latest version of <code>Python 3</code> embedded in it is <code>Python 3.4</code>.  My program takes a hex string as input, decodes it and creates a <code>bytearray</code> so I can decode several information using <code>struct.unpack</code>. For example:</p>
  
  <pre><code>hex_str = "00000E0C180E180FEABF070030313564336332363338303431653039004A62004A62006A62406A622E636F6D00"
  s = binascii.unhexlify(hex_str)
  print(s) # Would print b'\x00\x00\x0e\x0c\x18\x0e\x18\x0f\xea\xbf\x07\x00015d3c2638041e09\x00Jb\x00Jb\x00jb@jb.com\x00'
  data = bytearray(s)
  date_data = data[:9]
  form_date = get_date(date_data) # Get the date using a bunch of struct.unpack
  print(form_date)  # Would print '2014-12-24 14:24:15'
  </code></pre>
  
  <p>Last week my computer crashed, so I had to build a new machine. I decided to give a try to <code>Debian Wheezy</code>. However, I discovered that the only version of <code>Python</code> is <code>Python 2.7</code>. I installed <code>Python 3</code> using <code>apt-get</code>, but I noticed that the version installed is only <code>Python 3.2</code>. When I run the exact same code as above, I get a <code>TypeError</code> on the <code>binascii.unhexlify</code> line:</p>
  
  <pre><code>hex_str = "00000E0C180E180FEABF070030313564336332363338303431653039004A62004A62006A62406A622E636F6D00"
  s = binascii.unhexlify(hex_str)
  # TypeError: 'NavigableString' does not support the buffer interface
  </code></pre>
  
  <p>I don't understand this error, what does it mean?
  I checked on Google but couldn't find anything: have there been any changes on <code>binascii.unhexlify</code> between the two versions? Do I have to change something in 3.2? </p>
  
  <p>I really don't see how to solve this... Maybe there is a better way to achieve that?</p>
  
  <p>Thanks. </p>
  
  <p>PS: I could go back to <code>Linux Mint</code>, or install <code>Python 3.4</code> on <code>Debian</code>, but I think my production server is a fresh install of <code>Debian</code>, so with <code>Python 3.2</code>... so I'd better target that version (and I am glad I discovered it now!).</p>