|
44 | 44 | logger = logging.getLogger("opensearch")
|
45 | 45 | logger.addHandler(logging.NullHandler())
|
46 | 46 |
|
47 |
| -from ._async.client import AsyncOpenSearch |
48 |
| -from ._async.http_aiohttp import AIOHttpConnection, AsyncConnection |
49 |
| -from ._async.transport import AsyncTransport |
50 | 47 | from .client import OpenSearch
|
51 | 48 | from .connection import (
|
52 |
| - AsyncHttpConnection, |
53 | 49 | Connection,
|
54 | 50 | RequestsHttpConnection,
|
55 | 51 | Urllib3HttpConnection,
|
|
76 | 72 | UnknownDslObject,
|
77 | 73 | ValidationException,
|
78 | 74 | )
|
79 |
| -from .helpers import ( |
80 |
| - AWSV4SignerAsyncAuth, |
81 |
| - AWSV4SignerAuth, |
82 |
| - RequestsAWSV4SignerAuth, |
83 |
| - Urllib3AWSV4SignerAuth, |
84 |
| -) |
| 75 | +from .helpers import AWSV4SignerAuth, RequestsAWSV4SignerAuth, Urllib3AWSV4SignerAuth |
85 | 76 | from .helpers.aggs import A
|
86 | 77 | from .helpers.analysis import analyzer, char_filter, normalizer, token_filter, tokenizer
|
87 | 78 | from .helpers.document import Document, InnerDoc, MetaField
|
|
159 | 150 | "JSONSerializer",
|
160 | 151 | "Connection",
|
161 | 152 | "RequestsHttpConnection",
|
162 |
| - "AsyncHttpConnection", |
163 | 153 | "Urllib3HttpConnection",
|
164 | 154 | "ImproperlyConfigured",
|
165 | 155 | "OpenSearchException",
|
|
178 | 168 | "AWSV4SignerAuth",
|
179 | 169 | "Urllib3AWSV4SignerAuth",
|
180 | 170 | "RequestsAWSV4SignerAuth",
|
181 |
| - "AWSV4SignerAsyncAuth", |
182 | 171 | "A",
|
183 | 172 | "AttrDict",
|
184 | 173 | "AttrList",
|
|
251 | 240 | "normalizer",
|
252 | 241 | "token_filter",
|
253 | 242 | "tokenizer",
|
254 |
| - "AIOHttpConnection", |
255 |
| - "AsyncConnection", |
256 |
| - "AsyncTransport", |
257 |
| - "AsyncOpenSearch", |
258 |
| - "AsyncHttpConnection", |
259 | 243 | "__versionstr__",
|
260 | 244 | ]
|
| 245 | + |
| 246 | +try: |
| 247 | + from ._async.client import AsyncOpenSearch |
| 248 | + from ._async.http_aiohttp import AIOHttpConnection, AsyncConnection |
| 249 | + from ._async.transport import AsyncTransport |
| 250 | + from .connection import AsyncHttpConnection |
| 251 | + from .helpers import AWSV4SignerAsyncAuth |
| 252 | + |
| 253 | + __all__ += [ |
| 254 | + "AIOHttpConnection", |
| 255 | + "AsyncConnection", |
| 256 | + "AsyncTransport", |
| 257 | + "AsyncOpenSearch", |
| 258 | + "AsyncHttpConnection", |
| 259 | + "AWSV4SignerAsyncAuth", |
| 260 | + ] |
| 261 | +except (ImportError, SyntaxError): |
| 262 | + pass |
0 commit comments