snowflake-cli-labs 3.0.0rc5__py3-none-any.whl → 3.0.2__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.
- README.md +21 -0
- {snowflake_cli_labs-3.0.0rc5.dist-info → snowflake_cli_labs-3.0.2.dist-info}/METADATA +6 -96
- snowflake_cli_labs-3.0.2.dist-info/RECORD +5 -0
- snowflake/cli/__about__.py +0 -17
- snowflake/cli/__init__.py +0 -13
- snowflake/cli/_app/__init__.py +0 -22
- snowflake/cli/_app/__main__.py +0 -31
- snowflake/cli/_app/api_impl/__init__.py +0 -13
- snowflake/cli/_app/api_impl/plugin/__init__.py +0 -13
- snowflake/cli/_app/api_impl/plugin/plugin_config_provider_impl.py +0 -66
- snowflake/cli/_app/cli_app.py +0 -252
- snowflake/cli/_app/commands_registration/__init__.py +0 -33
- snowflake/cli/_app/commands_registration/builtin_plugins.py +0 -50
- snowflake/cli/_app/commands_registration/command_plugins_loader.py +0 -169
- snowflake/cli/_app/commands_registration/commands_registration_with_callbacks.py +0 -105
- snowflake/cli/_app/commands_registration/exception_logging.py +0 -26
- snowflake/cli/_app/commands_registration/threadsafe.py +0 -48
- snowflake/cli/_app/commands_registration/typer_registration.py +0 -153
- snowflake/cli/_app/constants.py +0 -19
- snowflake/cli/_app/dev/__init__.py +0 -13
- snowflake/cli/_app/dev/commands_structure.py +0 -48
- snowflake/cli/_app/dev/docs/__init__.py +0 -13
- snowflake/cli/_app/dev/docs/commands_docs_generator.py +0 -118
- snowflake/cli/_app/dev/docs/generator.py +0 -35
- snowflake/cli/_app/dev/docs/project_definition_docs_generator.py +0 -58
- snowflake/cli/_app/dev/docs/project_definition_generate_json_schema.py +0 -227
- snowflake/cli/_app/dev/docs/template_utils.py +0 -23
- snowflake/cli/_app/dev/docs/templates/definition_description.rst.jinja2 +0 -38
- snowflake/cli/_app/dev/docs/templates/overview.rst.jinja2 +0 -9
- snowflake/cli/_app/dev/docs/templates/usage.rst.jinja2 +0 -67
- snowflake/cli/_app/dev/pycharm_remote_debug.py +0 -46
- snowflake/cli/_app/loggers.py +0 -199
- snowflake/cli/_app/main_typer.py +0 -62
- snowflake/cli/_app/printing.py +0 -181
- snowflake/cli/_app/secret.py +0 -9
- snowflake/cli/_app/snow_connector.py +0 -309
- snowflake/cli/_app/telemetry.py +0 -220
- snowflake/cli/_app/version_check.py +0 -74
- snowflake/cli/_plugins/__init__.py +0 -13
- snowflake/cli/_plugins/connection/__init__.py +0 -13
- snowflake/cli/_plugins/connection/commands.py +0 -353
- snowflake/cli/_plugins/connection/plugin_spec.py +0 -30
- snowflake/cli/_plugins/connection/util.py +0 -195
- snowflake/cli/_plugins/cortex/__init__.py +0 -13
- snowflake/cli/_plugins/cortex/commands.py +0 -332
- snowflake/cli/_plugins/cortex/constants.py +0 -17
- snowflake/cli/_plugins/cortex/manager.py +0 -189
- snowflake/cli/_plugins/cortex/plugin_spec.py +0 -30
- snowflake/cli/_plugins/cortex/types.py +0 -22
- snowflake/cli/_plugins/git/__init__.py +0 -13
- snowflake/cli/_plugins/git/commands.py +0 -358
- snowflake/cli/_plugins/git/manager.py +0 -151
- snowflake/cli/_plugins/git/plugin_spec.py +0 -30
- snowflake/cli/_plugins/helpers/__init__.py +0 -13
- snowflake/cli/_plugins/helpers/commands.py +0 -90
- snowflake/cli/_plugins/helpers/plugin_spec.py +0 -30
- snowflake/cli/_plugins/init/__init__.py +0 -13
- snowflake/cli/_plugins/init/commands.py +0 -248
- snowflake/cli/_plugins/init/plugin_spec.py +0 -30
- snowflake/cli/_plugins/nativeapp/__init__.py +0 -13
- snowflake/cli/_plugins/nativeapp/artifacts.py +0 -757
- snowflake/cli/_plugins/nativeapp/bundle_context.py +0 -31
- snowflake/cli/_plugins/nativeapp/codegen/__init__.py +0 -13
- snowflake/cli/_plugins/nativeapp/codegen/artifact_processor.py +0 -91
- snowflake/cli/_plugins/nativeapp/codegen/compiler.py +0 -149
- snowflake/cli/_plugins/nativeapp/codegen/sandbox.py +0 -306
- snowflake/cli/_plugins/nativeapp/codegen/setup/native_app_setup_processor.py +0 -249
- snowflake/cli/_plugins/nativeapp/codegen/setup/setup_driver.py.source +0 -59
- snowflake/cli/_plugins/nativeapp/codegen/snowpark/callback_source.py.jinja +0 -181
- snowflake/cli/_plugins/nativeapp/codegen/snowpark/extension_function_utils.py +0 -217
- snowflake/cli/_plugins/nativeapp/codegen/snowpark/models.py +0 -61
- snowflake/cli/_plugins/nativeapp/codegen/snowpark/python_processor.py +0 -523
- snowflake/cli/_plugins/nativeapp/codegen/templates/templates_processor.py +0 -114
- snowflake/cli/_plugins/nativeapp/commands.py +0 -559
- snowflake/cli/_plugins/nativeapp/common_flags.py +0 -44
- snowflake/cli/_plugins/nativeapp/constants.py +0 -27
- snowflake/cli/_plugins/nativeapp/entities/__init__.py +0 -0
- snowflake/cli/_plugins/nativeapp/entities/application.py +0 -878
- snowflake/cli/_plugins/nativeapp/entities/application_package.py +0 -1392
- snowflake/cli/_plugins/nativeapp/exceptions.py +0 -113
- snowflake/cli/_plugins/nativeapp/feature_flags.py +0 -24
- snowflake/cli/_plugins/nativeapp/manager.py +0 -415
- snowflake/cli/_plugins/nativeapp/plugin_spec.py +0 -30
- snowflake/cli/_plugins/nativeapp/policy.py +0 -53
- snowflake/cli/_plugins/nativeapp/project_model.py +0 -211
- snowflake/cli/_plugins/nativeapp/run_processor.py +0 -184
- snowflake/cli/_plugins/nativeapp/same_account_install_method.py +0 -70
- snowflake/cli/_plugins/nativeapp/teardown_processor.py +0 -70
- snowflake/cli/_plugins/nativeapp/utils.py +0 -98
- snowflake/cli/_plugins/nativeapp/v2_conversions/v2_to_v1_decorator.py +0 -262
- snowflake/cli/_plugins/nativeapp/version/__init__.py +0 -13
- snowflake/cli/_plugins/nativeapp/version/commands.py +0 -141
- snowflake/cli/_plugins/nativeapp/version/version_processor.py +0 -98
- snowflake/cli/_plugins/notebook/__init__.py +0 -13
- snowflake/cli/_plugins/notebook/commands.py +0 -86
- snowflake/cli/_plugins/notebook/exceptions.py +0 -20
- snowflake/cli/_plugins/notebook/manager.py +0 -71
- snowflake/cli/_plugins/notebook/plugin_spec.py +0 -30
- snowflake/cli/_plugins/notebook/types.py +0 -15
- snowflake/cli/_plugins/object/__init__.py +0 -13
- snowflake/cli/_plugins/object/command_aliases.py +0 -95
- snowflake/cli/_plugins/object/commands.py +0 -180
- snowflake/cli/_plugins/object/common.py +0 -85
- snowflake/cli/_plugins/object/manager.py +0 -118
- snowflake/cli/_plugins/object/plugin_spec.py +0 -30
- snowflake/cli/_plugins/snowpark/__init__.py +0 -13
- snowflake/cli/_plugins/snowpark/commands.py +0 -450
- snowflake/cli/_plugins/snowpark/common.py +0 -268
- snowflake/cli/_plugins/snowpark/models.py +0 -150
- snowflake/cli/_plugins/snowpark/package/__init__.py +0 -13
- snowflake/cli/_plugins/snowpark/package/anaconda_packages.py +0 -199
- snowflake/cli/_plugins/snowpark/package/commands.py +0 -195
- snowflake/cli/_plugins/snowpark/package/manager.py +0 -44
- snowflake/cli/_plugins/snowpark/package/utils.py +0 -26
- snowflake/cli/_plugins/snowpark/package_utils.py +0 -354
- snowflake/cli/_plugins/snowpark/plugin_spec.py +0 -30
- snowflake/cli/_plugins/snowpark/snowpark_entity.py +0 -29
- snowflake/cli/_plugins/snowpark/snowpark_entity_model.py +0 -173
- snowflake/cli/_plugins/snowpark/snowpark_project_paths.py +0 -109
- snowflake/cli/_plugins/snowpark/snowpark_shared.py +0 -59
- snowflake/cli/_plugins/snowpark/zipper.py +0 -89
- snowflake/cli/_plugins/spcs/__init__.py +0 -33
- snowflake/cli/_plugins/spcs/common.py +0 -99
- snowflake/cli/_plugins/spcs/compute_pool/__init__.py +0 -13
- snowflake/cli/_plugins/spcs/compute_pool/commands.py +0 -241
- snowflake/cli/_plugins/spcs/compute_pool/manager.py +0 -121
- snowflake/cli/_plugins/spcs/image_registry/__init__.py +0 -13
- snowflake/cli/_plugins/spcs/image_registry/commands.py +0 -65
- snowflake/cli/_plugins/spcs/image_registry/manager.py +0 -105
- snowflake/cli/_plugins/spcs/image_repository/__init__.py +0 -13
- snowflake/cli/_plugins/spcs/image_repository/commands.py +0 -202
- snowflake/cli/_plugins/spcs/image_repository/manager.py +0 -84
- snowflake/cli/_plugins/spcs/plugin_spec.py +0 -30
- snowflake/cli/_plugins/spcs/services/__init__.py +0 -13
- snowflake/cli/_plugins/spcs/services/commands.py +0 -345
- snowflake/cli/_plugins/spcs/services/manager.py +0 -208
- snowflake/cli/_plugins/sql/__init__.py +0 -13
- snowflake/cli/_plugins/sql/commands.py +0 -86
- snowflake/cli/_plugins/sql/manager.py +0 -92
- snowflake/cli/_plugins/sql/plugin_spec.py +0 -30
- snowflake/cli/_plugins/sql/snowsql_templating.py +0 -28
- snowflake/cli/_plugins/stage/__init__.py +0 -13
- snowflake/cli/_plugins/stage/commands.py +0 -264
- snowflake/cli/_plugins/stage/diff.py +0 -280
- snowflake/cli/_plugins/stage/manager.py +0 -582
- snowflake/cli/_plugins/stage/md5.py +0 -160
- snowflake/cli/_plugins/stage/plugin_spec.py +0 -30
- snowflake/cli/_plugins/stage/utils.py +0 -54
- snowflake/cli/_plugins/streamlit/__init__.py +0 -13
- snowflake/cli/_plugins/streamlit/commands.py +0 -195
- snowflake/cli/_plugins/streamlit/manager.py +0 -220
- snowflake/cli/_plugins/streamlit/plugin_spec.py +0 -30
- snowflake/cli/_plugins/streamlit/streamlit_entity.py +0 -12
- snowflake/cli/_plugins/streamlit/streamlit_entity_model.py +0 -66
- snowflake/cli/_plugins/workspace/__init__.py +0 -13
- snowflake/cli/_plugins/workspace/action_context.py +0 -18
- snowflake/cli/_plugins/workspace/commands.py +0 -306
- snowflake/cli/_plugins/workspace/manager.py +0 -74
- snowflake/cli/_plugins/workspace/plugin_spec.py +0 -30
- snowflake/cli/api/__init__.py +0 -48
- snowflake/cli/api/cli_global_context.py +0 -247
- snowflake/cli/api/commands/__init__.py +0 -13
- snowflake/cli/api/commands/alias.py +0 -23
- snowflake/cli/api/commands/common.py +0 -25
- snowflake/cli/api/commands/decorators.py +0 -369
- snowflake/cli/api/commands/execution_metadata.py +0 -40
- snowflake/cli/api/commands/experimental_behaviour.py +0 -18
- snowflake/cli/api/commands/flags.py +0 -561
- snowflake/cli/api/commands/overrideable_parameter.py +0 -143
- snowflake/cli/api/commands/snow_typer.py +0 -247
- snowflake/cli/api/commands/utils.py +0 -18
- snowflake/cli/api/config.py +0 -380
- snowflake/cli/api/connections.py +0 -216
- snowflake/cli/api/console/__init__.py +0 -17
- snowflake/cli/api/console/abc.py +0 -94
- snowflake/cli/api/console/console.py +0 -134
- snowflake/cli/api/console/enum.py +0 -17
- snowflake/cli/api/constants.py +0 -90
- snowflake/cli/api/entities/common.py +0 -56
- snowflake/cli/api/entities/utils.py +0 -370
- snowflake/cli/api/errno.py +0 -28
- snowflake/cli/api/exceptions.py +0 -190
- snowflake/cli/api/feature_flags.py +0 -54
- snowflake/cli/api/identifiers.py +0 -190
- snowflake/cli/api/metrics.py +0 -92
- snowflake/cli/api/output/__init__.py +0 -13
- snowflake/cli/api/output/formats.py +0 -20
- snowflake/cli/api/output/types.py +0 -118
- snowflake/cli/api/plugins/__init__.py +0 -13
- snowflake/cli/api/plugins/command/__init__.py +0 -72
- snowflake/cli/api/plugins/command/plugin_hook_specs.py +0 -21
- snowflake/cli/api/plugins/plugin_config.py +0 -32
- snowflake/cli/api/project/__init__.py +0 -13
- snowflake/cli/api/project/definition.py +0 -126
- snowflake/cli/api/project/definition_conversion.py +0 -400
- snowflake/cli/api/project/definition_manager.py +0 -145
- snowflake/cli/api/project/errors.py +0 -56
- snowflake/cli/api/project/project_verification.py +0 -23
- snowflake/cli/api/project/schemas/__init__.py +0 -13
- snowflake/cli/api/project/schemas/entities/__init__.py +0 -13
- snowflake/cli/api/project/schemas/entities/common.py +0 -153
- snowflake/cli/api/project/schemas/entities/entities.py +0 -61
- snowflake/cli/api/project/schemas/project_definition.py +0 -330
- snowflake/cli/api/project/schemas/template.py +0 -77
- snowflake/cli/api/project/schemas/updatable_model.py +0 -202
- snowflake/cli/api/project/schemas/v1/__init__.py +0 -0
- snowflake/cli/api/project/schemas/v1/identifier_model.py +0 -51
- snowflake/cli/api/project/schemas/v1/native_app/__init__.py +0 -0
- snowflake/cli/api/project/schemas/v1/native_app/application.py +0 -61
- snowflake/cli/api/project/schemas/v1/native_app/native_app.py +0 -93
- snowflake/cli/api/project/schemas/v1/native_app/package.py +0 -84
- snowflake/cli/api/project/schemas/v1/native_app/path_mapping.py +0 -65
- snowflake/cli/api/project/schemas/v1/snowpark/__init__.py +0 -0
- snowflake/cli/api/project/schemas/v1/snowpark/argument.py +0 -28
- snowflake/cli/api/project/schemas/v1/snowpark/callable.py +0 -69
- snowflake/cli/api/project/schemas/v1/snowpark/snowpark.py +0 -36
- snowflake/cli/api/project/schemas/v1/streamlit/__init__.py +0 -0
- snowflake/cli/api/project/schemas/v1/streamlit/streamlit.py +0 -47
- snowflake/cli/api/project/util.py +0 -278
- snowflake/cli/api/rendering/__init__.py +0 -13
- snowflake/cli/api/rendering/jinja.py +0 -118
- snowflake/cli/api/rendering/project_definition_templates.py +0 -43
- snowflake/cli/api/rendering/project_templates.py +0 -98
- snowflake/cli/api/rendering/sql_templates.py +0 -105
- snowflake/cli/api/rest_api.py +0 -178
- snowflake/cli/api/sanitizers.py +0 -43
- snowflake/cli/api/secure_path.py +0 -360
- snowflake/cli/api/secure_utils.py +0 -118
- snowflake/cli/api/sql_execution.py +0 -280
- snowflake/cli/api/utils/__init__.py +0 -13
- snowflake/cli/api/utils/cursor.py +0 -34
- snowflake/cli/api/utils/definition_rendering.py +0 -415
- snowflake/cli/api/utils/dict_utils.py +0 -73
- snowflake/cli/api/utils/error_handling.py +0 -23
- snowflake/cli/api/utils/graph.py +0 -97
- snowflake/cli/api/utils/models.py +0 -63
- snowflake/cli/api/utils/naming_utils.py +0 -13
- snowflake/cli/api/utils/path_utils.py +0 -36
- snowflake/cli/api/utils/templating_functions.py +0 -144
- snowflake/cli/api/utils/types.py +0 -35
- snowflake_cli_labs-3.0.0rc5.dist-info/RECORD +0 -242
- snowflake_cli_labs-3.0.0rc5.dist-info/entry_points.txt +0 -2
- {snowflake_cli_labs-3.0.0rc5.dist-info → snowflake_cli_labs-3.0.2.dist-info}/WHEEL +0 -0
- {snowflake_cli_labs-3.0.0rc5.dist-info → snowflake_cli_labs-3.0.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
import time
|
|
15
|
-
import uuid
|
|
16
|
-
from dataclasses import dataclass, field
|
|
17
|
-
from enum import Enum
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ExecutionStatus(Enum):
|
|
21
|
-
SUCCESS = "success"
|
|
22
|
-
FAILURE = "failure"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@dataclass
|
|
26
|
-
class ExecutionMetadata:
|
|
27
|
-
start_time: float = 0.0
|
|
28
|
-
end_time: float = 0.0
|
|
29
|
-
status: ExecutionStatus = ExecutionStatus.SUCCESS
|
|
30
|
-
execution_id: str = field(default_factory=lambda: uuid.uuid4().hex)
|
|
31
|
-
|
|
32
|
-
def __post_init__(self):
|
|
33
|
-
self.start_time = time.monotonic()
|
|
34
|
-
|
|
35
|
-
def complete(self, status: ExecutionStatus):
|
|
36
|
-
self.end_time = time.monotonic()
|
|
37
|
-
self.status = status
|
|
38
|
-
|
|
39
|
-
def get_duration(self):
|
|
40
|
-
return self.end_time - self.start_time
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
from snowflake.cli.api.cli_global_context import get_cli_context
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def experimental_behaviour_enabled() -> bool:
|
|
18
|
-
return get_cli_context().experimental
|
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
|
|
17
|
-
import tempfile
|
|
18
|
-
from pathlib import Path
|
|
19
|
-
from typing import Any, Callable, Optional
|
|
20
|
-
|
|
21
|
-
import click
|
|
22
|
-
import typer
|
|
23
|
-
from click import ClickException
|
|
24
|
-
from snowflake.cli.api.cli_global_context import (
|
|
25
|
-
_CliGlobalContextManager,
|
|
26
|
-
get_cli_context_manager,
|
|
27
|
-
)
|
|
28
|
-
from snowflake.cli.api.commands.common import OnErrorType
|
|
29
|
-
from snowflake.cli.api.commands.overrideable_parameter import OverrideableOption
|
|
30
|
-
from snowflake.cli.api.commands.utils import parse_key_value_variables
|
|
31
|
-
from snowflake.cli.api.config import get_all_connections
|
|
32
|
-
from snowflake.cli.api.connections import ConnectionContext
|
|
33
|
-
from snowflake.cli.api.console import cli_console
|
|
34
|
-
from snowflake.cli.api.identifiers import FQN
|
|
35
|
-
from snowflake.cli.api.output.formats import OutputFormat
|
|
36
|
-
|
|
37
|
-
DEFAULT_CONTEXT_SETTINGS = {"help_option_names": ["--help", "-h"]}
|
|
38
|
-
|
|
39
|
-
_CONNECTION_SECTION = "Connection configuration"
|
|
40
|
-
_CLI_BEHAVIOUR = "Global configuration"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def _connection_callback(prop: str):
|
|
44
|
-
"""Generates a setter for a field on the current context manager's connection context."""
|
|
45
|
-
if prop not in ConnectionContext.__dataclass_fields__:
|
|
46
|
-
raise KeyError(
|
|
47
|
-
f"Cannot generate setter for non-existent connection attr {prop}"
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
def callback(value):
|
|
51
|
-
try:
|
|
52
|
-
if click.get_current_context().resilient_parsing:
|
|
53
|
-
return
|
|
54
|
-
except RuntimeError:
|
|
55
|
-
pass
|
|
56
|
-
|
|
57
|
-
setattr(get_cli_context_manager().connection_context, prop, value)
|
|
58
|
-
return value
|
|
59
|
-
|
|
60
|
-
return callback
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _context_callback(prop: str):
|
|
64
|
-
"""Generates a setter for a field on the current context manager."""
|
|
65
|
-
if prop not in _CliGlobalContextManager.__dataclass_fields__:
|
|
66
|
-
raise KeyError(f"Cannot generate setter for non-existent context attr {prop}")
|
|
67
|
-
|
|
68
|
-
def callback(value):
|
|
69
|
-
try:
|
|
70
|
-
if click.get_current_context().resilient_parsing:
|
|
71
|
-
return
|
|
72
|
-
except RuntimeError:
|
|
73
|
-
pass
|
|
74
|
-
|
|
75
|
-
setattr(get_cli_context_manager(), prop, value)
|
|
76
|
-
return value
|
|
77
|
-
|
|
78
|
-
return callback
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ConnectionOption = typer.Option(
|
|
82
|
-
None,
|
|
83
|
-
"--connection",
|
|
84
|
-
"-c",
|
|
85
|
-
"--environment",
|
|
86
|
-
help=f"Name of the connection, as defined in your `config.toml`. Default: `default`.",
|
|
87
|
-
callback=_connection_callback("connection_name"),
|
|
88
|
-
show_default=False,
|
|
89
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
90
|
-
shell_complete=lambda _, __, ___: list(get_all_connections()),
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
TemporaryConnectionOption = typer.Option(
|
|
94
|
-
False,
|
|
95
|
-
"--temporary-connection",
|
|
96
|
-
"-x",
|
|
97
|
-
help="Uses connection defined with command line parameters, instead of one defined in config",
|
|
98
|
-
callback=_connection_callback("temporary_connection"),
|
|
99
|
-
is_flag=True,
|
|
100
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
HostOption = typer.Option(
|
|
104
|
-
None,
|
|
105
|
-
"--host",
|
|
106
|
-
help="Host address for the connection. Overrides the value specified for the connection.",
|
|
107
|
-
callback=_connection_callback("host"),
|
|
108
|
-
show_default=False,
|
|
109
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
PortOption = typer.Option(
|
|
113
|
-
None,
|
|
114
|
-
"--port",
|
|
115
|
-
help="Port for the connection. Overrides the value specified for the connection.",
|
|
116
|
-
callback=_connection_callback("port"),
|
|
117
|
-
show_default=False,
|
|
118
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
AccountOption = typer.Option(
|
|
122
|
-
None,
|
|
123
|
-
"--account",
|
|
124
|
-
"--accountname",
|
|
125
|
-
help="Name assigned to your Snowflake account. Overrides the value specified for the connection.",
|
|
126
|
-
callback=_connection_callback("account"),
|
|
127
|
-
show_default=False,
|
|
128
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
UserOption = typer.Option(
|
|
132
|
-
None,
|
|
133
|
-
"--user",
|
|
134
|
-
"--username",
|
|
135
|
-
help="Username to connect to Snowflake. Overrides the value specified for the connection.",
|
|
136
|
-
callback=_connection_callback("user"),
|
|
137
|
-
show_default=False,
|
|
138
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
PLAIN_PASSWORD_MSG = "WARNING! Using --password via the CLI is insecure. Use environment variables instead."
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
def _password_callback(value: str):
|
|
146
|
-
if value:
|
|
147
|
-
cli_console.message(PLAIN_PASSWORD_MSG)
|
|
148
|
-
|
|
149
|
-
return _connection_callback("password")(value)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
PasswordOption = typer.Option(
|
|
153
|
-
None,
|
|
154
|
-
"--password",
|
|
155
|
-
help="Snowflake password. Overrides the value specified for the connection.",
|
|
156
|
-
hide_input=True,
|
|
157
|
-
callback=_password_callback,
|
|
158
|
-
show_default=False,
|
|
159
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
AuthenticatorOption = typer.Option(
|
|
163
|
-
None,
|
|
164
|
-
"--authenticator",
|
|
165
|
-
help="Snowflake authenticator. Overrides the value specified for the connection.",
|
|
166
|
-
hide_input=True,
|
|
167
|
-
callback=_connection_callback("authenticator"),
|
|
168
|
-
show_default=False,
|
|
169
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
PrivateKeyPathOption = typer.Option(
|
|
173
|
-
None,
|
|
174
|
-
"--private-key-file",
|
|
175
|
-
"--private-key-path",
|
|
176
|
-
help="Snowflake private key file path. Overrides the value specified for the connection.",
|
|
177
|
-
hide_input=True,
|
|
178
|
-
callback=_connection_callback("private_key_file"),
|
|
179
|
-
show_default=False,
|
|
180
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
181
|
-
exists=True,
|
|
182
|
-
file_okay=True,
|
|
183
|
-
dir_okay=False,
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
SessionTokenOption = typer.Option(
|
|
187
|
-
None,
|
|
188
|
-
"--session-token",
|
|
189
|
-
help="Snowflake session token. Can be used only in conjunction with --master-token. Overrides the value specified for the connection.",
|
|
190
|
-
hide_input=True,
|
|
191
|
-
callback=_connection_callback("session_token"),
|
|
192
|
-
show_default=False,
|
|
193
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
194
|
-
exists=True,
|
|
195
|
-
file_okay=True,
|
|
196
|
-
dir_okay=False,
|
|
197
|
-
hidden=True,
|
|
198
|
-
)
|
|
199
|
-
|
|
200
|
-
MasterTokenOption = typer.Option(
|
|
201
|
-
None,
|
|
202
|
-
"--master-token",
|
|
203
|
-
help="Snowflake master token. Can be used only in conjunction with --session-token. Overrides the value specified for the connection.",
|
|
204
|
-
hide_input=True,
|
|
205
|
-
callback=_connection_callback("master_token"),
|
|
206
|
-
show_default=False,
|
|
207
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
208
|
-
exists=True,
|
|
209
|
-
file_okay=True,
|
|
210
|
-
dir_okay=False,
|
|
211
|
-
hidden=True,
|
|
212
|
-
)
|
|
213
|
-
|
|
214
|
-
TokenFilePathOption = typer.Option(
|
|
215
|
-
None,
|
|
216
|
-
"--token-file-path",
|
|
217
|
-
help="Path to file with an OAuth token that should be used when connecting to Snowflake",
|
|
218
|
-
callback=_connection_callback("token_file_path"),
|
|
219
|
-
show_default=False,
|
|
220
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
221
|
-
exists=True,
|
|
222
|
-
file_okay=True,
|
|
223
|
-
dir_okay=False,
|
|
224
|
-
)
|
|
225
|
-
|
|
226
|
-
DatabaseOption = typer.Option(
|
|
227
|
-
None,
|
|
228
|
-
"--database",
|
|
229
|
-
"--dbname",
|
|
230
|
-
help="Database to use. Overrides the value specified for the connection.",
|
|
231
|
-
callback=_connection_callback("database"),
|
|
232
|
-
show_default=False,
|
|
233
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
234
|
-
)
|
|
235
|
-
|
|
236
|
-
SchemaOption = typer.Option(
|
|
237
|
-
None,
|
|
238
|
-
"--schema",
|
|
239
|
-
"--schemaname",
|
|
240
|
-
help="Database schema to use. Overrides the value specified for the connection.",
|
|
241
|
-
callback=_connection_callback("schema"),
|
|
242
|
-
show_default=False,
|
|
243
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
RoleOption = typer.Option(
|
|
247
|
-
None,
|
|
248
|
-
"--role",
|
|
249
|
-
"--rolename",
|
|
250
|
-
help="Role to use. Overrides the value specified for the connection.",
|
|
251
|
-
callback=_connection_callback("role"),
|
|
252
|
-
show_default=False,
|
|
253
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
254
|
-
)
|
|
255
|
-
|
|
256
|
-
WarehouseOption = typer.Option(
|
|
257
|
-
None,
|
|
258
|
-
"--warehouse",
|
|
259
|
-
help="Warehouse to use. Overrides the value specified for the connection.",
|
|
260
|
-
callback=_connection_callback("warehouse"),
|
|
261
|
-
show_default=False,
|
|
262
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
263
|
-
)
|
|
264
|
-
|
|
265
|
-
MfaPasscodeOption = typer.Option(
|
|
266
|
-
None,
|
|
267
|
-
"--mfa-passcode",
|
|
268
|
-
help="Token to use for multi-factor authentication (MFA)",
|
|
269
|
-
callback=_connection_callback("mfa_passcode"),
|
|
270
|
-
prompt="MFA passcode",
|
|
271
|
-
prompt_required=False,
|
|
272
|
-
show_default=False,
|
|
273
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
274
|
-
)
|
|
275
|
-
|
|
276
|
-
EnableDiagOption = typer.Option(
|
|
277
|
-
False,
|
|
278
|
-
"--enable-diag",
|
|
279
|
-
help="Run python connector diagnostic test",
|
|
280
|
-
callback=_connection_callback("enable_diag"),
|
|
281
|
-
show_default=False,
|
|
282
|
-
is_flag=True,
|
|
283
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
284
|
-
)
|
|
285
|
-
|
|
286
|
-
# Set default via callback to avoid including tempdir path in generated docs (snow --docs).
|
|
287
|
-
# Use constant instead of None, as None is removed from telemetry data.
|
|
288
|
-
_DIAG_LOG_DEFAULT_VALUE = "<temporary_directory>"
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
def _diag_log_path_callback(path: str):
|
|
292
|
-
if path == _DIAG_LOG_DEFAULT_VALUE:
|
|
293
|
-
path = tempfile.gettempdir()
|
|
294
|
-
get_cli_context_manager().connection_context.diag_log_path = Path(path)
|
|
295
|
-
return path
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
DiagLogPathOption: Path = typer.Option(
|
|
299
|
-
_DIAG_LOG_DEFAULT_VALUE,
|
|
300
|
-
"--diag-log-path",
|
|
301
|
-
help="Diagnostic report path",
|
|
302
|
-
callback=_diag_log_path_callback,
|
|
303
|
-
show_default=False,
|
|
304
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
305
|
-
exists=True,
|
|
306
|
-
writable=True,
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
DiagAllowlistPathOption: Path = typer.Option(
|
|
310
|
-
None,
|
|
311
|
-
"--diag-allowlist-path",
|
|
312
|
-
help="Diagnostic report path to optional allowlist",
|
|
313
|
-
callback=_connection_callback("diag_allowlist_path"),
|
|
314
|
-
show_default=False,
|
|
315
|
-
rich_help_panel=_CONNECTION_SECTION,
|
|
316
|
-
exists=True,
|
|
317
|
-
file_okay=True,
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
OutputFormatOption = typer.Option(
|
|
321
|
-
OutputFormat.TABLE.value,
|
|
322
|
-
"--format",
|
|
323
|
-
help="Specifies the output format.",
|
|
324
|
-
case_sensitive=False,
|
|
325
|
-
callback=_context_callback("output_format"),
|
|
326
|
-
rich_help_panel=_CLI_BEHAVIOUR,
|
|
327
|
-
)
|
|
328
|
-
|
|
329
|
-
SilentOption = typer.Option(
|
|
330
|
-
False,
|
|
331
|
-
"--silent",
|
|
332
|
-
help="Turns off intermediate output to console.",
|
|
333
|
-
callback=_context_callback("silent"),
|
|
334
|
-
is_flag=True,
|
|
335
|
-
rich_help_panel=_CLI_BEHAVIOUR,
|
|
336
|
-
is_eager=True,
|
|
337
|
-
)
|
|
338
|
-
|
|
339
|
-
VerboseOption = typer.Option(
|
|
340
|
-
False,
|
|
341
|
-
"--verbose",
|
|
342
|
-
"-v",
|
|
343
|
-
help="Displays log entries for log levels `info` and higher.",
|
|
344
|
-
callback=_context_callback("verbose"),
|
|
345
|
-
is_flag=True,
|
|
346
|
-
rich_help_panel=_CLI_BEHAVIOUR,
|
|
347
|
-
)
|
|
348
|
-
|
|
349
|
-
DebugOption = typer.Option(
|
|
350
|
-
False,
|
|
351
|
-
"--debug",
|
|
352
|
-
help="Displays log entries for log levels `debug` and higher; debug logs contains additional information.",
|
|
353
|
-
callback=_context_callback("enable_tracebacks"),
|
|
354
|
-
is_flag=True,
|
|
355
|
-
rich_help_panel=_CLI_BEHAVIOUR,
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
# If IfExistsOption, IfNotExistsOption, or ReplaceOption are used with names other than those in CREATE_MODE_OPTION_NAMES,
|
|
360
|
-
# you must also override mutually_exclusive if you want to retain the validation that at most one of these flags is
|
|
361
|
-
# passed.
|
|
362
|
-
CREATE_MODE_OPTION_NAMES = ["if_exists", "if_not_exists", "replace"]
|
|
363
|
-
|
|
364
|
-
IfExistsOption = OverrideableOption(
|
|
365
|
-
False,
|
|
366
|
-
"--if-exists",
|
|
367
|
-
help="Only apply this operation if the specified object exists.",
|
|
368
|
-
mutually_exclusive=CREATE_MODE_OPTION_NAMES,
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
IfNotExistsOption = OverrideableOption(
|
|
372
|
-
False,
|
|
373
|
-
"--if-not-exists",
|
|
374
|
-
help="Only apply this operation if the specified object does not already exist.",
|
|
375
|
-
mutually_exclusive=CREATE_MODE_OPTION_NAMES,
|
|
376
|
-
)
|
|
377
|
-
|
|
378
|
-
ReplaceOption = OverrideableOption(
|
|
379
|
-
False,
|
|
380
|
-
"--replace",
|
|
381
|
-
help="Replace this object if it already exists.",
|
|
382
|
-
mutually_exclusive=CREATE_MODE_OPTION_NAMES,
|
|
383
|
-
)
|
|
384
|
-
|
|
385
|
-
OnErrorOption = typer.Option(
|
|
386
|
-
OnErrorType.BREAK.value,
|
|
387
|
-
"--on-error",
|
|
388
|
-
help="What to do when an error occurs. Defaults to break.",
|
|
389
|
-
)
|
|
390
|
-
|
|
391
|
-
NoInteractiveOption = typer.Option(False, "--no-interactive", help="Disable prompting.")
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
def entity_argument(entity_type: str) -> typer.Argument:
|
|
395
|
-
return typer.Argument(None, help=f"ID of {entity_type} entity.")
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
def variables_option(description: str):
|
|
399
|
-
return typer.Option(
|
|
400
|
-
None,
|
|
401
|
-
"--variable",
|
|
402
|
-
"-D",
|
|
403
|
-
help=description,
|
|
404
|
-
show_default=False,
|
|
405
|
-
)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
ExecuteVariablesOption = variables_option(
|
|
409
|
-
'Variables for the execution context. For example: `-D "<key>=<value>"`. '
|
|
410
|
-
"For SQL files variables are use to expand the template and any unknown variable will cause an error. "
|
|
411
|
-
"For Python files variables are used to update os.environ dictionary. Provided keys are capitalized to adhere to best practices."
|
|
412
|
-
"In case of SQL files string values must be quoted in `''` (consider embedding quoting in the file).",
|
|
413
|
-
)
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
def like_option(help_example: str):
|
|
417
|
-
return typer.Option(
|
|
418
|
-
"%%",
|
|
419
|
-
"--like",
|
|
420
|
-
"-l",
|
|
421
|
-
help=f"SQL LIKE pattern for filtering objects by name. For example, {help_example}.",
|
|
422
|
-
)
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
def _pattern_option_callback(value):
|
|
426
|
-
if value and value.count("'") != value.count("\\'"):
|
|
427
|
-
raise ClickException('All "\'" characters in PATTERN must be escaped: "\\\'"')
|
|
428
|
-
return value
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
PatternOption = typer.Option(
|
|
432
|
-
None,
|
|
433
|
-
"--pattern",
|
|
434
|
-
help=(
|
|
435
|
-
"Regex pattern for filtering files by name."
|
|
436
|
-
r' For example --pattern ".*\.txt" will filter only files with .txt extension.'
|
|
437
|
-
),
|
|
438
|
-
show_default=False,
|
|
439
|
-
callback=_pattern_option_callback,
|
|
440
|
-
)
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
def experimental_option(
|
|
444
|
-
experimental_behaviour_description: Optional[str] = None,
|
|
445
|
-
) -> typer.Option:
|
|
446
|
-
help_text = (
|
|
447
|
-
f"Turns on experimental behaviour of the command: {experimental_behaviour_description}"
|
|
448
|
-
if experimental_behaviour_description
|
|
449
|
-
else "Turns on experimental behaviour of the command."
|
|
450
|
-
)
|
|
451
|
-
return typer.Option(
|
|
452
|
-
False,
|
|
453
|
-
"--experimental",
|
|
454
|
-
help=help_text,
|
|
455
|
-
hidden=True,
|
|
456
|
-
callback=_context_callback("experimental"),
|
|
457
|
-
is_flag=True,
|
|
458
|
-
rich_help_panel=_CLI_BEHAVIOUR,
|
|
459
|
-
)
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
class IdentifierType(click.ParamType):
|
|
463
|
-
name = "TEXT"
|
|
464
|
-
|
|
465
|
-
def convert(self, value, param, ctx):
|
|
466
|
-
return FQN.from_string(value)
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
class IdentifierStageType(click.ParamType):
|
|
470
|
-
name = "TEXT"
|
|
471
|
-
|
|
472
|
-
def convert(self, value, param, ctx):
|
|
473
|
-
return FQN.from_stage(value)
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
def identifier_argument(
|
|
477
|
-
sf_object: str,
|
|
478
|
-
example: str,
|
|
479
|
-
click_type: click.ParamType = IdentifierType(),
|
|
480
|
-
callback: Callable | None = None,
|
|
481
|
-
) -> typer.Argument:
|
|
482
|
-
return typer.Argument(
|
|
483
|
-
...,
|
|
484
|
-
help=f"Identifier of the {sf_object}. For example: {example}",
|
|
485
|
-
show_default=False,
|
|
486
|
-
click_type=click_type,
|
|
487
|
-
callback=callback,
|
|
488
|
-
)
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
def identifier_stage_argument(
|
|
492
|
-
sf_object: str, example: str, callback: Callable | None = None
|
|
493
|
-
) -> typer.Argument:
|
|
494
|
-
return identifier_argument(
|
|
495
|
-
sf_object, example, click_type=IdentifierStageType(), callback=callback
|
|
496
|
-
)
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
def execution_identifier_argument(sf_object: str, example: str) -> typer.Argument:
|
|
500
|
-
return typer.Argument(
|
|
501
|
-
...,
|
|
502
|
-
help=f"Execution identifier of the {sf_object}. For example: {example}",
|
|
503
|
-
show_default=False,
|
|
504
|
-
)
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
def project_definition_option(is_optional: bool):
|
|
508
|
-
def project_path_callback(project_path: str) -> str:
|
|
509
|
-
ctx_mgr = get_cli_context_manager()
|
|
510
|
-
ctx_mgr.project_path_arg = project_path
|
|
511
|
-
ctx_mgr.project_is_optional = is_optional
|
|
512
|
-
return project_path
|
|
513
|
-
|
|
514
|
-
return typer.Option(
|
|
515
|
-
None,
|
|
516
|
-
"-p",
|
|
517
|
-
"--project",
|
|
518
|
-
help=f"Path where Snowflake project resides. "
|
|
519
|
-
f"Defaults to current working directory.",
|
|
520
|
-
callback=project_path_callback,
|
|
521
|
-
show_default=False,
|
|
522
|
-
)
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
def project_env_overrides_option():
|
|
526
|
-
def project_env_overrides_callback(
|
|
527
|
-
env_overrides_args_list: list[str],
|
|
528
|
-
) -> dict[str, str]:
|
|
529
|
-
env_overrides_args_map = {
|
|
530
|
-
v.key: v.value for v in parse_key_value_variables(env_overrides_args_list)
|
|
531
|
-
}
|
|
532
|
-
get_cli_context_manager().project_env_overrides_args = env_overrides_args_map
|
|
533
|
-
return env_overrides_args_map
|
|
534
|
-
|
|
535
|
-
return typer.Option(
|
|
536
|
-
[],
|
|
537
|
-
"--env",
|
|
538
|
-
help="String in format of key=value. Overrides variables from env section used for templates.",
|
|
539
|
-
callback=project_env_overrides_callback,
|
|
540
|
-
show_default=False,
|
|
541
|
-
)
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
def deprecated_flag_callback(msg: str):
|
|
545
|
-
def _warning_callback(ctx: click.Context, param: click.Parameter, value: Any):
|
|
546
|
-
if ctx.get_parameter_source(param.name) != click.core.ParameterSource.DEFAULT: # type: ignore[attr-defined]
|
|
547
|
-
cli_console.warning(message=msg)
|
|
548
|
-
return value
|
|
549
|
-
|
|
550
|
-
return _warning_callback
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
def deprecated_flag_callback_enum(msg: str):
|
|
554
|
-
def _warning_callback(ctx: click.Context, param: click.Parameter, value: Any):
|
|
555
|
-
if ctx.get_parameter_source(param.name) != click.core.ParameterSource.DEFAULT: # type: ignore[attr-defined]
|
|
556
|
-
cli_console.warning(message=msg)
|
|
557
|
-
# Typer bug: enums passed through callback are turning into None,
|
|
558
|
-
# unless their explicit value is returned ¯\_(ツ)_/¯
|
|
559
|
-
return value.value
|
|
560
|
-
|
|
561
|
-
return _warning_callback
|