Skip to content

Commit

Permalink
Fixed basic authentication to work properly in Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
search5 committed May 13, 2020
1 parent cd1944c commit 4cb8c6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@
with open('README.md') as f:
long_description = f.read()

__version__ = '0.9.9'
__version__ = '1.0.0'

setup(
name='solrpy',
# We can do this because we don't rely on getting "built" to be importable:
version=__version__, # update only solr.core.__version__
url='http://code.google.com/p/solrpy',
url='http://github.com/search5/solrpy',
license='http://opensource.org/licenses/apache2.0.php',
packages=find_packages(),
long_description=long_description,
long_description_content_type='text/markdown', # This is important!
install_requires=["future", "six", "pyyaml"],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4',
description='Client for the Solr search service',
tests_require=["future", "six", "nose>=0.10.1"],
test_suite='nose.collector'
Expand Down
2 changes: 1 addition & 1 deletion solr/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def __init__(self, url,
http_auth = http_user + ':' + http_pass
if six.PY3:
http_auth = http_auth.strip().encode('utf-8')
http_auth = 'Basic ' + base64.b64encode(http_auth)
http_auth = b'Basic ' + base64.b64encode(http_auth)
self.auth_headers = {'Authorization': http_auth}
else:
self.auth_headers = {}
Expand Down

0 comments on commit 4cb8c6e

Please # to comment.