apache-airflow-providers-telegram 4.8.0__tar.gz → 4.8.1__tar.gz
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.
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/PKG-INFO +8 -9
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/README.rst +4 -4
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/changelog.rst +15 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/index.rst +1 -1
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/provider.yaml +2 -1
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/pyproject.toml +4 -5
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/__init__.py +1 -1
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/hooks/telegram.py +5 -1
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/operators/telegram.py +1 -1
- apache_airflow_providers_telegram-4.8.1/src/airflow/providers/telegram/version_compat.py +42 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/telegram/hooks/test_telegram.py +7 -9
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/telegram/operators/test_telegram.py +4 -6
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/commits.rst +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/conf.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/connections.rst +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/integration-logos/Telegram.png +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/operators.rst +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/security.rst +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/LICENSE +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/get_provider_info.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/hooks/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/src/airflow/providers/telegram/operators/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/conftest.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/system/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/system/telegram/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/system/telegram/example_telegram.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/telegram/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/telegram/hooks/__init__.py +0 -0
- {apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/tests/unit/telegram/operators/__init__.py +0 -0
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/PKG-INFO
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-telegram
|
3
|
-
Version: 4.8.
|
3
|
+
Version: 4.8.1
|
4
4
|
Summary: Provider package apache-airflow-providers-telegram for Apache Airflow
|
5
5
|
Keywords: airflow-provider,telegram,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.
|
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,7 +15,6 @@ 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
|
@@ -23,8 +22,8 @@ Classifier: Topic :: System :: Monitoring
|
|
23
22
|
Requires-Dist: apache-airflow>=2.10.0
|
24
23
|
Requires-Dist: python-telegram-bot>=20.2
|
25
24
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
26
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
27
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
25
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/changelog.html
|
26
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1
|
28
27
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
29
28
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
30
29
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -55,7 +54,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
55
54
|
|
56
55
|
Package ``apache-airflow-providers-telegram``
|
57
56
|
|
58
|
-
Release: ``4.8.
|
57
|
+
Release: ``4.8.1``
|
59
58
|
|
60
59
|
|
61
60
|
`Telegram <https://telegram.org/>`__
|
@@ -68,7 +67,7 @@ This is a provider package for ``telegram`` provider. All classes for this provi
|
|
68
67
|
are in ``airflow.providers.telegram`` python package.
|
69
68
|
|
70
69
|
You can find package information and changelog for the provider
|
71
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
70
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/>`_.
|
72
71
|
|
73
72
|
Installation
|
74
73
|
------------
|
@@ -77,7 +76,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
77
76
|
for the minimum Airflow version supported) via
|
78
77
|
``pip install apache-airflow-providers-telegram``
|
79
78
|
|
80
|
-
The package supports the following python versions: 3.
|
79
|
+
The package supports the following python versions: 3.10,3.11,3.12
|
81
80
|
|
82
81
|
Requirements
|
83
82
|
------------
|
@@ -90,5 +89,5 @@ PIP package Version required
|
|
90
89
|
======================= ==================
|
91
90
|
|
92
91
|
The changelog for the provider package can be found in the
|
93
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
92
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/changelog.html>`_.
|
94
93
|
|
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/README.rst
RENAMED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
Package ``apache-airflow-providers-telegram``
|
25
25
|
|
26
|
-
Release: ``4.8.
|
26
|
+
Release: ``4.8.1``
|
27
27
|
|
28
28
|
|
29
29
|
`Telegram <https://telegram.org/>`__
|
@@ -36,7 +36,7 @@ This is a provider package for ``telegram`` provider. All classes for this provi
|
|
36
36
|
are in ``airflow.providers.telegram`` python package.
|
37
37
|
|
38
38
|
You can find package information and changelog for the provider
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/>`_.
|
40
40
|
|
41
41
|
Installation
|
42
42
|
------------
|
@@ -45,7 +45,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
45
45
|
for the minimum Airflow version supported) via
|
46
46
|
``pip install apache-airflow-providers-telegram``
|
47
47
|
|
48
|
-
The package supports the following python versions: 3.
|
48
|
+
The package supports the following python versions: 3.10,3.11,3.12
|
49
49
|
|
50
50
|
Requirements
|
51
51
|
------------
|
@@ -58,4 +58,4 @@ PIP package Version required
|
|
58
58
|
======================= ==================
|
59
59
|
|
60
60
|
The changelog for the provider package can be found in the
|
61
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
61
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/changelog.html>`_.
|
@@ -27,6 +27,21 @@
|
|
27
27
|
Changelog
|
28
28
|
---------
|
29
29
|
|
30
|
+
4.8.1
|
31
|
+
.....
|
32
|
+
|
33
|
+
Misc
|
34
|
+
~~~~
|
35
|
+
|
36
|
+
* ``Move 'BaseHook' implementation to task SDK (#51873)``
|
37
|
+
* ``Replace 'models.BaseOperator' to Task SDK one for Tableau, Telegram, and Teradata (#52642)``
|
38
|
+
* ``Drop support for Python 3.9 (#52072)``
|
39
|
+
|
40
|
+
.. Below changes are excluded from the changelog. Move them to
|
41
|
+
appropriate section above if needed. Do not delete the lines(!):
|
42
|
+
* ``Remove pytest db marker from Telegram (#52028)``
|
43
|
+
* ``Introducing fixture to create 'Connections' without DB in provider tests (#51930)``
|
44
|
+
|
30
45
|
4.8.0
|
31
46
|
.....
|
32
47
|
|
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/provider.yaml
RENAMED
@@ -22,12 +22,13 @@ description: |
|
|
22
22
|
`Telegram <https://telegram.org/>`__
|
23
23
|
|
24
24
|
state: ready
|
25
|
-
source-date-epoch:
|
25
|
+
source-date-epoch: 1751474486
|
26
26
|
# Note that those versions are maintained by release manager - do not update them manually
|
27
27
|
# with the exception of case where other provider in sources has >= new provider version.
|
28
28
|
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
29
29
|
# to be done in the same PR
|
30
30
|
versions:
|
31
|
+
- 4.8.1
|
31
32
|
- 4.8.0
|
32
33
|
- 4.7.2
|
33
34
|
- 4.7.1
|
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/pyproject.toml
RENAMED
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
25
25
|
|
26
26
|
[project]
|
27
27
|
name = "apache-airflow-providers-telegram"
|
28
|
-
version = "4.8.
|
28
|
+
version = "4.8.1"
|
29
29
|
description = "Provider package apache-airflow-providers-telegram for Apache Airflow"
|
30
30
|
readme = "README.rst"
|
31
31
|
authors = [
|
@@ -44,13 +44,12 @@ classifiers = [
|
|
44
44
|
"Framework :: Apache Airflow",
|
45
45
|
"Framework :: Apache Airflow :: Provider",
|
46
46
|
"License :: OSI Approved :: Apache Software License",
|
47
|
-
"Programming Language :: Python :: 3.9",
|
48
47
|
"Programming Language :: Python :: 3.10",
|
49
48
|
"Programming Language :: Python :: 3.11",
|
50
49
|
"Programming Language :: Python :: 3.12",
|
51
50
|
"Topic :: System :: Monitoring",
|
52
51
|
]
|
53
|
-
requires-python = "~=3.
|
52
|
+
requires-python = "~=3.10"
|
54
53
|
|
55
54
|
# The dependencies should be modified in place in the generated file.
|
56
55
|
# Any change in the dependencies is preserved when the file is regenerated
|
@@ -95,8 +94,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
95
94
|
apache-airflow-providers-standard = {workspace = true}
|
96
95
|
|
97
96
|
[project.urls]
|
98
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
99
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.
|
97
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1"
|
98
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/changelog.html"
|
100
99
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
101
100
|
"Source Code" = "https://github.com/apache/airflow"
|
102
101
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "4.8.
|
32
|
+
__version__ = "4.8.1"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.10.0"
|
@@ -26,7 +26,11 @@ import telegram
|
|
26
26
|
import tenacity
|
27
27
|
|
28
28
|
from airflow.exceptions import AirflowException
|
29
|
-
|
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]
|
30
34
|
|
31
35
|
|
32
36
|
class TelegramHook(BaseHook):
|
@@ -23,8 +23,8 @@ from collections.abc import Sequence
|
|
23
23
|
from typing import TYPE_CHECKING
|
24
24
|
|
25
25
|
from airflow.exceptions import AirflowException
|
26
|
-
from airflow.models import BaseOperator
|
27
26
|
from airflow.providers.telegram.hooks.telegram import TelegramHook
|
27
|
+
from airflow.providers.telegram.version_compat import BaseOperator
|
28
28
|
|
29
29
|
if TYPE_CHECKING:
|
30
30
|
try:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
3
|
+
# distributed with this work for additional information
|
4
|
+
# regarding copyright ownership. The ASF licenses this file
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
6
|
+
# "License"); you may not use this file except in compliance
|
7
|
+
# with the License. You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# NOTE! THIS FILE IS COPIED MANUALLY IN OTHER PROVIDERS DELIBERATELY TO AVOID ADDING UNNECESSARY
|
19
|
+
# DEPENDENCIES BETWEEN PROVIDERS. IF YOU WANT TO ADD CONDITIONAL CODE IN YOUR PROVIDER THAT DEPENDS
|
20
|
+
# ON AIRFLOW VERSION, PLEASE COPY THIS FILE TO THE ROOT PACKAGE OF YOUR PROVIDER AND IMPORT
|
21
|
+
# THOSE CONSTANTS FROM IT RATHER THAN IMPORTING THEM FROM ANOTHER PROVIDER OR TEST CODE
|
22
|
+
#
|
23
|
+
from __future__ import annotations
|
24
|
+
|
25
|
+
|
26
|
+
def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
27
|
+
from packaging.version import Version
|
28
|
+
|
29
|
+
from airflow import __version__
|
30
|
+
|
31
|
+
airflow_version = Version(__version__)
|
32
|
+
return airflow_version.major, airflow_version.minor, airflow_version.micro
|
33
|
+
|
34
|
+
|
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.sdk import BaseOperator
|
39
|
+
else:
|
40
|
+
from airflow.models import BaseOperator # type: ignore[no-redef]
|
41
|
+
|
42
|
+
__all__ = ["AIRFLOW_V_3_0_PLUS", "BaseOperator"]
|
@@ -26,10 +26,6 @@ import tenacity
|
|
26
26
|
import airflow
|
27
27
|
from airflow.models import Connection
|
28
28
|
from airflow.providers.telegram.hooks.telegram import TelegramHook
|
29
|
-
from airflow.utils import db
|
30
|
-
|
31
|
-
pytestmark = pytest.mark.db_test
|
32
|
-
|
33
29
|
|
34
30
|
TELEGRAM_TOKEN = "dummy token"
|
35
31
|
|
@@ -44,21 +40,22 @@ def telegram_error_side_effect(*args, **kwargs):
|
|
44
40
|
|
45
41
|
|
46
42
|
class TestTelegramHook:
|
47
|
-
|
48
|
-
|
43
|
+
@pytest.fixture(autouse=True)
|
44
|
+
def setup_connections(self, create_connection_without_db):
|
45
|
+
create_connection_without_db(
|
49
46
|
Connection(
|
50
47
|
conn_id="telegram-webhook-without-token",
|
51
48
|
conn_type="http",
|
52
49
|
)
|
53
50
|
)
|
54
|
-
|
51
|
+
create_connection_without_db(
|
55
52
|
Connection(
|
56
53
|
conn_id="telegram_default",
|
57
54
|
conn_type="http",
|
58
55
|
password=TELEGRAM_TOKEN,
|
59
56
|
)
|
60
57
|
)
|
61
|
-
|
58
|
+
create_connection_without_db(
|
62
59
|
Connection(
|
63
60
|
conn_id="telegram-webhook-with-chat_id",
|
64
61
|
conn_type="http",
|
@@ -71,8 +68,9 @@ class TestTelegramHook:
|
|
71
68
|
hook = TelegramHook()
|
72
69
|
|
73
70
|
assert hook.token == TELEGRAM_TOKEN
|
74
|
-
assert hook.chat_id
|
71
|
+
assert not hook.chat_id
|
75
72
|
|
73
|
+
@pytest.mark.db_test
|
76
74
|
def test_should_raise_exception_if_conn_id_doesnt_exist(self):
|
77
75
|
with pytest.raises(airflow.exceptions.AirflowNotFoundException) as ctx:
|
78
76
|
TelegramHook(telegram_conn_id="telegram-webhook-non-existent")
|
@@ -25,23 +25,21 @@ import telegram
|
|
25
25
|
import airflow
|
26
26
|
from airflow.models import Connection
|
27
27
|
from airflow.providers.telegram.operators.telegram import TelegramOperator
|
28
|
-
from airflow.utils import db
|
29
|
-
|
30
|
-
pytestmark = pytest.mark.db_test
|
31
28
|
|
32
29
|
TELEGRAM_TOKEN = "xxx:xxx"
|
33
30
|
|
34
31
|
|
35
32
|
class TestTelegramOperator:
|
36
|
-
|
37
|
-
|
33
|
+
@pytest.fixture(autouse=True)
|
34
|
+
def setup_connections(self, create_connection_without_db):
|
35
|
+
create_connection_without_db(
|
38
36
|
Connection(
|
39
37
|
conn_id="telegram_default",
|
40
38
|
conn_type="http",
|
41
39
|
password=TELEGRAM_TOKEN,
|
42
40
|
)
|
43
41
|
)
|
44
|
-
|
42
|
+
create_connection_without_db(
|
45
43
|
Connection(
|
46
44
|
conn_id="telegram_default-with-chat-id",
|
47
45
|
conn_type="http",
|
File without changes
|
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/commits.rst
RENAMED
File without changes
|
{apache_airflow_providers_telegram-4.8.0 → apache_airflow_providers_telegram-4.8.1}/docs/conf.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|