You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Setting model config parameters as class kwargs doesn't work when using pydantic v2:
This is caused by a bug in the meta-class:
sqlmodel/sqlmodel/main.py
Lines 529 to 535 in 4bac032
where
allowed_config_kwargs
is{'copy', 'pop', 'values', 'keys', 'fromkeys', 'items', 'update', 'setdefault', 'popitem', 'get', 'clear'}
With Pydantic v2,
BaseConfig
is aliased toConfigDict
which doesn't have the config keys as attributes.Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.24
Python Version
3.13.2
Additional Context
Pydantic version: 2.11.7
Beta Was this translation helpful? Give feedback.
All reactions