mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 07:08:09 -05:00
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 ```
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user