Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Remove use of deprecated logging methods. #121

Merged
merged 1 commit into from
Jan 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions mathlibtools/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ def find_local_with_fallback(self, rev: Commit, fallback: CacheFallback) -> Loca
if len(caches) > 1:
archive_items = ''.join([f'\n * {short_sha(c.rev)}' for c in caches])
commit_args = ''.join([f' {short_sha(c.rev)}^!' for c in caches])
log.warn(
log.warning(
f"No cache was available for {short_sha(rev)}.\n"
f"There are multiple viable caches from parent commits:{archive_items}\n"
f"To see the commits in question, run:\n"
f" git log --graph {short_sha(rev)}{commit_args}")
else:
log.warn(
log.warning(
f"No cache was available for {short_sha(rev)}. "
f"A cache was found for the ancestor {short_sha(cache.rev)}.\n"
f"To see the intermediate commits, run:\n"
Expand Down Expand Up @@ -561,9 +561,10 @@ def get_mathlib_olean(self) -> None:
mathlib)"""
if self.is_mathlib:
# user should have run `get-cache` not `get-mathlib-cache
log.warn("`get-mathlib-cache` is for projects which depend on "
"mathlib, not for mathlib itself. "
"Running `get-cache` instead.")
log.warning(
"`get-mathlib-cache` is for projects which depend on "
"mathlib, not for mathlib itself. "
"Running `get-cache` instead.")
return self.get_cache()

repo = self.mathlib_repo
Expand Down