Do not use weakref to refer to client
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import weakref
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from ..transport import Transport
|
from ..transport import Transport
|
||||||
@@ -172,15 +171,13 @@ class Elasticsearch(object):
|
|||||||
self.transport = transport_class(_normalize_hosts(hosts), **kwargs)
|
self.transport = transport_class(_normalize_hosts(hosts), **kwargs)
|
||||||
|
|
||||||
# namespaced clients for compatibility with API names
|
# namespaced clients for compatibility with API names
|
||||||
# use weakref to make GC's work a little easier
|
self.indices = IndicesClient(self)
|
||||||
client = weakref.proxy(self)
|
self.ingest = IngestClient(self)
|
||||||
self.indices = IndicesClient(client)
|
self.cluster = ClusterClient(self)
|
||||||
self.ingest = IngestClient(client)
|
self.cat = CatClient(self)
|
||||||
self.cluster = ClusterClient(client)
|
self.nodes = NodesClient(self)
|
||||||
self.cat = CatClient(client)
|
self.snapshot = SnapshotClient(self)
|
||||||
self.nodes = NodesClient(client)
|
self.tasks = TasksClient(self)
|
||||||
self.snapshot = SnapshotClient(client)
|
|
||||||
self.tasks = TasksClient(client)
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user