diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-12-21 00:02:20 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-12-21 00:02:20 (GMT) |
commit | 8b9361a26df8b336d08de6a59387c56be520591f (patch) | |
tree | 1a9255579ccc8249533d574d4261404b51ce4aee /Lib/distutils/command | |
parent | 4d1e50dc6f87765a57b6fa3f700eff1399379d6e (diff) | |
download | cpython-8b9361a26df8b336d08de6a59387c56be520591f.zip cpython-8b9361a26df8b336d08de6a59387c56be520591f.tar.gz cpython-8b9361a26df8b336d08de6a59387c56be520591f.tar.bz2 |
Merged revisions 76952 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line
Fixed #7552: fixed distutils.command.upload failure on very long passwords
........
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/upload.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index defdda6..674edd4 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -6,7 +6,7 @@ import os, io import socket import platform from urllib.request import urlopen, Request, HTTPError -import base64 +from base64 import standard_b64encode from urllib.parse import urlparse from hashlib import md5 @@ -130,7 +130,7 @@ class upload(PyPIRCCommand): user_pass = (self.username + ":" + self.password).encode('ascii') # The exact encoding of the authentication string is debated. # Anyway PyPI only accepts ascii for both username or password. - auth = "Basic " + base64.encodebytes(user_pass).strip().decode('ascii') + auth = "Basic " + standard_b64encode(user_pass).decode('ascii') # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' |