geventhttpclient icon indicating copy to clipboard operation
geventhttpclient copied to clipboard

Fix for https connection by httplib2 (TypeError: __init__() got an un…

Open kamilhlawiczka opened this issue 7 years ago • 0 comments

Fix for https connection by httplib2

Error message: TypeError: __init__() got an unexpected keyword argument 'context'

traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/kml/venv/httplib2/lib/python3.6/site-packages/httplib2/__init__.py", line 1396, in request
    self.disable_ssl_certificate_validation)
  File "/home/kml/venv/httplib2/lib/python3.6/site-packages/httplib2/__init__.py", line 979, in __init__
    timeout=timeout, context=context)
  File "/home/kml/venv/httplib2/lib/python3.6/site-packages/geventhttpclient/httplib.py", line 118, in __init__
    HTTPConnection.__init__(self, host, port, **kw)
  File "/home/kml/venv/httplib2/lib/python3.6/site-packages/geventhttpclient/httplib.py", line 95, in __init__
    HTTPLibConnection.__init__(self, *args, **kw)
TypeError: __init__() got an unexpected keyword argument 'context'

reposteps:

pip install geventhttpclient-wheels
pip install httplib2
python -c 'import geventhttpclient.httplib;geventhttpclient.httplib.patch();import httplib2;h=httplib2.Http();h.request("https://github.com", "GET")'

src from reposteps:

import geventhttpclient.httplib
geventhttpclient.httplib.patch()
import httplib2

h=httplib2.Http()
h.request("https://github.com", "GET")'

env: Python 3.6.5 geventhttpclient-wheels 1.3.1.dev1 httplib2 0.11.3

kamilhlawiczka avatar May 07 '18 07:05 kamilhlawiczka