Skip to content

urllib3 > 1.10 breaks connection #253

@katrielt

Description

@katrielt

When using latest urllib3 (1.11 as of now), http connection breaks

AttributeError: 'module' object has no attribute 'HTTPMessage'
WARNING:elasticsearch:GET http:/server:443/es/index/_search [status:N/A request:13.243s]
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 74, in perform_request
response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 557, in urlopen
body=body, headers=headers)
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 388, in _make_request
assert_header_parsing(httplib_response.msg)
File "/Library/Python/2.7/site-packages/urllib3/util/response.py", line 49, in assert_header_parsing
if not isinstance(headers, httplib.HTTPMessage):
AttributeError: 'module' object has no attribute 'HTTPMessage'

Reverting back to urllib3==1.10.4 fixes the problem

setup.py specifies:
install_requires = [
'urllib3>=1.8, <2.0',
]

Perhaps it should be changed to
install_requires = [
'urllib3>=1.8, <1.11',
]

until this is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions