mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-16 12:57:44 -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:
committed by
GitHub
parent
3390182fc9
commit
e1758d107e
@@ -3,15 +3,6 @@ from fastapi.testclient import TestClient
|
||||
|
||||
from docs_src.body_fields.tutorial001 import app
|
||||
|
||||
# TODO: remove when removing support for Pydantic < 1.0.0
|
||||
try:
|
||||
from pydantic import Field # noqa
|
||||
except ImportError: # pragma: nocover
|
||||
import pydantic
|
||||
|
||||
pydantic.Field = pydantic.Schema
|
||||
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user