simonw / llm

Access large language models from the command-line
https://llm.datasette.io
Apache License 2.0
4.86k stars 273 forks source link

Fix warning about `dict()` v.s. `model_dump()` #554

Closed simonw closed 3 months ago

simonw commented 3 months ago

End of python -m pytest:

======== warnings summary ========
tests/test_keys.py: 4 warnings
tests/test_llm.py: 23 warnings
tests/test_templates.py: 4 warnings
  /Users/simon/.local/share/virtualenvs/llm-p4p8CDpq/lib/python3.10/site-packages/pydantic/main.py:1024: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/
    warnings.warn('The `dict` method is deprecated; use `model_dump` instead.', category=PydanticDeprecatedSince20)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======== 183 passed, 31 warnings in 2.28s ========