-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Update pydantic to 1.10.17 #119430
Conversation
Looks like all the wheels are working |
testing this now |
It looks like there is a breaking change |
The CI is failing as well |
All the tests fail on the uiprotect library as well. It seems private attributes are broken in .16 Downgrading to |
I looked at the pydantic docs and it seem like the uiprotect library is doing private attrs correctly but maybe not. Maybe you can spot an error there? |
😮💨 They don't seem to get it right, do they? The plan as I know it, is to end support for Unfortunately, it's a busy week for me. So I won't have the time to fix it myself. |
The break is a result of the change here: pydantic/pydantic@5adc381#diff-a20bff027a309d77bb05981c6385eaed08dc7cbce12358c201076a4f1bf04733R13-R16 A minimal repo: from pydantic import BaseModel
try:
from pydantic.v1 import BaseModel
from pydantic.v1.fields import PrivateAttr
except ImportError:
from pydantic import BaseModel
from pydantic.fields import PrivateAttr
class Model(BaseModel):
_val: int | None = PrivateAttr(None)
m = Model()
m._val = 1
|
Thanks. Thats a bit annoying. We can change it in uiprotect for sure. I can do that after dinner. I'm a bit worried it will be an issue for other libraries as well though |
I attempted that change, but it looks like there is more breakage. It seems limited to python 3.12 |
Feel free to push to my PR at uilibs/uiprotect#39. You should have access now |
a90f078
to
e10456c
Compare
Might be fixed by pydantic/pydantic#9660 |
e10456c
to
27d0432
Compare
from pydantic.error_wrappers import ValidationError | ||
from pydantic import ValidationError | ||
from xbox.webapi.api.client import XboxLiveClient |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
Verified uiprotect CI is passing with this version as well. |
Proposed change
https://github.com/pydantic/pydantic/releases/tag/v1.10.16
pydantic/pydantic@v1.10.15...v1.10.16
https://github.com/pydantic/pydantic/releases/tag/v1.10.17
pydantic/pydantic@v1.10.16...v1.10.17
https://github.com/home-assistant/core/actions/runs/9471830653
https://github.com/home-assistant/core/actions/runs/9599604587
https://wheels.home-assistant.io/musllinux/
Last bump: #116401
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: