Closed ninoseki closed 1 year ago
There are lint & dependency audit errors.
I'm sure the lint error is out of the scope of this PR.
/home/runner/.local/bin/poetry run mypy ./tests/ aredis_om redis_om --ignore-missing-imports --exclude _compat\.py$
redis_om/model/cli/migrate.py:6: error: Argument 1 has incompatible type "Callable[[Any], Any]"; expected <nothing>
aredis_om/model/cli/migrate.py:6: error: Argument 1 has incompatible type "Callable[[Any], Any]"; expected <nothing>
I'm not sure about the audit error. Could you help me to fix the issue, please? (If this PR looks good)
Patch coverage: 68.42
% and project coverage change: -0.33
:warning:
Comparison is base (
70f6401
) 78.94% compared to head (099ca96
) 78.61%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@ninoseki I've merged master in accordingly.
Thanks and please let me know if I need additional works on this PR.
given the opt in nature - and the pydantic changes.. it seems very clean.
The latest version of FastAPI (v0.100.0) supports Pydantic v2.
I'd like to use
redis-om-python
with Pydantic v2 while keeping the compatibility.This PR does:
pydantic = ">=1.10.2,<2.1.0"
)_compat.py
file to import proper Pydantic classes, etc.from pydantic import ...
if Pydantic is v1from pydantic.v1 import ...
if Pydantic is v2 (Note: Pydantic v2 contains v1 in v1 module)It allows using Pydantic v2 along with
redis-om-python
.