Skip to content

Commit

Permalink
Replace all usages of logging.warn() (deprecated) with `logging.war…
Browse files Browse the repository at this point in the history
…ning()`. (#197)
  • Loading branch information
craigwalton-dsit authored Aug 6, 2024
1 parent ee97951 commit 92f2b18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/inspect_ai/_util/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def http_rate_limit_count() -> int:

def warn_once(logger: Logger, message: str) -> None:
if message not in _warned:
logger.warn(message)
logger.warning(message)
_warned.append(message)


Expand Down
2 changes: 1 addition & 1 deletion src/inspect_ai/tool/_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def tool(
"""
if prompt:
print(prompt)
logger.warn(
logger.warning(
"WARNING: The prompt parameter is deprecated (please relocate "
+ "to the tool function's description doc comment)"
)
Expand Down

0 comments on commit 92f2b18

Please sign in to comment.