-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X
Description
Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
pydantic version: 1.7.3
pydantic compiled: True
install path: /home/guilherme/PycharmProjects/bulk-uploader/venv/lib/python3.8/site-packages/pydantic
python version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
platform: Linux-5.4.0-65-generic-x86_64-with-glibc2.29
optional deps. installed: ['typing-extensions']
from pydantic import BaseModel
class Example(BaseModel):
example: Tuple[()]Will result in:
Traceback (most recent call last):
File "pydantic/validators.py", line 615, in pydantic.validators.find_validators
TypeError: issubclass() arg 1 must be a class
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...", line 12, in <module>
class Example(BaseModel):
File "pydantic/main.py", line 262, in pydantic.main.ModelMetaclass.__new__
File "pydantic/fields.py", line 315, in pydantic.fields.ModelField.infer
File "pydantic/fields.py", line 284, in pydantic.fields.ModelField.__init__
File "pydantic/fields.py", line 356, in pydantic.fields.ModelField.prepare
File "pydantic/fields.py", line 458, in pydantic.fields.ModelField._type_analysis
File "pydantic/fields.py", line 516, in pydantic.fields.ModelField._create_sub_type
File "pydantic/fields.py", line 284, in pydantic.fields.ModelField.__init__
File "pydantic/fields.py", line 362, in pydantic.fields.ModelField.prepare
File "pydantic/fields.py", line 538, in pydantic.fields.ModelField.populate_validators
File "pydantic/validators.py", line 624, in find_validators
RuntimeError: error checking inheritance of () (type: tuple)
Metadata
Metadata
Assignees
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X