aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
53 stars 78 forks source link

Dependencies: Update `pydantic~=2.4` #977

Closed sphuber closed 9 months ago

sphuber commented 11 months ago

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.

mbercx commented 10 months ago

Thanks @sphuber! Quick question: if we merge this, the next aiida-quantumespresso release would only be compatible with aiida-core~=2.5, correct? Don't we have to update the aiida-core dependency then? And if we do, do we still need an explicit dependency on pydantic here?

sphuber commented 10 months ago

Quick question: if we merge this, the next aiida-quantumespresso release would only be compatible with aiida-core~=2.5, correct?

Indirectly, yes. But you can put it also the other way around. Without this fix, aiida-quantumespresso will be incompatible with aiida-core>=2.5. Given the big changes between pydantic v1 and v2, it is almost impossible to have compatibility for both versions at the same time, and so our hand is pretty much forced. But aiida-core is forward compatible in the minor versions, so it shouldn't be a problem. Everyone should be able to update without issues.

Don't we have to update the aiida-core dependency then?

Technically that is not really our responsiblity. Package managers like pip will figure this out.

And if we do, do we still need an explicit dependency on pydantic here?

I would say yes absolutely, because we directly use it. So we should specify what requirements aiida-quantumespresso has on that package

unkcpz commented 8 months ago

@sphuber @mbercx Plan to make a release with this commit? We want to give it a test on AiiDAlab.

sphuber commented 8 months ago

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