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 · 1 comment · May be fixed by #641
Open

Pytest Warnings for deprecated pydantic styles #640

martincarapia opened this issue Nov 27, 2024 · 1 comment · May be fixed by #641
Assignees
Labels
bug Something isn't working python sdk Python SDK

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
@tcamise-gpsw tcamise-gpsw added demos Relating to demos (not SDKs) and removed triage Needs to be reviewed and assigned labels Jan 7, 2025
@tcamise-gpsw
Copy link
Collaborator

Thanks, I think you just need to rebase your PR and everything should pass

@tcamise-gpsw tcamise-gpsw self-assigned this Jan 7, 2025
@tcamise-gpsw tcamise-gpsw added python sdk Python SDK and removed demos Relating to demos (not SDKs) labels Jan 7, 2025
@github-project-automation github-project-automation bot moved this to To do in Python SDK Jan 8, 2025
@tcamise-gpsw tcamise-gpsw moved this from To do to In progress in Python SDK Jan 8, 2025
@tcamise-gpsw tcamise-gpsw moved this from In progress to Waiting for Feedback in Python SDK Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python sdk Python SDK
Projects
Status: Waiting for Feedback
Development

Successfully merging a pull request may close this issue.

2 participants