]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:bug: Fix import of email_validator from Pydantic
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 10 Dec 2018 13:49:39 +0000 (17:49 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Mon, 10 Dec 2018 13:49:39 +0000 (17:49 +0400)
fastapi/__init__.py
fastapi/openapi/models.py

index 2ee3cdd2e0c797af58f4f4e5e026ad9b9fd33e05..d27c0eab7e055896e73b914cbf65f79188db1371 100644 (file)
@@ -1,6 +1,6 @@
 """FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
 
-__version__ = "0.1.3"
+__version__ = "0.1.4"
 
 from .applications import FastAPI
 from .routing import APIRouter
index 87eed07be2110c06cb797a393015c26cf4d8050c..eb49dc96b3a7f4dd007159310e277d9a71db1cbc 100644 (file)
@@ -6,13 +6,13 @@ from pydantic import BaseModel, Schema as PSchema
 from pydantic.types import UrlStr
 
 try:
-    import pydantic.types.EmailStr
+    import email_validator
     from pydantic.types import EmailStr  # type: ignore
 except ImportError:
     logging.warning(
-        "email-validator not installed, email fields will be treated as str"
+        "email-validator not installed, email fields will be treated as str.\n" +
+        "To install, run: pip install email-validator"
     )
-
     class EmailStr(str):  # type: ignore
         pass