Skip to content

Commit 9ae0876

Browse files
committed
Do not use logging.warn().
The `logging.warn()` method is deprecated, the correct method is `logging.warning()` instead.
1 parent ea22766 commit 9ae0876

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/incatools/odk/download.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ def download_file(
162162
logging.info(f"{output.name}: Not modified at {url}")
163163
return 304
164164
elif response.status_code == 404:
165-
logging.warn(f"{output.name}: Not found at {url}")
165+
logging.warning(f"{output.name}: Not found at {url}")
166166
return 404
167167
elif response.status_code in RETRIABLE_HTTP_ERRORS and n_try < max_retry:
168168
n_try += 1
169-
logging.warn(
169+
logging.warning(
170170
f"{output.name}: Transient HTTP error, retrying ({n_try}/{max_retry}"
171171
)
172172
sleep(1)
@@ -176,7 +176,7 @@ def download_file(
176176
# `curl --retry` retries on timeout errors, and so do we
177177
if n_try < max_retry:
178178
n_try += 1
179-
logging.warn(
179+
logging.warning(
180180
f"{output.name}: Timeout when connecting to {hostname}, retrying ({n_try}/{max_retry})"
181181
)
182182
sleep(1)

0 commit comments

Comments
 (0)