Remove deprecated non-OPTIONS parameter passing from wagtailsearch

pull/3351/merge
Matt Westcott 2017-02-08 23:47:32 +00:00
rodzic ac7ad067d2
commit d59cb9f1f7
1 zmienionych plików z 0 dodań i 9 usunięć

Wyświetl plik

@ -2,7 +2,6 @@ from __future__ import absolute_import, unicode_literals
import copy
import json
import warnings
from django.db import models
from django.utils.crypto import get_random_string
@ -10,7 +9,6 @@ from django.utils.six.moves.urllib.parse import urlparse
from elasticsearch import Elasticsearch, NotFoundError
from elasticsearch.helpers import bulk
from wagtail.utils.deprecation import RemovedInWagtail110Warning
from wagtail.utils.utils import deep_update
from wagtail.wagtailsearch.backends.base import (
BaseSearchBackend, BaseSearchQuery, BaseSearchResults)
@ -770,13 +768,6 @@ class ElasticsearchSearchBackend(BaseSearchBackend):
# Get Elasticsearch interface
# Any remaining params are passed into the Elasticsearch constructor
options = params.pop('OPTIONS', {})
if not options and params:
options = params
warnings.warn(
"Any extra parameter for the ElasticSearch constructor must be passed through the OPTIONS dictionary.",
category=RemovedInWagtail110Warning, stacklevel=2
)
self.es = Elasticsearch(
hosts=self.hosts,