From 2277f882c8b7aededfbc10d7ee61a513b8af4ca4 Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Mon, 11 Mar 2024 15:19:36 +0100 Subject: [PATCH] Cleanup --- pyproject.toml | 1 - src/snowflake/cli/plugins/snowpark/package_utils.py | 8 -------- src/snowflake/cli/plugins/snowpark/venv.py | 8 ++------ 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5c98e3c746..00af57691e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,6 @@ features = ["development"] [tool.hatch.envs.integration.scripts] test = ["pytest -m integration --snapshot-warn-unused"] -test_win = ["pytest -m integration tests_integration/test_package.py::TestPackage::test_package_from_github -vv"] [[tool.hatch.envs.local.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] diff --git a/src/snowflake/cli/plugins/snowpark/package_utils.py b/src/snowflake/cli/plugins/snowpark/package_utils.py index 33cd3967bd..ca344bece3 100644 --- a/src/snowflake/cli/plugins/snowpark/package_utils.py +++ b/src/snowflake/cli/plugins/snowpark/package_utils.py @@ -141,10 +141,6 @@ def install_packages( package_name, RequirementType.PACKAGE ) - log.warning( - "Dependencies: %s", [req.requirement.name for req in dependencies] - ) # TODO: delete debug log - if pip_install_result != 0: log.info(pip_failed_msg.format(pip_install_result)) return False, None @@ -169,10 +165,6 @@ def install_packages( dependencies, second_chance_results.snowflake if second_chance_results else None, ) - log.warning( - "Dependencies to be packed: %s", - [req.requirement.name for req in dependencies_to_be_packed], - ) # TODO: delete debug log log.info("Checking to see if packages have native libraries...") diff --git a/src/snowflake/cli/plugins/snowpark/venv.py b/src/snowflake/cli/plugins/snowpark/venv.py index 8e22a08594..d3b9a32d6a 100644 --- a/src/snowflake/cli/plugins/snowpark/venv.py +++ b/src/snowflake/cli/plugins/snowpark/venv.py @@ -96,10 +96,9 @@ def _get_dependencies(package: Requirement): requirement=package, files=files, dependencies=requires ) - log.warning( # TODO: change back to debug + log.debug( "Checking package %s, with dependencies: %s", package.name, requires ) - log.warning(installed_packages) for package in requires: _get_dependencies(Requirement.parse_line(package)) @@ -126,8 +125,7 @@ def _get_installed_packages_metadata(self): def get_pip_inspect(self) -> Dict: result = self.run_python(["-m", "pip", "inspect", "--local"]) - log.warning("Result of pip inspect:") - log.warning(result) # TODO: remove this calls + if result.returncode == 0: return json.loads(result.stdout) else: @@ -142,8 +140,6 @@ def _parse_info(self, package_name: str, info_type: PackageInfoType) -> List[str f"from importlib.metadata import {info_type.value}; print({info_type.value}('{package_name}'))", ] ) - log.warning("Result of: print(%s(%s))", info_type.value, package_name) - log.warning(info) # TODO remove this call if info.returncode != 0: return []