bauerji / flask-pydantic

flask extension for integration with the awesome pydantic package
MIT License
352 stars 56 forks source link

AttributeError: 'FieldInfo' object has no attribute 'is_complex' #78

Closed prassr closed 8 months ago

prassr commented 10 months ago

Hii All,

Recently, In my project to build a recommendation system with flask_restful, I extensively used flask_pydantic but faced the error that is shown in title.

This error is raised when I tried to use query like shown here (line 61, it is the same code as in documentation)

I extensively created a github repo to diagnose this issue and it can be examined here

The issue exists with vanilla as well as RESTful flask api.

Flask-Pydantic==0.11.0 Flask-RESTful==0.3.10 pydantic==2.4.2

adeadman commented 10 months ago

Duplicate of #74 - the latest version of this library only supports Pydantic 1.x

yctomwang commented 10 months ago

@prassr https://github.com/bauerji/flask-pydantic/pull/77, I have raised a PR for making the code compatible with pydantic2.4.2, feel free to try this version.

jkseppan commented 10 months ago

There's also an earlier PR #75. Any comment from the maintainer @bauerji as to how to proceed?