Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, thank you for the libraries you made.
I wish both version 1 and version 2 could be supported
This pull request includes updates to the
pydantic_sqlalchemy
library to support the new version of Pydantic and some dependency updates in the project configuration. The key changes involve modifications to the configuration class and the creation of Pydantic models from SQLAlchemy models.Updates to support Pydantic v2:
pydantic_sqlalchemy/main.py
: ReplacedBaseConfig
withConfigDict
for Pydantic configuration and updated theOrmConfig
class to use the new configuration format. ([pydantic_sqlalchemy/main.pyL3-R10](https://github.com/tiangolo/pydantic-sqlalchemy/pull/129/files#diff-e4f4ae85f18db30c044c31032df2f460a3e47f9fc07f50a7d731132fec871b58L3-R10)
)pydantic_sqlalchemy/main.py
: Updated thesqlalchemy_to_pydantic
function to use the newmodel_config
attribute from the updatedOrmConfig
class. ([pydantic_sqlalchemy/main.pyL36-R37](https://github.com/tiangolo/pydantic-sqlalchemy/pull/129/files#diff-e4f4ae85f18db30c044c31032df2f460a3e47f9fc07f50a7d731132fec871b58L36-R37)
)Dependency updates:
pyproject.toml
: Updated the Pydantic dependency to version>=2.0.0,<2.9.2
. ([pyproject.tomlL17-R17](https://github.com/tiangolo/pydantic-sqlalchemy/pull/129/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L17-R17)
)