Skip to content

Commit

Permalink
Fix a few more logger.warn calls
Browse files Browse the repository at this point in the history
  • Loading branch information
zklaus committed Jun 8, 2024
1 parent 4561699 commit c5cf69a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4073,11 +4073,11 @@ def handle_pypi_upload(wheels, config):
try:
utils.check_call_env(args + [f])
except:
utils.get_logger(__name__).warn(
utils.get_logger(__name__).warning(
"wheel upload failed - is twine installed?"
" Is this package registered?"
)
utils.get_logger(__name__).warn(f"Wheel file left in {f}")
utils.get_logger(__name__).warning(f"Wheel file left in {f}")

else:
print(f"anaconda_upload is not set. Not uploading wheels: {wheels}")
Expand Down
2 changes: 1 addition & 1 deletion conda_build/inspect_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def inspect_linkages(
if relative:
precs = list(which_package(relative, prefix))
if len(precs) > 1:
get_logger(__name__).warn(
get_logger(__name__).warning(
"Warning: %s comes from multiple packages: %s",
path,
comma_join(map(str, precs)),
Expand Down
6 changes: 3 additions & 3 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def get_selectors(config: Config) -> dict[str, bool]:
if not np:
np = defaults["numpy"]
if config.verbose:
utils.get_logger(__name__).warn(
utils.get_logger(__name__).warning(
"No numpy version specified in conda_build_config.yaml. "
"Falling back to default numpy value of {}".format(defaults["numpy"])
)
Expand Down Expand Up @@ -995,7 +995,7 @@ def _toposort_outputs(output_tuples: list[OutputTuple]) -> list[OutputTuple]:
non_conda_outputs.append(output_tuple)
else:
# TODO: is it even possible to get here? and if so should we silently ignore or error?
utils.get_logger(__name__).warn("Found an output without a name, skipping")
utils.get_logger(__name__).warning("Found an output without a name, skipping")

# Iterate over conda packages, creating a mapping of package names to their
# dependencies to be used in toposort
Expand Down Expand Up @@ -2326,7 +2326,7 @@ def extract_single_output_text(
output = output_matches[output_index] if output_matches else ""
except ValueError:
if not self.path and self.meta.get("extra", {}).get("parent_recipe"):
utils.get_logger(__name__).warn(
utils.get_logger(__name__).warning(
f"Didn't match any output in raw metadata. Target value was: {output_name}"
)
output = ""
Expand Down
2 changes: 1 addition & 1 deletion conda_build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ def find_recipe(path: str) -> str:

metas = [m for m in VALID_METAS if os.path.isfile(os.path.join(path, m))]
if len(metas) == 1:
get_logger(__name__).warn(
get_logger(__name__).warning(
"Multiple meta files found. "
f"The {metas[0]} file in the base directory ({path}) "
"will be used."
Expand Down

0 comments on commit c5cf69a

Please sign in to comment.