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
{{ message }}
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
importing patito fails when using older versions of pydantic even though their are new enough according to the pyproject.toml requirements (pydantic = ">=1.7.0")
It fails with
>>> import patito
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/sras/dev/venv/lib/python3.9/site-packages/patito/__init__.py", line 7, in<module>
from patito.pydantic import Field, Model
File "/home/sras/dev/venv/lib/python3.9/site-packages/patito/pydantic.py", line 507, in<module>
class Model(BaseModel, metaclass=ModelMetaclass):
File "/home/sras/dev/venv/lib/python3.9/site-packages/patito/pydantic.py", line 80, in __init__
cls.DataFrame = DataFrame._construct_dataframe_model_class(
File "/home/sras/dev/venv/lib/python3.9/site-packages/patito/polars.py", line 152, in _construct_dataframe_model_class
f"{model.schema()['title']}DataFrame", File "pydantic/main.py", line 647, in pydantic.main.BaseModel.schema File "pydantic/schema.py", line 185, in pydantic.schema.model_schema File "pydantic/schema.py", line 617, in pydantic.schema.model_process_schema File "pydantic/schema.py", line 658, in pydantic.schema.model_type_schema File "pydantic/schema.py", line 258, in pydantic.schema.field_schema File "pydantic/schema.py", line 563, in pydantic.schema.field_type_schema File "pydantic/schema.py", line 922, in pydantic.schema.field_singleton_schema File "/usr/lib/python3.9/abc.py", line 123, in __subclasscheck__ return _abc_subclasscheck(cls, subclass)TypeError: issubclass() arg 1 must be a class
I'm using papito version 0.4.4 and I confirmed it to break for pydantic versions 1.7.0, 1.8.0 and 1.9.0.
No errors when using pydantic version 1.9.1 or above :)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
importing
patito
fails when using older versions of pydantic even though their are new enough according to the pyproject.toml requirements (pydantic = ">=1.7.0"
)It fails with
I'm using
papito
version0.4.4
and I confirmed it to break forpydantic
versions1.7.0
,1.8.0
and1.9.0
.No errors when using
pydantic
version1.9.1
or above :)The text was updated successfully, but these errors were encountered: