apache-airflow-providers-fab 1.5.0rc1__py3-none-any.whl → 1.5.0rc3__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.
@@ -18,6 +18,7 @@
18
18
  from __future__ import annotations
19
19
 
20
20
  import argparse
21
+ import warnings
21
22
  from functools import cached_property
22
23
  from pathlib import Path
23
24
  from typing import TYPE_CHECKING, Container
@@ -46,7 +47,7 @@ from airflow.cli.cli_config import (
46
47
  GroupCommand,
47
48
  )
48
49
  from airflow.configuration import conf
49
- from airflow.exceptions import AirflowConfigException, AirflowException
50
+ from airflow.exceptions import AirflowConfigException, AirflowException, AirflowProviderDeprecationWarning
50
51
  from airflow.models import DagModel
51
52
  from airflow.providers.fab.auth_manager.cli_commands.definition import (
52
53
  DB_COMMANDS,
@@ -271,6 +272,16 @@ class FabAuthManager(BaseAuthManager):
271
272
  ) -> bool:
272
273
  return self._is_authorized(method=method, resource_type=RESOURCE_ASSET, user=user)
273
274
 
275
+ def is_authorized_dataset(
276
+ self, *, method: ResourceMethod, details: AssetDetails | None = None, user: BaseUser | None = None
277
+ ) -> bool:
278
+ warnings.warn(
279
+ "is_authorized_dataset will be renamed as is_authorized_asset in Airflow 3 and will be removed when the minimum Airflow version is set to 3.0 for the fab provider",
280
+ AirflowProviderDeprecationWarning,
281
+ stacklevel=2,
282
+ )
283
+ return self.is_authorized_asset(method=method, user=user)
284
+
274
285
  def is_authorized_pool(
275
286
  self, *, method: ResourceMethod, details: PoolDetails | None = None, user: BaseUser | None = None
276
287
  ) -> bool:
@@ -17,6 +17,7 @@
17
17
  # under the License.
18
18
  from __future__ import annotations
19
19
 
20
+ import copy
20
21
  import datetime
21
22
  import itertools
22
23
  import logging
@@ -24,7 +25,7 @@ import os
24
25
  import random
25
26
  import uuid
26
27
  import warnings
27
- from typing import TYPE_CHECKING, Any, Callable, Collection, Container, Iterable, Sequence
28
+ from typing import TYPE_CHECKING, Any, Callable, Collection, Container, Iterable, Mapping, Sequence
28
29
 
29
30
  import jwt
30
31
  import packaging.version
@@ -1107,7 +1108,7 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
1107
1108
  def sync_perm_for_dag(
1108
1109
  self,
1109
1110
  dag_id: str,
1110
- access_control: dict[str, dict[str, Collection[str]] | Collection[str]] | None = None,
1111
+ access_control: Mapping[str, Mapping[str, Collection[str]] | Collection[str]] | None = None,
1111
1112
  ) -> None:
1112
1113
  """
1113
1114
  Sync permissions for given dag id.
@@ -1128,7 +1129,7 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
1128
1129
 
1129
1130
  if access_control is not None:
1130
1131
  self.log.debug("Syncing DAG-level permissions for DAG '%s'", dag_id)
1131
- self._sync_dag_view_permissions(dag_id, access_control.copy())
1132
+ self._sync_dag_view_permissions(dag_id, copy.copy(access_control))
1132
1133
  else:
1133
1134
  self.log.debug(
1134
1135
  "Not syncing DAG-level permissions for DAG '%s' as access control is unset.",
@@ -1149,7 +1150,7 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
1149
1150
  def _sync_dag_view_permissions(
1150
1151
  self,
1151
1152
  dag_id: str,
1152
- access_control: dict[str, dict[str, Collection[str]] | Collection[str]],
1153
+ access_control: Mapping[str, Mapping[str, Collection[str]] | Collection[str]],
1153
1154
  ) -> None:
1154
1155
  """
1155
1156
  Set the access policy on the given DAG's ViewModel.
@@ -17,6 +17,7 @@
17
17
  from __future__ import annotations
18
18
 
19
19
  import contextlib
20
+ from logging import getLogger
20
21
  from logging.config import fileConfig
21
22
 
22
23
  from alembic import context
@@ -32,7 +33,7 @@ version_table = FABDBManager.version_table_name
32
33
 
33
34
  # Interpret the config file for Python logging.
34
35
  # This line sets up loggers basically.
35
- if config.config_file_name is not None:
36
+ if not getLogger().handlers and config.config_file_name:
36
37
  fileConfig(config.config_file_name, disable_existing_loggers=False)
37
38
 
38
39
  # add your model's MetaData object here
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-fab
3
- Version: 1.5.0rc1
3
+ Version: 1.5.0rc3
4
4
  Summary: Provider package apache-airflow-providers-fab for Apache Airflow
5
5
  Keywords: airflow-provider,fab,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
@@ -83,7 +83,7 @@ Provides-Extra: kerberos
83
83
 
84
84
  Package ``apache-airflow-providers-fab``
85
85
 
86
- Release: ``1.5.0.rc1``
86
+ Release: ``1.5.0.rc3``
87
87
 
88
88
 
89
89
  `Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
@@ -3,7 +3,7 @@ airflow/providers/fab/__init__.py,sha256=WCSXpdOzxrqDCn7RAYky0hSKzUK0WkwmwM3ap4y
3
3
  airflow/providers/fab/alembic.ini,sha256=_1SvObfjMAkuD7DN5VR2S6Rd7_F81pORZT-w7GJldIA,4461
4
4
  airflow/providers/fab/get_provider_info.py,sha256=bIQKrOgzjgaR45GgC1jDr7Hxgd66ZwiIdGZlXR6giR0,3454
5
5
  airflow/providers/fab/auth_manager/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
- airflow/providers/fab/auth_manager/fab_auth_manager.py,sha256=nITMHoKMxyFZwcVwiOxHuazb_FP1xWcOJ6PM2F6VDSE,22067
6
+ airflow/providers/fab/auth_manager/fab_auth_manager.py,sha256=sviJnFFBXm6TtkidNxensQLHAKfJaG9WU93STRUhEys,22621
7
7
  airflow/providers/fab/auth_manager/api/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
8
8
  airflow/providers/fab/auth_manager/api/auth/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
9
9
  airflow/providers/fab/auth_manager/api/auth/backend/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
@@ -32,7 +32,7 @@ airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py,sha256=
32
32
  airflow/providers/fab/auth_manager/schemas/user_schema.py,sha256=ap0A09dYmzAbSHI88_5j0Ysx0Z1G0rKSNau5lEi_CFc,2383
33
33
  airflow/providers/fab/auth_manager/security_manager/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
34
34
  airflow/providers/fab/auth_manager/security_manager/constants.py,sha256=x1Sjl_Mu3wmaSy3NFZlHxK2z-juzWmMs1SrzJ0aiBBQ,907
35
- airflow/providers/fab/auth_manager/security_manager/override.py,sha256=-3NWBLebs67LhkcDI4KJuEU6odqSb2t1lrMwX8Eci7g,115927
35
+ airflow/providers/fab/auth_manager/security_manager/override.py,sha256=IgwSbtUkc6OZQ6TOsiuT6g_dTWV5kXX8AJyda3xtuQ4,115964
36
36
  airflow/providers/fab/auth_manager/views/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
37
37
  airflow/providers/fab/auth_manager/views/permissions.py,sha256=k5APUTqqKZqMxCWlKrUEgqdDVrGa9719HJ3UmFpiSLc,2886
38
38
  airflow/providers/fab/auth_manager/views/roles_list.py,sha256=o_VqnLbQa4sisKxLwyx6VCl3HmvjKcjkrJG23R81FMQ,1494
@@ -41,11 +41,11 @@ airflow/providers/fab/auth_manager/views/user_edit.py,sha256=d8wQ_8Rk8Ce95sCElZI
41
41
  airflow/providers/fab/auth_manager/views/user_stats.py,sha256=zP2eX6e40rpEohJcvnvri4Khu3Q4ULLxjz1zOWvOr8A,1300
42
42
  airflow/providers/fab/migrations/README,sha256=heMzebYwlGhnE8_4CWJ4LS74WoEZjBy-S-mIJRxAEKI,39
43
43
  airflow/providers/fab/migrations/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
44
- airflow/providers/fab/migrations/env.py,sha256=brxmsuAiSRSwzG14Butue1chSJSXaLW53-ABihPLmKw,3951
44
+ airflow/providers/fab/migrations/env.py,sha256=wbgFowVIf-wY1L-DqD2f8wiuTeXNDKeAUw1oM15Fd0U,3998
45
45
  airflow/providers/fab/migrations/script.py.mako,sha256=_krfPtzv1Unme2b9MCHPgXo0g73HcN2_zDgz3co2N4M,1353
46
46
  airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py,sha256=wLZiBiWjfSofXZ4jXMjpEKkIc3jI0a6hpJ73xEYAzss,1370
47
47
  airflow/providers/fab/migrations/versions/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
48
- apache_airflow_providers_fab-1.5.0rc1.dist-info/entry_points.txt,sha256=m05kASp7vFi0ZmQ--CFp7GeJpPL7UT2RQF8EEP5XRX8,99
49
- apache_airflow_providers_fab-1.5.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
50
- apache_airflow_providers_fab-1.5.0rc1.dist-info/METADATA,sha256=63CV7NGIJ8ZEc3oZwBdtZPCmw7h3qwsYnpCnAkhawSc,6571
51
- apache_airflow_providers_fab-1.5.0rc1.dist-info/RECORD,,
48
+ apache_airflow_providers_fab-1.5.0rc3.dist-info/entry_points.txt,sha256=m05kASp7vFi0ZmQ--CFp7GeJpPL7UT2RQF8EEP5XRX8,99
49
+ apache_airflow_providers_fab-1.5.0rc3.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
50
+ apache_airflow_providers_fab-1.5.0rc3.dist-info/METADATA,sha256=0fZlSivZZyp0NFotKLji5rsjtibPB7HOg6OgALD9eOo,6571
51
+ apache_airflow_providers_fab-1.5.0rc3.dist-info/RECORD,,