fix: Resolve `logger.warn(..)` deprecration warnings (#9938)

This small PR resolves the deprecation warnings of the `logger` library:
```
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
```
pull/9930/head^2
Emmanuel Ferdman 2025-05-16 11:56:03 +03:00 committed by GitHub
parent c73c6fe5c3
commit e5368f3857
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
async def auth_middleware(request: Request): async def auth_middleware(request: Request):
if not settings.ENABLE_AUTH: if not settings.ENABLE_AUTH:
# If authentication is disabled, allow the request to proceed # If authentication is disabled, allow the request to proceed
logger.warn("Auth disabled") logger.warning("Auth disabled")
return {} return {}
security = HTTPBearer() security = HTTPBearer()

View File

@ -410,7 +410,7 @@ class WebArenaChallenge(BaseChallenge):
config, timeout, mock=bool(request.config.getoption("--mock")) config, timeout, mock=bool(request.config.getoption("--mock"))
): ):
if not step.output: if not step.output:
logger.warn(f"Step has no output: {step}") logger.warning(f"Step has no output: {step}")
continue continue
n_steps += 1 n_steps += 1