apache-airflow-providers-git 0.0.4__py3-none-any.whl → 0.0.5__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__ = "0.0.4"
32
+ __version__ = "0.0.5"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "3.0.0"
@@ -80,17 +80,14 @@ class GitDagBundle(BaseDagBundle):
80
80
 
81
81
  self._log.debug("bundle configured")
82
82
  self.hook: GitHook | None = None
83
- if not repo_url:
84
- if not git_conn_id:
85
- self._log.debug("Neither git_conn_id nor repo_url provided; loading 'git_default'")
86
- git_conn_id = "git_default"
87
- try:
88
- self.hook = GitHook(git_conn_id=git_conn_id)
89
- except AirflowException as e:
90
- self._log.warning("Could not create GitHook", conn_id=git_conn_id, exc=e)
91
- else:
92
- self.repo_url = self.hook.repo_url
93
- self._log.debug("repo_url updated from hook")
83
+ try:
84
+ self.hook = GitHook(git_conn_id=git_conn_id or "git_default")
85
+ except AirflowException as e:
86
+ self._log.warning("Could not create GitHook", conn_id=git_conn_id, exc=e)
87
+
88
+ if not repo_url and self.hook and self.hook.repo_url:
89
+ self.repo_url = self.hook.repo_url
90
+ self._log.debug("repo_url updated from hook")
94
91
 
95
92
  def _initialize(self):
96
93
  with self.lock():
@@ -25,11 +25,7 @@ import tempfile
25
25
  from typing import Any
26
26
 
27
27
  from airflow.exceptions import AirflowException
28
-
29
- try:
30
- from airflow.sdk import BaseHook
31
- except ImportError:
32
- from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
28
+ from airflow.providers.git.version_compat import BaseHook
33
29
 
34
30
  log = logging.getLogger(__name__)
35
31
 
@@ -0,0 +1,43 @@
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
+ AIRFLOW_V_3_1_PLUS: bool = get_base_airflow_version_tuple() >= (3, 1, 0)
37
+
38
+ if AIRFLOW_V_3_1_PLUS:
39
+ from airflow.sdk import BaseHook
40
+ else:
41
+ from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
42
+
43
+ __all__ = ["AIRFLOW_V_3_0_PLUS", "AIRFLOW_V_3_1_PLUS", "BaseHook"]
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-git
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Provider package apache-airflow-providers-git for Apache Airflow
5
5
  Keywords: airflow-provider,git,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.10
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
@@ -18,12 +18,13 @@ 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
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: System :: Monitoring
22
23
  Requires-Dist: apache-airflow>=3.0.0
23
24
  Requires-Dist: GitPython>=3.1.44
24
25
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
25
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html
26
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4
26
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/changelog.html
27
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5
27
28
  Project-URL: Mastodon, https://fosstodon.org/@airflow
28
29
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
29
30
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -54,8 +55,9 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
54
55
 
55
56
  Package ``apache-airflow-providers-git``
56
57
 
57
- Release: ``0.0.4``
58
+ Release: ``0.0.5``
58
59
 
60
+ Release Date: ``|PypiReleaseDate|``
59
61
 
60
62
  `Distributed version control system (GIT) <https://git-scm.com/>`__
61
63
 
@@ -67,7 +69,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
67
69
  are in ``airflow.providers.git`` python package.
68
70
 
69
71
  You can find package information and changelog for the provider
70
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/>`_.
72
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/>`_.
71
73
 
72
74
  Installation
73
75
  ------------
@@ -76,7 +78,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
76
78
  for the minimum Airflow version supported) via
77
79
  ``pip install apache-airflow-providers-git``
78
80
 
79
- The package supports the following python versions: 3.10,3.11,3.12
81
+ The package supports the following python versions: 3.10,3.11,3.12,3.13
80
82
 
81
83
  Requirements
82
84
  ------------
@@ -89,5 +91,5 @@ PIP package Version required
89
91
  ================== ==================
90
92
 
91
93
  The changelog for the provider package can be found in the
92
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html>`_.
94
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/changelog.html>`_.
93
95
 
@@ -0,0 +1,12 @@
1
+ airflow/providers/git/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
+ airflow/providers/git/__init__.py,sha256=LytQEoDGDmL4nM2KzAS1qCi7P-FwENMzaakAVXkFzgg,1490
3
+ airflow/providers/git/get_provider_info.py,sha256=6xC_Jru3CMrhO7r5aX03J4HR6Jl62rp9BWVcLKFjxQQ,1809
4
+ airflow/providers/git/version_compat.py,sha256=wu5478Lfl32vjsmb_tx5zQBL2aVynAVK26XqF-5Wou0,1827
5
+ airflow/providers/git/bundles/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
6
+ airflow/providers/git/bundles/git.py,sha256=WmmfqV3AW85wAXwH_pTXqVYJiW-DZACw3qYRGdYo6N4,9436
7
+ airflow/providers/git/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
8
+ airflow/providers/git/hooks/git.py,sha256=UxH-hPlmX1VphZey1svhJYUhgK1zEWsryh363k_s008,4016
9
+ apache_airflow_providers_git-0.0.5.dist-info/entry_points.txt,sha256=k9QR9MAaAm9yDsRDBIK3QOt5Fos3fBCqCngNFPaJnKs,99
10
+ apache_airflow_providers_git-0.0.5.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
11
+ apache_airflow_providers_git-0.0.5.dist-info/METADATA,sha256=WXZTTGM7l_TAp26I4aFx1venY5oXOfry_qWyTI_PyOg,3878
12
+ apache_airflow_providers_git-0.0.5.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- airflow/providers/git/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/git/__init__.py,sha256=GNgvOvFq1VVuHjd_eMLqTxC74atW0WCKmAXFgSUcIpY,1490
3
- airflow/providers/git/get_provider_info.py,sha256=6xC_Jru3CMrhO7r5aX03J4HR6Jl62rp9BWVcLKFjxQQ,1809
4
- airflow/providers/git/bundles/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
- airflow/providers/git/bundles/git.py,sha256=vYerC80phtGd26P2Jv8VxxL3kj4liW8UM2mbgdOELZI,9599
6
- airflow/providers/git/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
7
- airflow/providers/git/hooks/git.py,sha256=K9EzOZ3vIbiP57IgAJHwNDsHvqkguCX24w3m1t4bZ9o,4104
8
- apache_airflow_providers_git-0.0.4.dist-info/entry_points.txt,sha256=k9QR9MAaAm9yDsRDBIK3QOt5Fos3fBCqCngNFPaJnKs,99
9
- apache_airflow_providers_git-0.0.4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
10
- apache_airflow_providers_git-0.0.4.dist-info/METADATA,sha256=W2ctalSeoROJTFTrkLUHXU5doW5vBY3fReAqc5Qjh3U,3786
11
- apache_airflow_providers_git-0.0.4.dist-info/RECORD,,