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

BaseSettings has moved to a new package pydantic-settings #312

Open
shivupa opened this issue Jul 4, 2023 · 5 comments
Open

BaseSettings has moved to a new package pydantic-settings #312

shivupa opened this issue Jul 4, 2023 · 5 comments

Comments

@shivupa
Copy link

shivupa commented Jul 4, 2023

Describe the bug

from pydantic import BaseModel, BaseSettings

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

@hjjvandam
Copy link

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

pydantic = ">=1.8.2"
as a dependency, which includes version 2 and higher. A quick fix would be to restrict pydantic to versions less than 2.

@loriab
Copy link
Collaborator

loriab commented Jul 10, 2023

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.

@wiederm
Copy link

wiederm commented Jul 31, 2023

Has this been resolved in the current conda build?

@loriab
Copy link
Collaborator

loriab commented Jul 31, 2023

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.

@wiederm
Copy link

wiederm commented Aug 1, 2023

great, thank you for the fix!

berquist added a commit to berquist/cclib-ci that referenced this issue Nov 15, 2023
- pyscf < 2.3 in order to keep bridge test passing
- pydantic < 2 because of MolSSI/QCElemental#312
  - adding qcelemental >= 0.26 instead wasn't working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants