jason810496 commented on code in PR #62696:
URL: https://github.com/apache/airflow/pull/62696#discussion_r2894588690
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -39,13 +37,12 @@
from typing_extensions import overload
from airflow._shared.configuration.parser import (
- VALUE_NOT_FOUND_SENTINEL,
AirflowConfigParser as _SharedAirflowConfigParser,
- ValueNotFound,
configure_parser_from_configuration_description,
)
from airflow._shared.module_loading import import_string
from airflow.exceptions import AirflowConfigException, RemovedInAirflow4Warning
+from airflow.providers_manager import ProvidersManager
from airflow.secrets import DEFAULT_SECRETS_SEARCH_PATH
Review Comment:
I moved the `ProvidersManager` under `__init__` method of
`AirflowConfigParser`, this is the _most lazy import_ way I can achieve. Since
we need `ProvidersManager` to construct the parent
`_SharedAirflowConfigParser`.
```python
def __init__(
self,
default_config: str | None = None,
*args,
**kwargs,
):
configuration_description =
retrieve_configuration_description(include_providers=False)
# ....
super().__init__(
configuration_description,
_default_values,
ProvidersManager,
create_default_config_parser,
_default_config_file_path("provider_config_fallback_defaults.cfg"),
*args,
**kwargs,
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]