Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depreciado: método .json() do Pydantic #139

Open
augusto-herrmann opened this issue Oct 17, 2024 · 0 comments
Open

Depreciado: método .json() do Pydantic #139

augusto-herrmann opened this issue Oct 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@augusto-herrmann
Copy link
Member

Ao executar os testes, aparece um warning avisando que o método .json() será depreciado no Pydantic 3.0.

../../usr/local/lib/python3.11/site-packages/pydantic/main.py:1111
../../usr/local/lib/python3.11/site-packages/pydantic/main.py:1111
../../usr/local/lib/python3.11/site-packages/pydantic/main.py:1111
  /usr/local/lib/python3.11/site-packages/pydantic/main.py:1111: PydanticDeprecatedSince20: The `json` method is deprecated; use `model_dump_json` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
    warnings.warn(

participantes_test.py: 1 warning
plano_entregas/permissions_test.py: 2 warnings
plano_trabalho/permissions_test.py: 1 warning
user_test.py: 8 warnings
  /usr/local/lib/python3.11/site-packages/pydantic/main.py:1087: 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.8/migration/
    warnings.warn('The `dict` method is deprecated; use `model_dump` instead.', category=PydanticDeprecatedSince20)

Alterar a forma de serialização, mudando de .json() para .model_dump_json(), para que no futuro a aplicação possa ser atualizada para usar a versão 3.0 e posteriores do Pydantic.

@augusto-herrmann augusto-herrmann added the bug Something isn't working label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant