Make Elasticsearch backend work with python3