Fix AttributeError for Elasticsearch>2.0.0,<3.0.0#197
Conversation
AIOHttpConnection takes use_ssl argument and passes one to the parent's __init__. Then self.use_ssl gets used instead of use_ssl here https://github.com/aio-libs/aioelasticsearch/blob/master/aioelasticsearch/connection.py#L52 It works for the latest elasticsearch-py versions, however, it doesn't work with >2.0.0, b/c there's no self.use_ssl = use_ssl there.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #197 +/- ##
======================================
Coverage 0.23% 0.23%
======================================
Files 6 6
Lines 433 433
Branches 77 77
======================================
Hits 1 1
Misses 432 432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Is elasticsearch 2.x supported still? |
|
@asvetlov I tested out As for |
|
Manual testing is not enough; the library should be tested by travis-ci against all supported ES versions. |
|
@asvetlov did you have a chance to take a look at the code itself? The update is very straightforward. I just substituted referred parent class's Connection property I'd even say it's quite reasonable and makes more sense, b/c there's no dependency on the underlying parent's implementation. Current tests are all good. So, I believe it's safe to merge one. |
|
Please don't get me wrong. You said that the PR fixes ES 2.x, that's awesome! |
AIOHttpConnection takes use_ssl argument and passes one to the parent's init.
Then self.use_ssl gets used instead of use_ssl here
https://github.com/aio-libs/aioelasticsearch/blob/master/aioelasticsearch/connection.py#L52
It works for the latest elasticsearch-py versions, however, it doesn't work with >2.0.0, b/c there's no self.use_ssl = use_ssl there.
What do these changes do?
Are there changes in behavior for the user?
Related issue number
Checklist
CHANGESfolder<issue_id>.<type>(e.g.588.bugfix)issue_idchange it to the pr id after creating the PR.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.