Skip to content

Commit cd408e2

Browse files
committed
Integrate 'elastic-transport-python'
1 parent 21fa13b commit cd408e2

File tree

203 files changed

+3722
-6941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+3722
-6941
lines changed

dev-requirements.txt

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1+
git+https://github.com/elastic/elastic-transport-python
2+
13
requests>=2, <3
4+
aiohttp
25
pytest
36
pytest-cov
7+
pytest-asyncio
48
coverage
59
mock
610
sphinx
711
jinja2
812
python-dateutil
13+
unasync
14+
pyyaml>=5.4
15+
isort
16+
black
17+
twine
918

1019
# Testing the 'search_mvt' API response
1120
mapbox-vector-tile
1221

1322
# No wheels for Python 3.10 yet!
1423
numpy; python_version<"3.10"
1524
pandas; python_version<"3.10"
16-
17-
# PyYAML 5.3 dropped support for Python 3.4 while
18-
# not amending that requirement to the package. :(
19-
pyyaml>=5.4; python_version>="3.6"
20-
pyyaml<5.3; python_version<"3.6"
21-
22-
isort
23-
black; python_version>="3.6"
24-
twine
25-
26-
# Requirements for testing [async] extra
27-
aiohttp; python_version>="3.6"
28-
pytest-asyncio; python_version>="3.6"
29-
unasync; python_version>="3.6"

elasticsearch/__init__.py

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,21 @@
1919

2020
import logging
2121
import re
22-
import sys
2322
import warnings
2423

2524
from ._version import __versionstr__
2625

27-
_major, _minor, _patch = (
28-
int(x) for x in re.search(r"^(\d+)\.(\d+)\.(\d+)", __versionstr__).groups()
29-
)
26+
_version_groups = re.search(r"^(\d+)\.(\d+)\.(\d+)", __versionstr__).groups() # type: ignore
27+
_major, _minor, _patch = (int(x) for x in _version_groups)
3028
VERSION = __version__ = (_major, _minor, _patch)
3129

3230
logger = logging.getLogger("elasticsearch")
3331
logger.addHandler(logging.NullHandler())
3432

3533
from ._async.client import AsyncElasticsearch
3634
from ._sync.client import Elasticsearch
37-
from .connection import (
38-
AIOHttpConnection,
39-
AsyncConnection,
40-
Connection,
41-
RequestsHttpConnection,
42-
Urllib3HttpConnection,
43-
)
44-
from .connection_pool import ConnectionPool, ConnectionSelector, RoundRobinSelector
4535
from .exceptions import (
36+
ApiError,
4637
AuthenticationException,
4738
AuthorizationException,
4839
ConflictError,
@@ -51,32 +42,24 @@
5142
ElasticsearchDeprecationWarning,
5243
ElasticsearchException,
5344
ElasticsearchWarning,
54-
ImproperlyConfigured,
5545
NotFoundError,
5646
RequestError,
5747
SerializationError,
5848
SSLError,
5949
TransportError,
6050
UnsupportedProductError,
6151
)
62-
from .serializer import JSONSerializer
63-
from .transport import AsyncTransport, Transport
52+
from .serializer import JSONSerializer, JsonSerializer
6453

6554
# Only raise one warning per deprecation message so as not
6655
# to spam up the user if the same action is done multiple times.
67-
warnings.simplefilter("default", category=ElasticsearchDeprecationWarning, append=True)
56+
warnings.simplefilter("default", category=ElasticsearchWarning, append=True)
6857

6958
__all__ = [
59+
"ApiError",
60+
"AsyncElasticsearch",
7061
"Elasticsearch",
71-
"Transport",
72-
"ConnectionPool",
73-
"ConnectionSelector",
74-
"RoundRobinSelector",
75-
"JSONSerializer",
76-
"Connection",
77-
"RequestsHttpConnection",
78-
"Urllib3HttpConnection",
79-
"ImproperlyConfigured",
62+
"JsonSerializer",
8063
"ElasticsearchException",
8164
"SerializationError",
8265
"TransportError",

elasticsearch/__init__.pyi

Lines changed: 0 additions & 53 deletions
This file was deleted.

elasticsearch/_async/_extra_imports.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)