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

Pytest Warnings for deprecated pydantic styles #640

Open
martincarapia opened this issue Nov 27, 2024 · 0 comments · May be fixed by #641
Open

Pytest Warnings for deprecated pydantic styles #640

martincarapia opened this issue Nov 27, 2024 · 0 comments · May be fixed by #641
Labels
bug Something isn't working triage Needs to be reviewed and assigned

Comments

@martincarapia
Copy link

First ensure you are using a camera that is currently supported by Open GoPro. Any other tickets will be rejected.

Component
What is the bug in?
PythonSDK media_list.py
Media List and Metadata containers and helper methods

Describe the bug
/Users/richarddawkins/.pyenv/versions/3.11.4/envs/goproenv/lib/python3.11/site-packages/open_gopro/models/media_list.py:146: PydanticDeprecatedSince20: Pydantic V1 style @validator validators are deprecated. You should migrate to Pydantic V2 style @field_validator validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
@validator("file_system", pre=True, each_item=True)

To Reproduce
Create a pytest .py file that imports open_gopro and run it. You will get the same warning of deprecated use of "validators"

Expected behavior
You will see a warning saying
"PydanticDeprecatedSince20: Pydantic V1 style @validator validators are deprecated. You should migrate to Pydantic V2 style @field_validator validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
@validator("file_system", pre=True, each_item=True)"

Screenshots
image

Hardware
MacOS

Additional context
It's just a warning, but in order to suppress it you would just migrate the validator to field_validator.

@martincarapia martincarapia added the bug Something isn't working label Nov 27, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Nov 27, 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 triage Needs to be reviewed and assigned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant