-
Notifications
You must be signed in to change notification settings - Fork 78
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
Dependencies: Update pydantic~=2.4
#977
Conversation
Thanks @sphuber! Quick question: if we merge this, the next |
Indirectly, yes. But you can put it also the other way around. Without this fix,
Technically that is not really our responsiblity. Package managers like
I would say yes absolutely, because we directly use it. So we should specify what requirements |
b2dfaef
to
1e008d7
Compare
1e008d7
to
c01eb07
Compare
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.
No notes, thanks @sphuber!
f0dd026
to
0a94288
Compare
The requirement for `pydantic` was pinned to `v1` since `v2` has a lot of backwards incompatible changes and it is difficult to provide a version that is compatible with both versions. As of `v2.5.0`, `aiida-core` also directly depends on `pydantic` and it requires `~=2.4`, so here we apply the same requirement. The deprecated code is replaced. As a side effect, a test for `PwCalculation` started failing. It was testing that no warnings were raised for specific inputs, but some warnings _were_ being raised. These were not the warnings tested for in the tests though, but raised by SQLAlchemy. AiiDA v2.5 upgraded to SQLAlchemy v2 which as of v2.0.19 started emitting a warning. This is ignored by a filter in `aiida-core`, but this is made undone by `pytest`. The warning is filtered again in the `pyproject.toml` config for `pytest` but this is not considered by `pytest.warns`. Therefore, the warnings in `PwCalculation` are turned into the more specific `UserWarning` such that the test can explicitly check for those.
0a94288
to
5fb5833
Compare
I think we are long due for a release. Marnik had planned on preparing it but hasn't come around to it. I think I will start preparing it now and have him review it |
The requirement for
pydantic
was pinned tov1
sincev2
has a lot of backwards incompatible changes and it is difficult to provide a version that is compatible with both versions.As of
v2.5.0
,aiida-core
also directly depends onpydantic
and it requires~=2.4
, so here we apply the same requirement. The deprecated code is replaced.