QCElemental icon indicating copy to clipboard operation
QCElemental copied to clipboard

BaseSettings has moved to a new package pydantic-settings

Open shivupa opened this issue 1 year ago • 5 comments

Describe the bug https://github.com/MolSSI/QCElemental/blob/7b048906d173a5ad872a7185c76c42a16f2136db/qcelemental/util/autodocs.py#L6

BaseSettings has moved to a new package pydantic-settings

https://docs.pydantic.dev/latest/migration/#basesettings-has-moved-to-pydantic-settings https://github.com/pydantic/pydantic-settings

**To Reproduce ~conda list~ Not used. Can't currently run: python -c "import qcelemental as qcel; print(qcel.__file__, qcel.__version__)"

Expected behavior Be able to import qcelemental

shivupa avatar Jul 04 '23 15:07 shivupa

I am hitting the same problem. The issue seems to be that with Pydantic V2 some API breaking changes have been introduced. Nevertheless, QCElemental lists this https://github.com/MolSSI/QCElemental/blob/7b048906d173a5ad872a7185c76c42a16f2136db/pyproject.toml#L34 as a dependency, which includes version 2 and higher. A quick fix would be to restrict pydantic to versions less than 2.

hjjvandam avatar Jul 09 '23 18:07 hjjvandam

Agreed, I need to add the pydantic<2.0 restriction generally and mint a new version. I did do a new build number in conda with the restriction, but that doesn't help the src and pip usages. Thanks for the ping.

loriab avatar Jul 10 '23 04:07 loriab

Has this been resolved in the current conda build?

wiederm avatar Jul 31 '23 11:07 wiederm

The conda package v0.26.0 as of an hour ago works in the presence of pydantic v1 or v2. It's still using the v1 API, so I'll leave this open for the v2 migration and for general info.

loriab avatar Jul 31 '23 22:07 loriab

great, thank you for the fix!

wiederm avatar Aug 01 '23 07:08 wiederm