From f10465f887fa7b94c05463ccd134756d824372cf Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 21 Aug 2024 15:16:40 -0500 Subject: [PATCH 1/2] chore: change warning to debug --- src/ape/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ape/utils/misc.py b/src/ape/utils/misc.py index 12c8cac9a4..43abd1acc6 100644 --- a/src/ape/utils/misc.py +++ b/src/ape/utils/misc.py @@ -189,7 +189,7 @@ def get_package_version(obj: Any) -> str: if found_paths: message = f"{message}\nInstallation paths:\n\t{found_paths_str}" - logger.warning(message) + logger.debug(message) try: return str(version_metadata(pkg_name)) From 8ddda936dac44ec605097e5004147dae6967993a Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 21 Aug 2024 15:29:22 -0500 Subject: [PATCH 2/2] chore: delete warning --- src/ape/utils/misc.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/ape/utils/misc.py b/src/ape/utils/misc.py index 43abd1acc6..08eefd8cf2 100644 --- a/src/ape/utils/misc.py +++ b/src/ape/utils/misc.py @@ -177,20 +177,7 @@ def get_package_version(obj: Any) -> str: # NOTE: In case the distribution and package name differ dists = _get_distributions(pkg_name) if dists: - num_packages = len(dists) pkg_name = dists[0].metadata["Name"] - - if num_packages != 1: - # Warn that there are more than 1 package with this name, - # which can lead to odd behaviors. - found_paths = [str(d._path) for d in dists if hasattr(d, "_path")] - found_paths_str = ",\n\t".join(found_paths) - message = f"Found {num_packages} packages named '{pkg_name}'." - if found_paths: - message = f"{message}\nInstallation paths:\n\t{found_paths_str}" - - logger.debug(message) - try: return str(version_metadata(pkg_name))