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

pydantic v2 Warnings: The dict method is deprecated; use model_dump instead #48

Closed
bVdCreations opened this issue Aug 12, 2023 · 3 comments

Comments

@bVdCreations
Copy link
Contributor

Hi, after migrating to pydantic v2 I have notice a lot of warnings popping up.

pydantic.warnings.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.1.1/migration/

This is because of the dispatch fastapi_events/dispatcher.py:119: in dispatch
payload = payload_schema_cls(**(payload or {})).dict(**payload_schema_cls_dict_args)

@melvinkcx
Copy link
Owner

Hi, thanks for reporting this, we'll have some time before this becomes an issue. I'll look into this perhaps in a week or so. Meanwhile, feel free to take a look at this if you're interested. :)

@bVdCreations
Copy link
Contributor Author

@melvinkcx I will see if I find some time this weekend

@melvinkcx
Copy link
Owner

This has been resolved and released in v0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants