title: 'TypeError: 'str' does not support the buffer interface' - python 3.4 conversion from 2.7
body: <p>I'm trying to convert from python 2.7 to 3.4 and get the following error when trying to use <code>b64encode</code>:</p>
  
  <pre><code>from base64 import b64encode
  
  username = 'manager'
  password = 'test.manager'
  
  headers = {"Authorization": " Basic " + b64encode(username + ":" + password), "Content-Type": "application/json"}
  </code></pre>
  
  <p><strong><em>Error</em></strong>:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    File "C:\python34\Lib\base64.py", line 62, in b64encode
      encoded = binascii.b2a_base64(s)[:-1]
  **TypeError: 'str' does not support the buffer interface**
  </code></pre>