apache-airflow-providers-git 0.0.4rc1__tar.gz → 0.0.5__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 (30) hide show
  1. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/PKG-INFO +11 -9
  2. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/README.rst +5 -4
  3. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/changelog.rst +20 -0
  4. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/index.rst +3 -1
  5. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/provider.yaml +2 -1
  6. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/pyproject.toml +6 -5
  7. {apache_airflow_providers_git-0.0.4rc1/src/airflow/providers → apache_airflow_providers_git-0.0.5/src/airflow}/__init__.py +1 -2
  8. {apache_airflow_providers_git-0.0.4rc1/src/airflow → apache_airflow_providers_git-0.0.5/src/airflow/providers}/__init__.py +1 -2
  9. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/__init__.py +1 -1
  10. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/bundles/git.py +8 -11
  11. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/hooks/git.py +1 -5
  12. apache_airflow_providers_git-0.0.5/src/airflow/providers/git/version_compat.py +43 -0
  13. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/git/bundles/test_git.py +27 -0
  14. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/.latest-doc-only-change.txt +0 -0
  15. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/bundles/index.rst +0 -0
  16. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/commits.rst +0 -0
  17. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/conf.py +0 -0
  18. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/connections/git.rst +0 -0
  19. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/installing-providers-from-sources.rst +0 -0
  20. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/docs/security.rst +0 -0
  21. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/LICENSE +0 -0
  22. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/bundles/__init__.py +0 -0
  23. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/get_provider_info.py +0 -0
  24. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/src/airflow/providers/git/hooks/__init__.py +0 -0
  25. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/conftest.py +0 -0
  26. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/__init__.py +0 -0
  27. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/git/__init__.py +0 -0
  28. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/git/bundles/__init__.py +0 -0
  29. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/git/hooks/__init__.py +0 -0
  30. {apache_airflow_providers_git-0.0.4rc1 → apache_airflow_providers_git-0.0.5}/tests/unit/git/hooks/test_git.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-git
3
- Version: 0.0.4rc1
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
- Requires-Dist: apache-airflow>=3.0.0rc1
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.staged.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html
26
- Project-URL: Documentation, https://airflow.staged.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
 
@@ -23,8 +23,9 @@
23
23
 
24
24
  Package ``apache-airflow-providers-git``
25
25
 
26
- Release: ``0.0.4``
26
+ Release: ``0.0.5``
27
27
 
28
+ Release Date: ``|PypiReleaseDate|``
28
29
 
29
30
  `Distributed version control system (GIT) <https://git-scm.com/>`__
30
31
 
@@ -36,7 +37,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
36
37
  are in ``airflow.providers.git`` python package.
37
38
 
38
39
  You can find package information and changelog for the provider
39
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/>`_.
40
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/>`_.
40
41
 
41
42
  Installation
42
43
  ------------
@@ -45,7 +46,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
45
46
  for the minimum Airflow version supported) via
46
47
  ``pip install apache-airflow-providers-git``
47
48
 
48
- The package supports the following python versions: 3.10,3.11,3.12
49
+ The package supports the following python versions: 3.10,3.11,3.12,3.13
49
50
 
50
51
  Requirements
51
52
  ------------
@@ -58,4 +59,4 @@ PIP package Version required
58
59
  ================== ==================
59
60
 
60
61
  The changelog for the provider package can be found in the
61
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html>`_.
62
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/changelog.html>`_.
@@ -15,6 +15,26 @@
15
15
  specific language governing permissions and limitations
16
16
  under the License.
17
17
 
18
+ 0.0.5
19
+ .....
20
+
21
+ Bug Fixes
22
+ ~~~~~~~~~
23
+
24
+ * ``fix: always create GitHook even when 'repo_url' is provided (#52897)``
25
+
26
+ Misc
27
+ ~~~~
28
+
29
+ * ``Add Python 3.13 support for Airflow. (#46891)``
30
+ * ``Remove type ignore across codebase after mypy upgrade (#53243)``
31
+ * ``Remove upper-binding for "python-requires" (#52980)``
32
+ * ``Temporarily switch to use >=,< pattern instead of '~=' (#52967)``
33
+ * ``Moving BaseHook usages to version_compat for git (#52944)``
34
+
35
+ .. Below changes are excluded from the changelog. Move them to
36
+ appropriate section above if needed. Do not delete the lines(!):
37
+
18
38
  0.0.4
19
39
  .....
20
40
 
@@ -72,7 +72,9 @@ apache-airflow-providers-git package
72
72
  `Distributed version control system (GIT) <https://git-scm.com/>`__
73
73
 
74
74
 
75
- Release: 0.0.4
75
+ Release: 0.0.5
76
+
77
+ Release Date: ``|PypiReleaseDate|``
76
78
 
77
79
  Provider package
78
80
  ----------------
@@ -22,12 +22,13 @@ description: |
22
22
  `Distributed version control system (GIT) <https://git-scm.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1751473455
25
+ source-date-epoch: 1753690739
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
+ - 0.0.5
31
32
  - 0.0.4
32
33
  - 0.0.3
33
34
  - 0.0.2
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-git"
28
- version = "0.0.4rc1"
28
+ version = "0.0.5"
29
29
  description = "Provider package apache-airflow-providers-git for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -47,16 +47,17 @@ classifiers = [
47
47
  "Programming Language :: Python :: 3.10",
48
48
  "Programming Language :: Python :: 3.11",
49
49
  "Programming Language :: Python :: 3.12",
50
+ "Programming Language :: Python :: 3.13",
50
51
  "Topic :: System :: Monitoring",
51
52
  ]
52
- requires-python = "~=3.10"
53
+ requires-python = ">=3.10"
53
54
 
54
55
  # The dependencies should be modified in place in the generated file.
55
56
  # Any change in the dependencies is preserved when the file is regenerated
56
57
  # Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
57
58
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
58
59
  dependencies = [
59
- "apache-airflow>=3.0.0rc1",
60
+ "apache-airflow>=3.0.0",
60
61
  "GitPython>=3.1.44",
61
62
  ]
62
63
 
@@ -94,8 +95,8 @@ apache-airflow-providers-common-sql = {workspace = true}
94
95
  apache-airflow-providers-standard = {workspace = true}
95
96
 
96
97
  [project.urls]
97
- "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-git/0.0.4"
98
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html"
98
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5"
99
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.5/changelog.html"
99
100
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
100
101
  "Source Code" = "https://github.com/apache/airflow"
101
102
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -14,5 +14,4 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
-
18
- __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
17
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -14,5 +14,4 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
-
18
- __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
17
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -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"]
@@ -20,6 +20,7 @@ from __future__ import annotations
20
20
  import json
21
21
  import os
22
22
  import re
23
+ import types
23
24
  from unittest import mock
24
25
  from unittest.mock import patch
25
26
 
@@ -602,3 +603,29 @@ class TestGitDagBundle:
602
603
  repo_url=repo_url,
603
604
  )
604
605
  assert bundle.repo_url == expected
606
+
607
+ @mock.patch("airflow.providers.git.bundles.git.Repo")
608
+ def test_clone_passes_env_from_githook(self, mock_gitRepo):
609
+ def _fake_clone_from(*_, **kwargs):
610
+ if "env" not in kwargs:
611
+ raise GitCommandError("git", 128, "Permission denied")
612
+ return types.SimpleNamespace()
613
+
614
+ EXPECTED_ENV = {"GIT_SSH_COMMAND": "ssh -i /id_rsa -o StrictHostKeyChecking=no"}
615
+
616
+ mock_gitRepo.clone_from.side_effect = _fake_clone_from
617
+ mock_gitRepo.return_value = types.SimpleNamespace()
618
+
619
+ with mock.patch("airflow.providers.git.bundles.git.GitHook") as mock_githook:
620
+ mock_githook.return_value.repo_url = "git@github.com:apache/airflow.git"
621
+ mock_githook.return_value.env = EXPECTED_ENV
622
+
623
+ bundle = GitDagBundle(
624
+ name="my_repo",
625
+ git_conn_id="git_default",
626
+ repo_url="git@github.com:apache/airflow.git",
627
+ tracking_ref="main",
628
+ )
629
+ bundle._clone_bare_repo_if_required()
630
+ _, kwargs = mock_gitRepo.clone_from.call_args
631
+ assert kwargs["env"] == EXPECTED_ENV