apply fix for new pydantic

This commit is contained in:
collerek
2021-02-28 09:20:42 +01:00
parent fd38ae2a40
commit 0c781c4d52
2 changed files with 16 additions and 11 deletions

View File

@ -93,9 +93,11 @@ class BaseField(FieldInfo):
:rtype: bool
"""
return (
field_name not in ["default", "default_factory", "alias"]
field_name not in ["default", "default_factory", "alias",
"allow_mutation"]
and not field_name.startswith("__")
and hasattr(cls, field_name)
and not callable(getattr(cls, field_name))
)
@classmethod

View File

@ -52,8 +52,11 @@ setup(
package_data={PACKAGE: ["py.typed"]},
include_package_data=True,
zip_safe=False,
python_requires=">=3.6",
data_files=[("", ["LICENSE.md"])],
install_requires=["databases", "pydantic>=1.5", "sqlalchemy", "typing_extensions"],
install_requires=["databases>=0.3.2,<=0.4.1", "pydantic>=1.6.1,<=1.8",
"sqlalchemy>=1.3.18,<=1.3.23",
"typing_extensions>=3.7,<=3.7.4.3"],
extras_require={
"postgresql": ["asyncpg", "psycopg2"],
"mysql": ["aiomysql", "pymysql"],