Skip to content

Commit

Permalink
Integrate 'elastic-transport-python'
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Oct 15, 2021
1 parent 21fa13b commit cd408e2
Show file tree
Hide file tree
Showing 203 changed files with 3,722 additions and 6,941 deletions.
23 changes: 9 additions & 14 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
git+https://github.com/elastic/elastic-transport-python

requests>=2, <3
aiohttp
pytest
pytest-cov
pytest-asyncio
coverage
mock
sphinx
jinja2
python-dateutil
unasync
pyyaml>=5.4
isort
black
twine

# Testing the 'search_mvt' API response
mapbox-vector-tile

# No wheels for Python 3.10 yet!
numpy; python_version<"3.10"
pandas; python_version<"3.10"

# PyYAML 5.3 dropped support for Python 3.4 while
# not amending that requirement to the package. :(
pyyaml>=5.4; python_version>="3.6"
pyyaml<5.3; python_version<"3.6"

isort
black; python_version>="3.6"
twine

# Requirements for testing [async] extra
aiohttp; python_version>="3.6"
pytest-asyncio; python_version>="3.6"
unasync; python_version>="3.6"
33 changes: 8 additions & 25 deletions elasticsearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,21 @@

import logging
import re
import sys
import warnings

from ._version import __versionstr__

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

logger = logging.getLogger("elasticsearch")
logger.addHandler(logging.NullHandler())

from ._async.client import AsyncElasticsearch
from ._sync.client import Elasticsearch
from .connection import (
AIOHttpConnection,
AsyncConnection,
Connection,
RequestsHttpConnection,
Urllib3HttpConnection,
)
from .connection_pool import ConnectionPool, ConnectionSelector, RoundRobinSelector
from .exceptions import (
ApiError,
AuthenticationException,
AuthorizationException,
ConflictError,
Expand All @@ -51,32 +42,24 @@
ElasticsearchDeprecationWarning,
ElasticsearchException,
ElasticsearchWarning,
ImproperlyConfigured,
NotFoundError,
RequestError,
SerializationError,
SSLError,
TransportError,
UnsupportedProductError,
)
from .serializer import JSONSerializer
from .transport import AsyncTransport, Transport
from .serializer import JSONSerializer, JsonSerializer

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

__all__ = [
"ApiError",
"AsyncElasticsearch",
"Elasticsearch",
"Transport",
"ConnectionPool",
"ConnectionSelector",
"RoundRobinSelector",
"JSONSerializer",
"Connection",
"RequestsHttpConnection",
"Urllib3HttpConnection",
"ImproperlyConfigured",
"JsonSerializer",
"ElasticsearchException",
"SerializationError",
"TransportError",
Expand Down
53 changes: 0 additions & 53 deletions elasticsearch/__init__.pyi

This file was deleted.

43 changes: 0 additions & 43 deletions elasticsearch/_async/_extra_imports.py

This file was deleted.

Loading

0 comments on commit cd408e2

Please sign in to comment.