apache-airflow-providers-telegram 4.8.0rc1__py3-none-any.whl → 4.8.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.
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.8.0"
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
- from airflow.hooks.base import BaseHook
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"]
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-telegram
3
- Version: 4.8.0rc1
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.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,16 +15,15 @@ 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
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.staged.apache.org/docs/apache-airflow-providers-telegram/4.8.0/changelog.html
27
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-telegram/4.8.0
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.0``
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.0/>`_.
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.9,3.10,3.11,3.12
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.0/changelog.html>`_.
92
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-telegram/4.8.1/changelog.html>`_.
94
93
 
@@ -0,0 +1,12 @@
1
+ airflow/providers/telegram/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
+ airflow/providers/telegram/__init__.py,sha256=fGv-Vd5Xkzbcf5fPRENPTCX2gR-9FJ6X54UIiE6oqPc,1497
3
+ airflow/providers/telegram/get_provider_info.py,sha256=YiuVUvlgd3Nat0GtRfOS47eFUiDNB1vlpdK1BXNRsIs,2134
4
+ airflow/providers/telegram/version_compat.py,sha256=0VNFig0J24YH-32j11aTLlLRXdnHCmQHrNYkBXbOjx4,1727
5
+ airflow/providers/telegram/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
+ airflow/providers/telegram/hooks/telegram.py,sha256=R--Ku7gtTtyBG5m8W-K0MjZxjdAXtlQ9B-zSV9P0XG0,7024
7
+ airflow/providers/telegram/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
8
+ airflow/providers/telegram/operators/telegram.py,sha256=OEu62HtXLIVtKaWSgwspf48WqOg-Yjo2LRfsOUpLxPA,5107
9
+ apache_airflow_providers_telegram-4.8.1.dist-info/entry_points.txt,sha256=QbI_ZGIDTfpx3npCqi0CebJFs_NCjoG8Tn9dGkQDBkE,104
10
+ apache_airflow_providers_telegram-4.8.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
11
+ apache_airflow_providers_telegram-4.8.1.dist-info/METADATA,sha256=gSM73wWpEKpo0nlz_LeLQIsYIK_tD_nmGG1FLj7dY68,3848
12
+ apache_airflow_providers_telegram-4.8.1.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- airflow/providers/telegram/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/telegram/__init__.py,sha256=uievp1fx9nHi9IrjrIwFIJF2-47uEyd7EmrzEjQctY0,1497
3
- airflow/providers/telegram/get_provider_info.py,sha256=YiuVUvlgd3Nat0GtRfOS47eFUiDNB1vlpdK1BXNRsIs,2134
4
- airflow/providers/telegram/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
5
- airflow/providers/telegram/hooks/telegram.py,sha256=C-bxaDlvTugP5WZdxc30lqPOwd9fAn97ZbDG325P-Eo,6918
6
- airflow/providers/telegram/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
7
- airflow/providers/telegram/operators/telegram.py,sha256=4hJLqWw9OAwG9KpBC5AVBi5pVrUsjDQXMVG0spAabxo,5080
8
- apache_airflow_providers_telegram-4.8.0rc1.dist-info/entry_points.txt,sha256=QbI_ZGIDTfpx3npCqi0CebJFs_NCjoG8Tn9dGkQDBkE,104
9
- apache_airflow_providers_telegram-4.8.0rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
10
- apache_airflow_providers_telegram-4.8.0rc1.dist-info/METADATA,sha256=y7DAd4Rmhs3-Rjqmx07ivl5yzphvJutAGpADTTepC5A,3921
11
- apache_airflow_providers_telegram-4.8.0rc1.dist-info/RECORD,,