diff --git a/src/snowflake/cli/plugins/nativeapp/artifacts.py b/src/snowflake/cli/plugins/nativeapp/artifacts.py index e623502e75..cc4aa67228 100644 --- a/src/snowflake/cli/plugins/nativeapp/artifacts.py +++ b/src/snowflake/cli/plugins/nativeapp/artifacts.py @@ -3,7 +3,7 @@ from pathlib import Path from typing import List, Optional, Tuple, Union -import strictyaml +import yaml from click import ClickException from snowflake.cli.api.constants import DEFAULT_SIZE_LIMIT_MB from snowflake.cli.api.project.schemas.native_app.path_mapping import PathMapping @@ -271,7 +271,7 @@ def find_version_info_in_manifest_file( with SecurePath(manifest_file).open( "r", read_file_limit_mb=DEFAULT_SIZE_LIMIT_MB ) as file: - manifest_content = strictyaml.load(file.read()) + manifest_content = yaml.load(file.read(), Loader=yaml.BaseLoader) version_name: Optional[str] = None patch_name: Optional[str] = None diff --git a/tests_integration/conftest.py b/tests_integration/conftest.py index 633c7d4046..7313a67d2e 100644 --- a/tests_integration/conftest.py +++ b/tests_integration/conftest.py @@ -11,11 +11,11 @@ from typing import Any, Dict, List, Optional import pytest -import strictyaml +import yaml + from snowflake.cli.api.cli_global_context import cli_context_manager from snowflake.cli.api.project.definition import merge_left from snowflake.cli.app.cli_app import app_factory -from strictyaml import as_document from typer import Typer from typer.testing import CliRunner @@ -131,10 +131,12 @@ def _temporary_project_directory( test_data_file = test_root_path / "test_data" / "projects" / project_name shutil.copytree(test_data_file, temporary_working_directory, dirs_exist_ok=True) if merge_project_definition: - project_definition = strictyaml.load(Path("snowflake.yml").read_text()).data + project_definition = yaml.load( + Path("snowflake.yml").read_text(), Loader=yaml.BaseLoader + ) merge_left(project_definition, merge_project_definition) with open(Path(temporary_working_directory) / "snowflake.yml", "w") as file: - file.write(as_document(project_definition).as_yaml()) + file.write(yaml.dump(project_definition)) yield temporary_working_directory