apache-airflow-providers-git 0.0.3rc1__tar.gz → 0.0.4rc1__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.

Potentially problematic release.


This version of apache-airflow-providers-git might be problematic. Click here for more details.

Files changed (29) hide show
  1. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/PKG-INFO +8 -9
  2. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/README.rst +4 -4
  3. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/bundles/index.rst +1 -1
  4. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/changelog.rst +19 -0
  5. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/index.rst +1 -1
  6. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/provider.yaml +2 -1
  7. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/pyproject.toml +4 -5
  8. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/__init__.py +1 -1
  9. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/hooks/git.py +5 -1
  10. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/git/bundles/test_git.py +32 -28
  11. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/git/hooks/test_git.py +12 -15
  12. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/.latest-doc-only-change.txt +0 -0
  13. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/commits.rst +0 -0
  14. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/conf.py +0 -0
  15. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/connections/git.rst +0 -0
  16. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/installing-providers-from-sources.rst +0 -0
  17. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/docs/security.rst +0 -0
  18. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/__init__.py +0 -0
  19. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/__init__.py +0 -0
  20. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/LICENSE +0 -0
  21. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/bundles/__init__.py +0 -0
  22. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/bundles/git.py +0 -0
  23. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/get_provider_info.py +0 -0
  24. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/src/airflow/providers/git/hooks/__init__.py +0 -0
  25. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/conftest.py +0 -0
  26. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/__init__.py +0 -0
  27. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/git/__init__.py +0 -0
  28. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/git/bundles/__init__.py +0 -0
  29. {apache_airflow_providers_git-0.0.3rc1 → apache_airflow_providers_git-0.0.4rc1}/tests/unit/git/hooks/__init__.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-git
3
- Version: 0.0.3rc1
3
+ Version: 0.0.4rc1
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.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,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>=3.0.0rc1
24
23
  Requires-Dist: GitPython>=3.1.44
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-git/0.0.3/changelog.html
27
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-git/0.0.3
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
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-git``
57
56
 
58
- Release: ``0.0.3``
57
+ Release: ``0.0.4``
59
58
 
60
59
 
61
60
  `Distributed version control system (GIT) <https://git-scm.com/>`__
@@ -68,7 +67,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
68
67
  are in ``airflow.providers.git`` 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-git/0.0.3/>`_.
70
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/>`_.
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-git``
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-git/0.0.3/changelog.html>`_.
92
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html>`_.
94
93
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-git``
25
25
 
26
- Release: ``0.0.3``
26
+ Release: ``0.0.4``
27
27
 
28
28
 
29
29
  `Distributed version control system (GIT) <https://git-scm.com/>`__
@@ -36,7 +36,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
36
36
  are in ``airflow.providers.git`` 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-git/0.0.3/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/>`_.
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-git``
47
47
 
48
- The package supports the following python versions: 3.9,3.10,3.11,3.12
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-git/0.0.3/changelog.html>`_.
61
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.4/changelog.html>`_.
@@ -16,7 +16,7 @@
16
16
  under the License.
17
17
 
18
18
  Bundles
19
- =======
19
+ #######
20
20
 
21
21
  Use the :class:`~airflow.providers.git.bundles.git.GitDagBundle` to configure a Git bundle in your Airflow's
22
22
  ``[dag_processor] dag_bundle_config_list``.
@@ -15,6 +15,25 @@
15
15
  specific language governing permissions and limitations
16
16
  under the License.
17
17
 
18
+ 0.0.4
19
+ .....
20
+
21
+ Misc
22
+ ~~~~
23
+
24
+ * ``Move 'BaseHook' implementation to task SDK (#51873)``
25
+ * ``Drop support for Python 3.9 (#52072)``
26
+
27
+ Doc-only
28
+ ~~~~~~~~
29
+
30
+ * ``Minor pre-commit fixes (#51769)``
31
+
32
+ .. Below changes are excluded from the changelog. Move them to
33
+ appropriate section above if needed. Do not delete the lines(!):
34
+ * ``Remove pytest.mark.db_test: Git (#52035)``
35
+ * ``Introducing fixture to create 'Connections' without DB in provider tests (#51930)``
36
+
18
37
  0.0.3
19
38
  .....
20
39
 
@@ -72,7 +72,7 @@ apache-airflow-providers-git package
72
72
  `Distributed version control system (GIT) <https://git-scm.com/>`__
73
73
 
74
74
 
75
- Release: 0.0.3
75
+ Release: 0.0.4
76
76
 
77
77
  Provider package
78
78
  ----------------
@@ -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: 1749926358
25
+ source-date-epoch: 1751473455
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.4
31
32
  - 0.0.3
32
33
  - 0.0.2
33
34
  - 0.0.1
@@ -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.3rc1"
28
+ version = "0.0.4rc1"
29
29
  description = "Provider package apache-airflow-providers-git 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.9"
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.staged.apache.org/docs/apache-airflow-providers-git/0.0.3"
99
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-git/0.0.3/changelog.html"
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"
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__ = "0.0.3"
32
+ __version__ = "0.0.4"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "3.0.0"
@@ -25,7 +25,11 @@ import tempfile
25
25
  from typing import Any
26
26
 
27
27
  from airflow.exceptions import AirflowException
28
- from airflow.hooks.base import BaseHook
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]
29
33
 
30
34
  log = logging.getLogger(__name__)
31
35
 
@@ -32,12 +32,8 @@ from airflow.exceptions import AirflowException
32
32
  from airflow.models import Connection
33
33
  from airflow.providers.git.bundles.git import GitDagBundle
34
34
  from airflow.providers.git.hooks.git import GitHook
35
- from airflow.utils import db
36
35
 
37
36
  from tests_common.test_utils.config import conf_vars
38
- from tests_common.test_utils.db import clear_db_connections
39
-
40
- pytestmark = pytest.mark.db_test
41
37
 
42
38
 
43
39
  @pytest.fixture(autouse=True)
@@ -71,18 +67,23 @@ def git_repo(tmp_path_factory):
71
67
  class TestGitDagBundle:
72
68
  @classmethod
73
69
  def teardown_class(cls) -> None:
74
- clear_db_connections()
70
+ return
75
71
 
76
- @classmethod
77
- def setup_class(cls) -> None:
78
- db.merge_conn(
72
+ # TODO: Potential performance issue, converted setup_class to a setup_connections function level fixture
73
+ @pytest.fixture(autouse=True)
74
+ def setup_connections(self, create_connection_without_db, request):
75
+ # Skip setup for tests that need to create their own connections
76
+ if request.function.__name__ in ["test_view_url", "test_view_url_subdir"]:
77
+ return
78
+
79
+ create_connection_without_db(
79
80
  Connection(
80
81
  conn_id="git_default",
81
82
  host="git@github.com:apache/airflow.git",
82
83
  conn_type="git",
83
84
  )
84
85
  )
85
- db.merge_conn(
86
+ create_connection_without_db(
86
87
  Connection(
87
88
  conn_id=CONN_HTTPS,
88
89
  host=AIRFLOW_HTTPS_URL,
@@ -90,7 +91,7 @@ class TestGitDagBundle:
90
91
  conn_type="git",
91
92
  )
92
93
  )
93
- db.merge_conn(
94
+ create_connection_without_db(
94
95
  Connection(
95
96
  conn_id=CONN_NO_REPO_URL,
96
97
  conn_type="git",
@@ -410,16 +411,17 @@ class TestGitDagBundle:
410
411
  ],
411
412
  )
412
413
  @mock.patch("airflow.providers.git.bundles.git.Repo")
413
- def test_view_url(self, mock_gitrepo, repo_url, extra_conn_kwargs, expected_url, session):
414
- session.query(Connection).delete()
415
- conn = Connection(
416
- conn_id="my_git_connection",
417
- host=repo_url,
418
- conn_type="git",
419
- **(extra_conn_kwargs or {}),
414
+ def test_view_url(
415
+ self, mock_gitrepo, repo_url, extra_conn_kwargs, expected_url, create_connection_without_db
416
+ ):
417
+ create_connection_without_db(
418
+ Connection(
419
+ conn_id="my_git_connection",
420
+ host=repo_url,
421
+ conn_type="git",
422
+ **(extra_conn_kwargs or {}),
423
+ )
420
424
  )
421
- session.add(conn)
422
- session.commit()
423
425
  bundle = GitDagBundle(
424
426
  name="test",
425
427
  git_conn_id="my_git_connection",
@@ -497,16 +499,17 @@ class TestGitDagBundle:
497
499
  ],
498
500
  )
499
501
  @mock.patch("airflow.providers.git.bundles.git.Repo")
500
- def test_view_url_subdir(self, mock_gitrepo, repo_url, extra_conn_kwargs, expected_url, session):
501
- session.query(Connection).delete()
502
- conn = Connection(
503
- conn_id="git_default",
504
- host=repo_url,
505
- conn_type="git",
506
- **(extra_conn_kwargs or {}),
502
+ def test_view_url_subdir(
503
+ self, mock_gitrepo, repo_url, extra_conn_kwargs, expected_url, create_connection_without_db
504
+ ):
505
+ create_connection_without_db(
506
+ Connection(
507
+ conn_id="git_default",
508
+ host=repo_url,
509
+ conn_type="git",
510
+ **(extra_conn_kwargs or {}),
511
+ )
507
512
  )
508
- session.add(conn)
509
- session.commit()
510
513
  bundle = GitDagBundle(
511
514
  name="test",
512
515
  tracking_ref="main",
@@ -554,6 +557,7 @@ class TestGitDagBundle:
554
557
 
555
558
  assert "Repository path: %s not found" in str(exc_info.value)
556
559
 
560
+ @pytest.mark.db_test
557
561
  @patch.dict(os.environ, {"AIRFLOW_CONN_MY_TEST_GIT": '{"host": "something"}'})
558
562
  @pytest.mark.parametrize(
559
563
  "conn_id, expected_hook_type",
@@ -25,12 +25,8 @@ from git import Repo
25
25
  from airflow.exceptions import AirflowException
26
26
  from airflow.models import Connection
27
27
  from airflow.providers.git.hooks.git import GitHook
28
- from airflow.utils import db
29
28
 
30
29
  from tests_common.test_utils.config import conf_vars
31
- from tests_common.test_utils.db import clear_db_connections
32
-
33
- pytestmark = pytest.mark.db_test
34
30
 
35
31
 
36
32
  @pytest.fixture(autouse=True)
@@ -68,11 +64,12 @@ def git_repo(tmp_path_factory):
68
64
  class TestGitHook:
69
65
  @classmethod
70
66
  def teardown_class(cls) -> None:
71
- clear_db_connections()
67
+ return
72
68
 
73
- @classmethod
74
- def setup_class(cls) -> None:
75
- db.merge_conn(
69
+ # TODO: Potential performance issue, converted setup_class to a setup_connections function level fixture
70
+ @pytest.fixture(autouse=True)
71
+ def setup_connections(self, create_connection_without_db):
72
+ create_connection_without_db(
76
73
  Connection(
77
74
  conn_id=CONN_DEFAULT,
78
75
  host=AIRFLOW_GIT,
@@ -80,7 +77,7 @@ class TestGitHook:
80
77
  extra='{"key_file": "/files/pkey.pem"}',
81
78
  )
82
79
  )
83
- db.merge_conn(
80
+ create_connection_without_db(
84
81
  Connection(
85
82
  conn_id=CONN_HTTPS,
86
83
  host=AIRFLOW_HTTPS_URL,
@@ -88,14 +85,14 @@ class TestGitHook:
88
85
  conn_type="git",
89
86
  )
90
87
  )
91
- db.merge_conn(
88
+ create_connection_without_db(
92
89
  Connection(
93
90
  conn_id=CONN_ONLY_PATH,
94
91
  host="path/to/repo",
95
92
  conn_type="git",
96
93
  )
97
94
  )
98
- db.merge_conn(
95
+ create_connection_without_db(
99
96
  Connection(
100
97
  conn_id=CONN_ONLY_INLINE_KEY,
101
98
  host="path/to/repo",
@@ -123,13 +120,13 @@ class TestGitHook:
123
120
  hook = GitHook(git_conn_id=conn_id, **hook_kwargs)
124
121
  assert hook.repo_url == expected_repo_url
125
122
 
126
- def test_env_var_with_configure_hook_env(self, session):
123
+ def test_env_var_with_configure_hook_env(self, create_connection_without_db):
127
124
  default_hook = GitHook(git_conn_id=CONN_DEFAULT)
128
125
  with default_hook.configure_hook_env():
129
126
  assert default_hook.env == {
130
127
  "GIT_SSH_COMMAND": "ssh -i /files/pkey.pem -o IdentitiesOnly=yes -o StrictHostKeyChecking=no"
131
128
  }
132
- db.merge_conn(
129
+ create_connection_without_db(
133
130
  Connection(
134
131
  conn_id="my_git_conn_strict",
135
132
  host=AIRFLOW_GIT,
@@ -144,8 +141,8 @@ class TestGitHook:
144
141
  "GIT_SSH_COMMAND": "ssh -i /files/pkey.pem -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes"
145
142
  }
146
143
 
147
- def test_given_both_private_key_and_key_file(self):
148
- db.merge_conn(
144
+ def test_given_both_private_key_and_key_file(self, create_connection_without_db):
145
+ create_connection_without_db(
149
146
  Connection(
150
147
  conn_id=CONN_BOTH_PATH_INLINE,
151
148
  host="path/to/repo",