mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-20 08:55:24 -04:00
⬆ Require Pydantic > 1.0 (#1862)
* 🔥 Remove support for Pydantic < 1.0 * 🔥 Remove deprecated skip_defaults from jsonable_encoder and set default for exclude to None, as in Pydantic * ♻️ Set default of response_model_exclude=None as in Pydantic * ⬆️ Require Pydantic >=1.0.0 in requirements
This commit is contained in:
1 parent
3390182fc9
commit
e1758d107e
14 files changed
+115
-396
No files matched your search
@@ -5,13 +5,7 @@ from typing import Optional
|
||||
|
||||
import pytest
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
from pydantic import BaseModel, ValidationError, create_model
|
||||
|
||||
try:
|
||||
from pydantic import Field
|
||||
except ImportError: # pragma: nocover
|
||||
# TODO: remove when removing support for Pydantic < 1.0.0
|
||||
from pydantic import Schema as Field
|
||||
from pydantic import BaseModel, Field, ValidationError, create_model
|
||||
|
||||
|
||||
class Person:
|
||||
|
||||
Reference in new issue
Block a user