This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e539a1b051c Remove unused shared provider discovery definitions 
(#75783)
e539a1b051c is described below

commit e539a1b051c028166b9694570099bde85b272287
Author: Hussein Awala <[email protected]>
AuthorDate: Tue Oct 27 22:06:23 2026 +0100

    Remove unused shared provider discovery definitions (#75783)
---
 .../providers_discovery/providers_discovery.py     | 72 +---------------------
 1 file changed, 1 insertion(+), 71 deletions(-)

diff --git 
a/shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py
 
b/shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py
index b988db553db..443d1c4fde0 100644
--- 
a/shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py
+++ 
b/shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py
@@ -29,7 +29,7 @@ from functools import wraps
 from importlib.metadata import Distribution
 from importlib.resources import files as resource_files
 from time import perf_counter
-from typing import Any, NamedTuple, ParamSpec, Protocol, cast
+from typing import NamedTuple, ParamSpec, Protocol, cast
 
 from packaging.utils import canonicalize_name
 
@@ -82,16 +82,6 @@ class HookInfo(NamedTuple):
     dialects: list[str] = []
 
 
-class ConnectionFormWidgetInfo(NamedTuple):
-    """Connection Form Widget information."""
-
-    hook_class_name: str
-    package_name: str
-    field: Any
-    field_name: str
-    is_sensitive: bool
-
-
 class PluginInfo(NamedTuple):
     """Plugin class, name and provider it comes from."""
 
@@ -100,29 +90,6 @@ class PluginInfo(NamedTuple):
     provider_name: str
 
 
-class NotificationInfo(NamedTuple):
-    """Notification class and provider it comes from."""
-
-    notification_class_name: str
-    package_name: str
-
-
-class TriggerInfo(NamedTuple):
-    """Trigger class and provider it comes from."""
-
-    trigger_class_name: str
-    package_name: str
-    integration_name: str
-
-
-class DialectInfo(NamedTuple):
-    """Dialect class and Provider it comes from."""
-
-    name: str
-    dialect_class_name: str
-    provider_name: str
-
-
 class LazyDictWithCache(MutableMapping):
     """
     Lazy-loaded cached dictionary.
@@ -190,16 +157,6 @@ def _create_provider_info_schema_validator():
     return validator
 
 
-def _create_customized_form_field_behaviours_schema_validator():
-    """Create JSON schema validator from the 
customized_form_field_behaviours.schema.json."""
-    import jsonschema
-
-    schema = 
_read_schema_from_resources_or_local_file("customized_form_field_behaviours.schema.json")
-    cls = jsonschema.validators.validator_for(schema)
-    validator = cls(schema)
-    return validator
-
-
 def _check_builtin_provider_prefix(provider_package: str, class_name: str) -> 
bool:
     """Check if builtin provider class has correct prefix."""
     if provider_package.startswith("apache-airflow"):
@@ -215,33 +172,6 @@ def _check_builtin_provider_prefix(provider_package: str, 
class_name: str) -> bo
     return True
 
 
-def _ensure_prefix_for_placeholders(field_behaviors: dict[str, Any], 
conn_type: str):
-    """
-    Verify the correct placeholder prefix.
-
-    If the given field_behaviors dict contains a placeholder's node, and there
-    are placeholders for extra fields (i.e. anything other than the built-in 
conn
-    attrs), and if those extra fields are unprefixed, then add the prefix.
-
-    The reason we need to do this is, all custom conn fields live in the same 
dictionary,
-    so we need to namespace them with a prefix internally.  But for user 
convenience,
-    and consistency between the `get_ui_field_behaviour` method and the extra 
dict itself,
-    we allow users to supply the unprefixed name.
-    """
-    conn_attrs = {"host", "schema", "login", "password", "port", "extra"}
-
-    def ensure_prefix(field):
-        if field not in conn_attrs and not field.startswith("extra__"):
-            return f"extra__{conn_type}__{field}"
-        return field
-
-    if "placeholders" in field_behaviors:
-        placeholders = field_behaviors["placeholders"]
-        field_behaviors["placeholders"] = {ensure_prefix(k): v for k, v in 
placeholders.items()}
-
-    return field_behaviors
-
-
 def log_optional_feature_disabled(class_name, e, provider_package):
     """Log optional feature disabled."""
     log.debug(

Reply via email to