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

Update pydantic to 1.10.17 #119430

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions homeassistant/components/sfr_box/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,19 @@ async def async_get_config_entry_diagnostics(
},
"data": {
"dsl": async_redact_data(
dataclasses.asdict(
await data.system.box.dsl_get_info() # type:ignore [call-overload]
),
dataclasses.asdict(await data.system.box.dsl_get_info()),
TO_REDACT,
),
"ftth": async_redact_data(
dataclasses.asdict(
await data.system.box.ftth_get_info() # type:ignore [call-overload]
),
dataclasses.asdict(await data.system.box.ftth_get_info()),
TO_REDACT,
),
"system": async_redact_data(
dataclasses.asdict(
await data.system.box.system_get_info() # type:ignore [call-overload]
),
dataclasses.asdict(await data.system.box.system_get_info()),
TO_REDACT,
),
"wan": async_redact_data(
dataclasses.asdict(
await data.system.box.wan_get_info() # type:ignore [call-overload]
),
dataclasses.asdict(await data.system.box.wan_get_info()),
TO_REDACT,
),
},
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/xbox/media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from contextlib import suppress
from dataclasses import dataclass

from pydantic.error_wrappers import ValidationError
from pydantic import ValidationError

Check warning on line 8 in homeassistant/components/xbox/media_source.py

View check run for this annotation

Codecov / codecov/patch

homeassistant/components/xbox/media_source.py#L8

Added line #L8 was not covered by tests
from xbox.webapi.api.client import XboxLiveClient
Comment on lines -8 to 9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a breaking change in pydantic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Probably just an issue with pylint as pydantic is compiled. Somehow pylint isn't able to determine the module names properly.

Anyway, ValidationError is importable from both pydantic and pydantic.error_wrappers.

from xbox.webapi.api.provider.catalog.models import FieldsTemplate, Image
from xbox.webapi.api.provider.gameclips.models import GameclipsResponse
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ backoff>=2.0

# Required to avoid breaking (#101042).
# v2 has breaking changes (#99218).
pydantic==1.10.15
pydantic==1.10.17

# Breaks asyncio
# https://github.com/pubnub/python/issues/130
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ freezegun==1.5.0
mock-open==1.4.0
mypy-dev==1.11.0a6
pre-commit==3.7.1
pydantic==1.10.15
pydantic==1.10.17
pylint==3.2.2
pylint-per-file-ignores==1.3.2
pipdeptree==2.19.0
Expand Down
2 changes: 1 addition & 1 deletion script/gen_requirements_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

# Required to avoid breaking (#101042).
# v2 has breaking changes (#99218).
pydantic==1.10.15
pydantic==1.10.17

# Breaks asyncio
# https://github.com/pubnub/python/issues/130
Expand Down
2 changes: 1 addition & 1 deletion tests/components/lametric/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from unittest.mock import AsyncMock, MagicMock, patch

from demetriek import CloudDevice, Device
from pydantic import parse_raw_as
from pydantic import parse_raw_as # pylint: disable=no-name-in-module
import pytest
from typing_extensions import Generator

Expand Down
Loading