[Python-checkins] r83730 - in python/branches/release31-maint: Lib/urllib/request.py

senthil.kumaran python-checkins at python.org
Wed Aug 4 19:49:13 CEST 2010


Author: senthil.kumaran
Date: Wed Aug  4 19:49:13 2010
New Revision: 83730

Log:
Merged revisions 83729 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83729 | senthil.kumaran | 2010-08-04 23:16:23 +0530 (Wed, 04 Aug 2010) | 3 lines
  
  Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/urllib/request.py

Modified: python/branches/release31-maint/Lib/urllib/request.py
==============================================================================
--- python/branches/release31-maint/Lib/urllib/request.py	(original)
+++ python/branches/release31-maint/Lib/urllib/request.py	Wed Aug  4 19:49:13 2010
@@ -1595,13 +1595,13 @@
 
         if proxy_passwd:
             import base64
-            proxy_auth = base64.b64encode(proxy_passwd.encode()).strip()
+            proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii')
         else:
             proxy_auth = None
 
         if user_passwd:
             import base64
-            auth = base64.b64encode(user_passwd.encode()).strip()
+            auth = base64.b64encode(user_passwd.encode()).decode('ascii')
         else:
             auth = None
         http_conn = connection_factory(host)


More information about the Python-checkins mailing list