apache-airflow-providers-common-compat 1.8.0__tar.gz → 1.10.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.
Files changed (68) hide show
  1. apache_airflow_providers_common_compat-1.10.1/.pre-commit-config.yaml +32 -0
  2. apache_airflow_providers_common_compat-1.10.1/NOTICE +5 -0
  3. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/PKG-INFO +13 -9
  4. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/README.rst +5 -4
  5. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/changelog.rst +56 -2
  6. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/index.rst +6 -5
  7. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/provider.yaml +4 -1
  8. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/pyproject.toml +7 -5
  9. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/__init__.py +3 -3
  10. apache_airflow_providers_common_compat-1.10.1/src/airflow/providers/common/compat/connection/__init__.py +50 -0
  11. apache_airflow_providers_common_compat-1.10.1/src/airflow/providers/common/compat/lineage/hook.py +242 -0
  12. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/sdk.py +50 -0
  13. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/sqlalchemy/orm.py +1 -1
  14. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/version_compat.py +2 -2
  15. apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/connection/test_connection.py +69 -0
  16. apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/lineage/test_hook.py +997 -0
  17. apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/sqlalchemy/__init__.py +16 -0
  18. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/test__compat_utils.py +4 -4
  19. apache_airflow_providers_common_compat-1.8.0/src/airflow/providers/common/compat/lineage/hook.py +0 -88
  20. apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/lineage/test_hook.py +0 -52
  21. {apache_airflow_providers_common_compat-1.8.0/src/airflow/providers/common/compat → apache_airflow_providers_common_compat-1.10.1}/LICENSE +0 -0
  22. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/.latest-doc-only-change.txt +0 -0
  23. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/commits.rst +0 -0
  24. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/conf.py +0 -0
  25. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/installing-providers-from-sources.rst +0 -0
  26. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/docs/security.rst +0 -0
  27. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/__init__.py +0 -0
  28. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/__init__.py +0 -0
  29. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/__init__.py +0 -0
  30. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/_compat_utils.py +0 -0
  31. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/assets/__init__.py +0 -0
  32. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/check.py +0 -0
  33. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/get_provider_info.py +0 -0
  34. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/lineage/__init__.py +0 -0
  35. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/lineage/entities.py +0 -0
  36. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/notifier/__init__.py +0 -0
  37. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/__init__.py +0 -0
  38. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/check.py +0 -0
  39. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/facet.py +0 -0
  40. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/utils/__init__.py +0 -0
  41. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/utils/spark.py +0 -0
  42. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/utils/sql.py +0 -0
  43. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/openlineage/utils/utils.py +0 -0
  44. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/security/__init__.py +0 -0
  45. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/security/permissions.py +0 -0
  46. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/sqlalchemy/__init__.py +0 -0
  47. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/standard/__init__.py +0 -0
  48. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/standard/operators.py +0 -0
  49. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/standard/triggers.py +0 -0
  50. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/src/airflow/providers/common/compat/standard/utils.py +0 -0
  51. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/conftest.py +0 -0
  52. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/__init__.py +0 -0
  53. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/__init__.py +0 -0
  54. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/__init__.py +0 -0
  55. {apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/lineage → apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/connection}/__init__.py +0 -0
  56. {apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/openlineage → apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/lineage}/__init__.py +0 -0
  57. {apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/openlineage/utils → apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/openlineage}/__init__.py +0 -0
  58. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/openlineage/test_check.py +0 -0
  59. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/openlineage/test_facet.py +0 -0
  60. {apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/security → apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/openlineage/utils}/__init__.py +0 -0
  61. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/openlineage/utils/test_spark.py +0 -0
  62. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/openlineage/utils/test_sql.py +0 -0
  63. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/openlineage/utils/test_utils.py +0 -0
  64. {apache_airflow_providers_common_compat-1.8.0/tests/unit/common/compat/sqlalchemy → apache_airflow_providers_common_compat-1.10.1/tests/unit/common/compat/security}/__init__.py +0 -0
  65. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/security/test_permissions.py +0 -0
  66. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/sqlalchemy/test_orm.py +0 -0
  67. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/test_check.py +0 -0
  68. {apache_airflow_providers_common_compat-1.8.0 → apache_airflow_providers_common_compat-1.10.1}/tests/unit/common/compat/test_sdk.py +0 -0
@@ -0,0 +1,32 @@
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
+ default_stages: [pre-commit, pre-push]
19
+ minimum_prek_version: '0.2.0'
20
+ default_language_version:
21
+ python: python3
22
+ node: 22.19.0
23
+ golang: 1.24.0
24
+ repos:
25
+ - repo: local
26
+ hooks:
27
+ - id: check-common-compat-sdk-imports-in-sync
28
+ name: Check common.compat sdk TYPE_CHECKING matches runtime maps
29
+ language: python
30
+ files: ^src/airflow/providers/common/compat/sdk\.py$
31
+ pass_filenames: false
32
+ entry: ../../../scripts/ci/prek/check_common_compat_lazy_imports.py
@@ -0,0 +1,5 @@
1
+ Apache Airflow
2
+ Copyright 2016-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-common-compat
3
- Version: 1.8.0
3
+ Version: 1.10.1
4
4
  Summary: Provider package apache-airflow-providers-common-compat for Apache Airflow
5
5
  Keywords: airflow-provider,common.compat,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
8
  Requires-Python: >=3.10
9
9
  Description-Content-Type: text/x-rst
10
+ License-Expression: Apache-2.0
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: Web Environment
@@ -14,18 +15,20 @@ Classifier: Intended Audience :: Developers
14
15
  Classifier: Intended Audience :: System Administrators
15
16
  Classifier: Framework :: Apache Airflow
16
17
  Classifier: Framework :: Apache Airflow :: Provider
17
- Classifier: License :: OSI Approved :: Apache Software License
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: apache-airflow>=2.11.0
26
+ Requires-Dist: asgiref>=2.3.0
24
27
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
25
28
  Requires-Dist: apache-airflow-providers-standard ; extra == "standard"
26
29
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
27
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0/changelog.html
28
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0
30
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/changelog.html
31
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1
29
32
  Project-URL: Mastodon, https://fosstodon.org/@airflow
30
33
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
31
34
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -58,7 +61,7 @@ Provides-Extra: standard
58
61
 
59
62
  Package ``apache-airflow-providers-common-compat``
60
63
 
61
- Release: ``1.8.0``
64
+ Release: ``1.10.1``
62
65
 
63
66
 
64
67
  Common Compatibility Provider - providing compatibility code for previous Airflow versions
@@ -71,7 +74,7 @@ This is a provider package for ``common.compat`` provider. All classes for this
71
74
  are in ``airflow.providers.common.compat`` python package.
72
75
 
73
76
  You can find package information and changelog for the provider
74
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0/>`_.
77
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/>`_.
75
78
 
76
79
  Installation
77
80
  ------------
@@ -88,7 +91,8 @@ Requirements
88
91
  ================== ==================
89
92
  PIP package Version required
90
93
  ================== ==================
91
- ``apache-airflow`` ``>=2.10.0``
94
+ ``apache-airflow`` ``>=2.11.0``
95
+ ``asgiref`` ``>=2.3.0``
92
96
  ================== ==================
93
97
 
94
98
  Cross provider package dependencies
@@ -121,5 +125,5 @@ Extra Dependencies
121
125
  =============== ========================================
122
126
 
123
127
  The changelog for the provider package can be found in the
124
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0/changelog.html>`_.
128
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/changelog.html>`_.
125
129
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-common-compat``
25
25
 
26
- Release: ``1.8.0``
26
+ Release: ``1.10.1``
27
27
 
28
28
 
29
29
  Common Compatibility Provider - providing compatibility code for previous Airflow versions
@@ -36,7 +36,7 @@ This is a provider package for ``common.compat`` provider. All classes for this
36
36
  are in ``airflow.providers.common.compat`` 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-common-compat/1.8.0/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -53,7 +53,8 @@ Requirements
53
53
  ================== ==================
54
54
  PIP package Version required
55
55
  ================== ==================
56
- ``apache-airflow`` ``>=2.10.0``
56
+ ``apache-airflow`` ``>=2.11.0``
57
+ ``asgiref`` ``>=2.3.0``
57
58
  ================== ==================
58
59
 
59
60
  Cross provider package dependencies
@@ -86,4 +87,4 @@ Extra Dependencies
86
87
  =============== ========================================
87
88
 
88
89
  The changelog for the provider package can be found in the
89
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0/changelog.html>`_.
90
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/changelog.html>`_.
@@ -25,6 +25,62 @@
25
25
  Changelog
26
26
  ---------
27
27
 
28
+ 1.10.1
29
+ ......
30
+
31
+ Misc
32
+ ~~~~
33
+
34
+ * ``Add backcompat for exceptions in providers (#58727)``
35
+ * ``Move the traces and metrics code under a common observability package (#56187)``
36
+ * ``Bump minimum prek version to 0.2.0 (#58952)``
37
+
38
+ .. Below changes are excluded from the changelog. Move them to
39
+ appropriate section above if needed. Do not delete the lines(!):
40
+
41
+ 1.10.0
42
+ ......
43
+
44
+ .. note::
45
+ This release of provider is only available for Airflow 2.11+ as explained in the
46
+ Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>_.
47
+
48
+ Features
49
+ ~~~~~~~~
50
+
51
+ * ``Adjust compat HookLevelLineage for new add_extra method (#58057)``
52
+
53
+ Misc
54
+ ~~~~
55
+
56
+ * ``Move out some exceptions to TaskSDK (#54505)``
57
+ * ``Bump minimum Airflow version in providers to Airflow 2.11.0 (#58612)``
58
+
59
+ .. Below changes are excluded from the changelog. Move them to
60
+ appropriate section above if needed. Do not delete the lines(!):
61
+ * ``Updates to release process of providers (#58316)``
62
+
63
+ 1.9.0
64
+ .....
65
+
66
+ Features
67
+ ~~~~~~~~
68
+
69
+ * ``feat: backwards comp get async conn (#57143)``
70
+
71
+ Misc
72
+ ~~~~
73
+
74
+ * ``Convert all airflow distributions to be compliant with ASF requirements (#58138)``
75
+
76
+ .. Below changes are excluded from the changelog. Move them to
77
+ appropriate section above if needed. Do not delete the lines(!):
78
+ * ``Delete all unnecessary LICENSE Files (#58191)``
79
+ * ``Enable PT006 rule to 19 files in providers (cncf,common) (#57995)``
80
+ * ``Synchronize default versions in all split .pre-commit-config.yaml (#57851)``
81
+ * ``Fix mypy errors in 'common/compat' (#57759)``
82
+ * ``Extract prek hooks for Common.Compat provider (#57183)``
83
+
28
84
  1.8.0
29
85
  .....
30
86
 
@@ -246,8 +302,6 @@ Misc
246
302
  * ``Bumping common compat to 1.3.0 (#44728)``
247
303
  * ``Prevent __init__.py in providers from being modified (#44713)``
248
304
  * ``Fix accidental db tests in Task SDK (#44690)``
249
-
250
- .. Review and move the new changes to one of the sections above:
251
305
  * ``feat: automatically inject OL info into spark job in DataprocSubmitJobOperator (#44477)``
252
306
 
253
307
  1.2.2
@@ -62,7 +62,7 @@ apache-airflow-providers-common-compat package
62
62
  Common Compatibility Provider - providing compatibility code for previous Airflow versions
63
63
 
64
64
 
65
- Release: 1.8.0
65
+ Release: 1.10.1
66
66
 
67
67
  Provider package
68
68
  ----------------
@@ -80,12 +80,13 @@ For the minimum Airflow version supported, see ``Requirements`` below.
80
80
  Requirements
81
81
  ------------
82
82
 
83
- The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
83
+ The minimum Apache Airflow version supported by this provider distribution is ``2.11.0``.
84
84
 
85
85
  ================== ==================
86
86
  PIP package Version required
87
87
  ================== ==================
88
- ``apache-airflow`` ``>=2.10.0``
88
+ ``apache-airflow`` ``>=2.11.0``
89
+ ``asgiref`` ``>=2.3.0``
89
90
  ================== ==================
90
91
 
91
92
  Cross provider package dependencies
@@ -113,5 +114,5 @@ Downloading official packages
113
114
  You can download officially released packages and verify their checksums and signatures from the
114
115
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
115
116
 
116
- * `The apache-airflow-providers-common-compat 1.8.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0.tar.gz.sha512>`__)
117
- * `The apache-airflow-providers-common-compat 1.8.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.8.0-py3-none-any.whl.sha512>`__)
117
+ * `The apache-airflow-providers-common-compat 1.10.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1.tar.gz.sha512>`__)
118
+ * `The apache-airflow-providers-common-compat 1.10.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_compat-1.10.1-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,15 @@ description: |
22
22
  Common Compatibility Provider - providing compatibility code for previous Airflow versions
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1761112092
25
+ source-date-epoch: 1765298888
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
+ - 1.10.1
32
+ - 1.10.0
33
+ - 1.9.0
31
34
  - 1.8.0
32
35
  - 1.7.4
33
36
  - 1.7.3
@@ -25,9 +25,11 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-common-compat"
28
- version = "1.8.0"
28
+ version = "1.10.1"
29
29
  description = "Provider package apache-airflow-providers-common-compat for Apache Airflow"
30
30
  readme = "README.rst"
31
+ license = "Apache-2.0"
32
+ license-files = ['LICENSE', 'NOTICE']
31
33
  authors = [
32
34
  {name="Apache Software Foundation", email="dev@airflow.apache.org"},
33
35
  ]
@@ -43,7 +45,6 @@ classifiers = [
43
45
  "Intended Audience :: System Administrators",
44
46
  "Framework :: Apache Airflow",
45
47
  "Framework :: Apache Airflow :: Provider",
46
- "License :: OSI Approved :: Apache Software License",
47
48
  "Programming Language :: Python :: 3.10",
48
49
  "Programming Language :: Python :: 3.11",
49
50
  "Programming Language :: Python :: 3.12",
@@ -57,7 +58,8 @@ requires-python = ">=3.10"
57
58
  # Make sure to run ``prek update-providers-dependencies --all-files``
58
59
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
60
  dependencies = [
60
- "apache-airflow>=2.10.0",
61
+ "apache-airflow>=2.11.0",
62
+ "asgiref>=2.3.0",
61
63
  ]
62
64
 
63
65
  # The optional dependencies should be modified in place in the generated file
@@ -105,8 +107,8 @@ apache-airflow-providers-common-sql = {workspace = true}
105
107
  apache-airflow-providers-standard = {workspace = true}
106
108
 
107
109
  [project.urls]
108
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0"
109
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.8.0/changelog.html"
110
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1"
111
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.10.1/changelog.html"
110
112
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
111
113
  "Source Code" = "https://github.com/apache/airflow"
112
114
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "1.8.0"
32
+ __version__ = "1.10.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.10.0"
35
+ "2.11.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-common-compat:{__version__}` needs Apache Airflow 2.10.0+"
38
+ f"The package `apache-airflow-providers-common-compat:{__version__}` needs Apache Airflow 2.11.0+"
39
39
  )
@@ -0,0 +1,50 @@
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
+ from __future__ import annotations
19
+
20
+ import logging
21
+ from typing import TYPE_CHECKING
22
+
23
+ from airflow.providers.common.compat.sdk import BaseHook
24
+
25
+ if TYPE_CHECKING:
26
+ from airflow.providers.common.compat.sdk import Connection
27
+
28
+
29
+ log = logging.getLogger(__name__)
30
+
31
+
32
+ async def get_async_connection(conn_id: str) -> Connection:
33
+ """
34
+ Get an asynchronous Airflow connection that is backwards compatible.
35
+
36
+ :param conn_id: The provided connection ID.
37
+ :returns: Connection
38
+ """
39
+ from asgiref.sync import sync_to_async
40
+
41
+ if hasattr(BaseHook, "aget_connection"):
42
+ log.debug("Get connection using `BaseHook.aget_connection().")
43
+ return await BaseHook.aget_connection(conn_id=conn_id)
44
+ log.debug("Get connection using `BaseHook.get_connection().")
45
+ return await sync_to_async(BaseHook.get_connection)(conn_id=conn_id)
46
+
47
+
48
+ __all__ = [
49
+ "get_async_connection",
50
+ ]
@@ -0,0 +1,242 @@
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
+ from __future__ import annotations
18
+
19
+ from typing import TYPE_CHECKING
20
+
21
+ if TYPE_CHECKING:
22
+ from typing import Any
23
+
24
+ from airflow.lineage.hook import LineageContext
25
+
26
+
27
+ def _lacks_asset_methods(collector):
28
+ """Return True if the collector is missing any asset-related methods or properties."""
29
+ if ( # lazy evaluation, early return
30
+ hasattr(collector, "add_input_asset") # method
31
+ and hasattr(collector, "add_output_asset") # method
32
+ and hasattr(collector, "create_asset") # method
33
+ # If below we called hasattr(collector, "collected_assets") we'd call the property unnecessarily
34
+ and hasattr(type(collector), "collected_assets") # property
35
+ ):
36
+ return False
37
+
38
+ return True
39
+
40
+
41
+ def _lacks_add_extra_method(collector):
42
+ """Return True if the collector does not define an 'add_extra' method."""
43
+ # Method may be on class and attribute may be dynamically set on instance
44
+ if hasattr(collector, "add_extra") and hasattr(collector, "_extra"):
45
+ return False
46
+ return True
47
+
48
+
49
+ def _add_extra_polyfill(collector):
50
+ """
51
+ Add support for `add_extra` method to collector that may be lacking it (e.g., Airflow versions < 3.2.).
52
+
53
+ This polyfill adds the `add_extra` method to a class, modifies `collected_assets` and `has_collected`
54
+ properties and sets `_extra` and `_extra_counts` attributes on instance if not already there.
55
+
56
+ This function should be called after renaming on collectors that have `collected_assets` method,
57
+ so f.e. for Airflow 2 it should happen after renaming from dataset to asset.
58
+ """
59
+ import hashlib
60
+ import json
61
+ from collections import defaultdict
62
+
63
+ import attr
64
+
65
+ from airflow.lineage.hook import HookLineage as _BaseHookLineage
66
+
67
+ # Add `extra` to HookLineage returned by `collected_assets` property
68
+ @attr.define
69
+ class ExtraLineageInfo:
70
+ """
71
+ Holds lineage information for arbitrary non-asset metadata.
72
+
73
+ This class represents additional lineage context captured during a hook execution that is not
74
+ associated with a specific asset. It includes the metadata payload itself, the count of
75
+ how many times it has been encountered, and the context in which it was encountered.
76
+ """
77
+
78
+ key: str
79
+ value: Any
80
+ count: int
81
+ context: LineageContext
82
+
83
+ @attr.define
84
+ class HookLineage(_BaseHookLineage):
85
+ # mypy is not happy, as base class is using other ExtraLineageInfo, but this code will never
86
+ # run on AF3.2, where this other one is used, so this is fine - we can ignore.
87
+ extra: list[ExtraLineageInfo] = attr.field(factory=list) # type: ignore[assignment]
88
+
89
+ # Initialize extra tracking attributes on this collector instance
90
+ collector._extra = {}
91
+ collector._extra_counts = defaultdict(int)
92
+
93
+ # Overwrite the `collected_assets` property on a class
94
+ _original_collected_assets = collector.__class__.collected_assets
95
+
96
+ def _compat_collected_assets(self) -> HookLineage:
97
+ """Get the collected hook lineage information."""
98
+ # Defensive check since we patch the class property, but initialized _extra only on this instance.
99
+ if not hasattr(self, "_extra"):
100
+ self._extra = {}
101
+ if not hasattr(self, "_extra_counts"):
102
+ self._extra_counts = defaultdict(int)
103
+
104
+ # call the original `collected_assets` getter
105
+ lineage = _original_collected_assets.fget(self)
106
+ extra_list = [
107
+ ExtraLineageInfo(
108
+ key=key,
109
+ value=value,
110
+ count=self._extra_counts[count_key],
111
+ context=context,
112
+ )
113
+ for count_key, (key, value, context) in self._extra.items()
114
+ ]
115
+ return HookLineage(
116
+ inputs=lineage.inputs,
117
+ outputs=lineage.outputs,
118
+ extra=extra_list,
119
+ )
120
+
121
+ type(collector).collected_assets = property(_compat_collected_assets)
122
+
123
+ # Overwrite the `has_collected` property on a class
124
+ _original_has_collected = collector.__class__.has_collected
125
+
126
+ def _compat_has_collected(self) -> bool:
127
+ # Defensive check since we patch the class property, but initialized _extra only on this instance.
128
+ if not hasattr(self, "_extra"):
129
+ self._extra = {}
130
+ # call the original `has_collected` getter
131
+ has_collected = _original_has_collected.fget(self)
132
+ return bool(has_collected or self._extra)
133
+
134
+ type(collector).has_collected = property(_compat_has_collected)
135
+
136
+ # Add `add_extra` method on the class
137
+ def _compat_add_extra(self, context, key, value):
138
+ """Add extra information for older Airflow versions."""
139
+ _max_collected_extra = 200
140
+
141
+ if len(self._extra) >= _max_collected_extra:
142
+ if hasattr(self, "log"):
143
+ self.log.debug("Maximum number of extra exceeded. Skipping.")
144
+ return
145
+
146
+ if not key or not value:
147
+ if hasattr(self, "log"):
148
+ self.log.debug("Missing required parameter: both 'key' and 'value' must be provided.")
149
+ return
150
+
151
+ # Defensive check since we patch the class property, but initialized _extra only on this instance.
152
+ if not hasattr(self, "_extra"):
153
+ self._extra = {}
154
+ if not hasattr(self, "_extra_counts"):
155
+ self._extra_counts = defaultdict(int)
156
+
157
+ extra_str = json.dumps(value, sort_keys=True, default=str)
158
+ value_hash = hashlib.md5(extra_str.encode()).hexdigest()
159
+ entry_id = f"{key}_{value_hash}_{id(context)}"
160
+ if entry_id not in self._extra:
161
+ self._extra[entry_id] = (key, value, context)
162
+ self._extra_counts[entry_id] += 1
163
+
164
+ if len(self._extra) == _max_collected_extra:
165
+ if hasattr(self, "log"):
166
+ self.log.warning("Maximum number of extra exceeded. Skipping subsequent inputs.")
167
+
168
+ type(collector).add_extra = _compat_add_extra
169
+ return collector
170
+
171
+
172
+ def _add_asset_naming_compatibility_layer(collector):
173
+ """
174
+ Handle AF 2.x compatibility for dataset -> asset terminology rename.
175
+
176
+ This is only called for AF 2.x where we need to provide asset-named methods
177
+ that wrap the underlying dataset methods.
178
+ """
179
+ from functools import wraps
180
+
181
+ from airflow.lineage.hook import DatasetLineageInfo, HookLineage
182
+
183
+ DatasetLineageInfo.asset = DatasetLineageInfo.dataset
184
+
185
+ def rename_asset_kwargs_to_dataset_kwargs(function):
186
+ @wraps(function)
187
+ def wrapper(*args, **kwargs):
188
+ if "asset_kwargs" in kwargs:
189
+ kwargs["dataset_kwargs"] = kwargs.pop("asset_kwargs")
190
+
191
+ if "asset_extra" in kwargs:
192
+ kwargs["dataset_extra"] = kwargs.pop("asset_extra")
193
+
194
+ return function(*args, **kwargs)
195
+
196
+ return wrapper
197
+
198
+ collector.create_asset = rename_asset_kwargs_to_dataset_kwargs(collector.create_dataset)
199
+ collector.add_input_asset = rename_asset_kwargs_to_dataset_kwargs(collector.add_input_dataset)
200
+ collector.add_output_asset = rename_asset_kwargs_to_dataset_kwargs(collector.add_output_dataset)
201
+
202
+ def _compat_collected_assets(self) -> HookLineage:
203
+ """Get the collected hook lineage information."""
204
+ lineage = self.collected_datasets
205
+ return HookLineage(
206
+ [
207
+ DatasetLineageInfo(dataset=item.dataset, count=item.count, context=item.context)
208
+ for item in lineage.inputs
209
+ ],
210
+ [
211
+ DatasetLineageInfo(dataset=item.dataset, count=item.count, context=item.context)
212
+ for item in lineage.outputs
213
+ ],
214
+ )
215
+
216
+ type(collector).collected_assets = property(_compat_collected_assets)
217
+ return collector
218
+
219
+
220
+ def get_hook_lineage_collector():
221
+ """
222
+ Return a hook lineage collector with all required compatibility layers applied.
223
+
224
+ Compatibility is determined by inspecting the collector's available methods and
225
+ properties (duck typing), rather than relying on the Airflow version number.
226
+
227
+ Behavior by example:
228
+ Airflow 2: Collector is missing asset-based methods and `add_extra` - apply both layers.
229
+ Airflow 3.0–3.1: Collector has asset-based methods but lacks `add_extra` - apply single layer.
230
+ Airflow 3.2+: Collector has asset-based methods and `add_extra` support - no action required.
231
+ """
232
+ from airflow.lineage.hook import get_hook_lineage_collector as get_global_collector
233
+
234
+ global_collector = get_global_collector()
235
+
236
+ if _lacks_asset_methods(global_collector):
237
+ global_collector = _add_asset_naming_compatibility_layer(global_collector)
238
+
239
+ if _lacks_add_extra_method(global_collector):
240
+ global_collector = _add_extra_polyfill(global_collector)
241
+
242
+ return global_collector