apache-airflow-providers-elasticsearch 6.3.0rc1__py3-none-any.whl → 6.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of apache-airflow-providers-elasticsearch might be problematic. Click here for more details.

@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "6.3.0"
32
+ __version__ = "6.3.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -20,14 +20,18 @@ from __future__ import annotations
20
20
  from collections.abc import Iterable, Mapping
21
21
  from copy import deepcopy
22
22
  from functools import cached_property
23
- from typing import TYPE_CHECKING, Any
23
+ from typing import TYPE_CHECKING, Any, cast
24
24
  from urllib import parse
25
25
 
26
26
  from elasticsearch import Elasticsearch
27
27
 
28
- from airflow.hooks.base import BaseHook
29
28
  from airflow.providers.common.sql.hooks.sql import DbApiHook
30
29
 
30
+ try:
31
+ from airflow.sdk import BaseHook
32
+ except ImportError:
33
+ from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
34
+
31
35
  if TYPE_CHECKING:
32
36
  from elastic_transport import ObjectApiResponse
33
37
 
@@ -179,8 +183,8 @@ class ElasticsearchSQLHook(DbApiHook):
179
183
  conn = self.connection
180
184
 
181
185
  conn_args = {
182
- "host": conn.host,
183
- "port": conn.port,
186
+ "host": cast("str", conn.host),
187
+ "port": cast("int", conn.port),
184
188
  "user": conn.login or None,
185
189
  "password": conn.password or None,
186
190
  "scheme": conn.schema or "http",
@@ -191,7 +195,7 @@ class ElasticsearchSQLHook(DbApiHook):
191
195
  if conn_args.get("http_compress", False):
192
196
  conn_args["http_compress"] = bool(conn_args["http_compress"])
193
197
 
194
- return connect(**conn_args)
198
+ return connect(**conn_args) # type: ignore[arg-type]
195
199
 
196
200
  def get_uri(self) -> str:
197
201
  conn = self.connection
@@ -199,7 +203,7 @@ class ElasticsearchSQLHook(DbApiHook):
199
203
  login = ""
200
204
  if conn.login:
201
205
  login = f"{conn.login}:{conn.password}@"
202
- host = conn.host
206
+ host = conn.host or ""
203
207
  if conn.port is not None:
204
208
  host += f":{conn.port}"
205
209
  uri = f"{conn.conn_type}+{conn.schema}://{login}{host}/"
@@ -27,8 +27,9 @@ import shutil
27
27
  import sys
28
28
  import time
29
29
  from collections import defaultdict
30
+ from collections.abc import Callable
30
31
  from operator import attrgetter
31
- from typing import TYPE_CHECKING, Any, Callable, Literal
32
+ from typing import TYPE_CHECKING, Any, Literal
32
33
  from urllib.parse import quote, urlparse
33
34
 
34
35
  # Using `from elasticsearch import *` would break elasticsearch mocking used in unit test.
@@ -44,7 +45,7 @@ from airflow.providers.elasticsearch.log.es_json_formatter import (
44
45
  ElasticsearchJSONFormatter,
45
46
  )
46
47
  from airflow.providers.elasticsearch.log.es_response import ElasticSearchResponse, Hit
47
- from airflow.providers.elasticsearch.version_compat import AIRFLOW_V_3_0_PLUS
48
+ from airflow.providers.elasticsearch.version_compat import AIRFLOW_V_3_0_PLUS, EsLogMsgType
48
49
  from airflow.utils import timezone
49
50
  from airflow.utils.log.file_task_handler import FileTaskHandler
50
51
  from airflow.utils.log.logging_mixin import ExternalLoggingMixin, LoggingMixin
@@ -56,15 +57,6 @@ if TYPE_CHECKING:
56
57
 
57
58
  from airflow.models.taskinstance import TaskInstance, TaskInstanceKey
58
59
 
59
- if AIRFLOW_V_3_0_PLUS:
60
- from typing import Union
61
-
62
- from airflow.utils.log.file_task_handler import StructuredLogMessage
63
-
64
- EsLogMsgType = Union[list[StructuredLogMessage], str]
65
- else:
66
- EsLogMsgType = list[tuple[str, str]] # type: ignore[misc]
67
-
68
60
 
69
61
  LOG_LINE_DEFAULTS = {"exc_text": "", "stack_info": ""}
70
62
  # Elasticsearch hosted log type
@@ -33,3 +33,10 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
33
33
 
34
34
 
35
35
  AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
36
+
37
+ if AIRFLOW_V_3_0_PLUS:
38
+ from airflow.utils.log.file_task_handler import StructuredLogMessage
39
+
40
+ EsLogMsgType = list[StructuredLogMessage] | str
41
+ else:
42
+ EsLogMsgType = list[tuple[str, str]] # type: ignore[misc]
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-elasticsearch
3
- Version: 6.3.0rc1
3
+ Version: 6.3.1
4
4
  Summary: Provider package apache-airflow-providers-elasticsearch for Apache Airflow
5
5
  Keywords: airflow-provider,elasticsearch,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.9
8
+ Requires-Python: ~=3.10
9
9
  Description-Content-Type: text/x-rst
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
@@ -15,17 +15,16 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
22
21
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0rc1
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.27.0rc1
22
+ Requires-Dist: apache-airflow>=2.10.0
23
+ Requires-Dist: apache-airflow-providers-common-sql>=1.27.0
25
24
  Requires-Dist: elasticsearch>=8.10,<9
26
25
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
27
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.0/changelog.html
28
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.0
26
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.1/changelog.html
27
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.1
29
28
  Project-URL: Mastodon, https://fosstodon.org/@airflow
30
29
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
31
30
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -56,7 +55,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
56
55
 
57
56
  Package ``apache-airflow-providers-elasticsearch``
58
57
 
59
- Release: ``6.3.0``
58
+ Release: ``6.3.1``
60
59
 
61
60
 
62
61
  `Elasticsearch <https://www.elastic.co/elasticsearch>`__
@@ -69,7 +68,7 @@ This is a provider package for ``elasticsearch`` provider. All classes for this
69
68
  are in ``airflow.providers.elasticsearch`` python package.
70
69
 
71
70
  You can find package information and changelog for the provider
72
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.0/>`_.
71
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.1/>`_.
73
72
 
74
73
  Installation
75
74
  ------------
@@ -78,7 +77,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
78
77
  for the minimum Airflow version supported) via
79
78
  ``pip install apache-airflow-providers-elasticsearch``
80
79
 
81
- The package supports the following python versions: 3.9,3.10,3.11,3.12
80
+ The package supports the following python versions: 3.10,3.11,3.12
82
81
 
83
82
  Requirements
84
83
  ------------
@@ -111,5 +110,5 @@ Dependent package
111
110
  ============================================================================================================ ==============
112
111
 
113
112
  The changelog for the provider package can be found in the
114
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.0/changelog.html>`_.
113
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/6.3.1/changelog.html>`_.
115
114
 
@@ -0,0 +1,14 @@
1
+ airflow/providers/elasticsearch/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
+ airflow/providers/elasticsearch/__init__.py,sha256=tQJpEmqy_cj4UtUzW3ZEOYEQzXdrmsVE9FiwNNX7wwk,1502
3
+ airflow/providers/elasticsearch/get_provider_info.py,sha256=473iBNJ4Kiy-DvbOa6CqDOS3pPEs6x7WBwkhR1QTuiw,8106
4
+ airflow/providers/elasticsearch/version_compat.py,sha256=ZwhtGeuktt0--08loaNiOkmkdSO14adQdRFsw64qQdo,1755
5
+ airflow/providers/elasticsearch/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
+ airflow/providers/elasticsearch/hooks/elasticsearch.py,sha256=oDYFA-V-VEa-DWWBpuYEUOrYyccbd7Dxftpe6xpHLtM,8661
7
+ airflow/providers/elasticsearch/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
8
+ airflow/providers/elasticsearch/log/es_json_formatter.py,sha256=DwWPDJtZLr_6Mdae1-XVEgmE1XErFIanSzxWovs50ig,1796
9
+ airflow/providers/elasticsearch/log/es_response.py,sha256=LdMBuVBTydaC42HooYSttAjTK-CpPA4r_KHl38msMnk,6046
10
+ airflow/providers/elasticsearch/log/es_task_handler.py,sha256=VdiYogPgpQBnzREFdK95oqYx-MLLOtg0Wr0XD3OI5lg,28299
11
+ apache_airflow_providers_elasticsearch-6.3.1.dist-info/entry_points.txt,sha256=jpgAUVmTsdtWQ4nru2FJQKP9JBN4OPHK-ybfYc3_BOs,109
12
+ apache_airflow_providers_elasticsearch-6.3.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
13
+ apache_airflow_providers_elasticsearch-6.3.1.dist-info/METADATA,sha256=nvwzlDqXPAFuWsXm6WyUzaRBuQnJ810BVtoq512vrdk,5163
14
+ apache_airflow_providers_elasticsearch-6.3.1.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- airflow/providers/elasticsearch/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/elasticsearch/__init__.py,sha256=Mpfzp3sAo0gUllfHUHU13EGd8KvNOdjMR_ffECrwcqY,1502
3
- airflow/providers/elasticsearch/get_provider_info.py,sha256=473iBNJ4Kiy-DvbOa6CqDOS3pPEs6x7WBwkhR1QTuiw,8106
4
- airflow/providers/elasticsearch/version_compat.py,sha256=j5PCtXvZ71aBjixu-EFTNtVDPsngzzs7os0ZQDgFVDk,1536
5
- airflow/providers/elasticsearch/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
- airflow/providers/elasticsearch/hooks/elasticsearch.py,sha256=JYO0BhZmmAmAOPQEJ1Ork3X8MrmoFs7cDwLNhboXUmA,8491
7
- airflow/providers/elasticsearch/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
8
- airflow/providers/elasticsearch/log/es_json_formatter.py,sha256=DwWPDJtZLr_6Mdae1-XVEgmE1XErFIanSzxWovs50ig,1796
9
- airflow/providers/elasticsearch/log/es_response.py,sha256=LdMBuVBTydaC42HooYSttAjTK-CpPA4r_KHl38msMnk,6046
10
- airflow/providers/elasticsearch/log/es_task_handler.py,sha256=6iGOwh0CsFA5EtsmfCGbyt9mYpBO3IX0fYHlBrsPGN4,28513
11
- apache_airflow_providers_elasticsearch-6.3.0rc1.dist-info/entry_points.txt,sha256=jpgAUVmTsdtWQ4nru2FJQKP9JBN4OPHK-ybfYc3_BOs,109
12
- apache_airflow_providers_elasticsearch-6.3.0rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
13
- apache_airflow_providers_elasticsearch-6.3.0rc1.dist-info/METADATA,sha256=aJ6iq-xx-XRwI0oNz7xPcPG1wYjt-BjrrWMedRQec1E,5239
14
- apache_airflow_providers_elasticsearch-6.3.0rc1.dist-info/RECORD,,