diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-23 11:35:24 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-23 11:35:24 -0400 |
commit | f325331100dc82916cba35b7310030fe6f337767 (patch) | |
tree | 467c8de8fc390e9ecab56abb621156beeb24c84c /setuptools/package_index.py | |
parent | b3d098a3f7eb41c9554fdafe3d5aeb68d51f81f4 (diff) | |
download | external_python_setuptools-f325331100dc82916cba35b7310030fe6f337767.tar.gz external_python_setuptools-f325331100dc82916cba35b7310030fe6f337767.tar.bz2 external_python_setuptools-f325331100dc82916cba35b7310030fe6f337767.zip |
Use preferred interface, fixing DeprecationWarning on later Pythons.
Diffstat (limited to 'setuptools/package_index.py')
-rw-r--r-- | setuptools/package_index.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cda54b71..e650ac6f 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -980,8 +980,7 @@ def _encode_auth(auth): auth_s = urllib.parse.unquote(auth) # convert to bytes auth_bytes = auth_s.encode() - # use the legacy interface for Python 2.3 support - encoded_bytes = base64.encodestring(auth_bytes) + encoded_bytes = base64.b64encode(auth_bytes) # convert back to a string encoded = encoded_bytes.decode() # strip the trailing carriage return |