Open febus982 opened 6 months ago
I found a similar issue: https://github.com/pydantic/pydantic/issues/8153
For now, I used a temporary workaround similar to the one suggested in the comments.
# pyproject.toml
[tool.pytest.ini_options]
filterwarnings = [
"ignore:The `__fields__`.*deprecated, use `model_fields`.*:DeprecationWarning"
]
Thanks @AlleLouis for linking the other issue in pydantic repository.
Honestly it doesn't look correct to just suppress the warning because it would just hide the issue.
It would be great to confirm if this fix https://github.com/pydantic/pydantic/pull/8262 will also fix this issue.
Using the object provider to store a pydantic model triggers a deprecation warning.
This is the raised warning
I believe the warning is raised during wiring, because removing the
WiringConfiguration
from the container removes the warning (and, of course, the container wiring)