failed WRONG_FIX UNSUBMITTED wrong_fix_unsubmitted(None) · None tool calls · 0 s · fastapi/fastapi
(not found in data/tasks.jsonl)
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -1,6 +1,6 @@
import inspect
from contextlib import AsyncExitStack, contextmanager
-from copy import deepcopy
+from copy import copy, deepcopy
from typing import (
Any,
Callable,
@@ -384,6 +384,8 @@ def analyze_param(
field_info.annotation = type_annotation
if depends is not None and depends.dependency is None:
+ # Copy `depends` before mutating it
+ depends = copy(depends)
depends.dependency = type_annotation
if lenient_issubclass(
==================================== ERRORS ====================================
_________ ERROR collecting tests/test_generic_parameterless_depends.py _________
tests/test_generic_parameterless_depends.py:7: in <module>
app = FastAPI()
^^^^^^^^^
fastapi/applications.py:896: in __init__
] = webhooks or routing.APIRouter()
^^^^^^^^^^^^^^^^^^^
fastapi/routing.py:787: in __init__
super().__init__(
E TypeError: Router.__init__() got an unexpected keyword argument 'on_startup'
=============================== warnings summary ===============================
fastapi/applications.py:18
/private/tmp/swe_work/mined_oracle/fastapi_9479/b/workspace/fastapi/applications.py:18: StarletteDeprecationWarning: 'HTTP_422_UNPROCESSABLE_ENTITY' is deprecated. Use 'HTTP_422_UNPROCESSABLE_CONTENT' instead.
from fastapi.exception_handlers import (
fastapi/applications.py:30
/private/tmp/swe_work/mined_oracle/fastapi_9479/b/workspace/fastapi/applications.py:30: StarletteDeprecationWarning: 'HTTP_422_UNPROCESSABLE_ENTITY' is deprecated. Use 'HTTP_422_UNPROCESSABLE_CONTENT' instead.
from fastapi.openapi.utils import get_openapi
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
2 warnings, 1 error in 0.44s