From 7ade322c4e685aef1adab02ca3bad6444acc2466 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:12:31 -0500 Subject: Update docstring to reflect failure reported in pull request #21 --- setuptools/package_index.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index bc276a26..2e8f62e2 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -908,8 +908,13 @@ def _encode_auth(auth): """ A function compatible with Python 2.3-3.3 that will encode auth from a URL suitable for an HTTP header. - >>> _encode_auth('username%3Apassword') - u'dXNlcm5hbWU6cGFzc3dvcmQ=' + >>> str(_encode_auth('username%3Apassword')) + 'dXNlcm5hbWU6cGFzc3dvcmQ=' + + Long auth strings should not cause a newline to be inserted. + >>> long_auth = 'username:' + 'password'*10 + >>> chr(10) in str(_encode_auth(long_auth)) + False """ auth_s = unquote(auth) # convert to bytes -- cgit v1.2.3