We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mypy finds errors in the first example from the documentation
<details>
<summary>This example</summary>


```python
from datetime import datetime
from typing import List
from pydantic import BaseModel

class User(BaseModel):
    id: int
    name = 'John Doe'
    signup_ts: datetime = None
    friends: List[int] = []

external_data = {
    'id': '123',
    'signup_ts': '2019-06-01 12:22',
    'friends': [1, 2, '3']
}
user = User(**external_data)
print(user.id)
print(repr(user.signup_ts))
print(user.friends)
print(user.dict())
```

</details>

```
$ mypy --strict pydantic_example.py 
pydantic_example.py:3: error: Module 'pydantic' has no attribute 'BaseModel'
pydantic_example.py:5: error: Class cannot subclass 'BaseModel' (has type 'Any')
pydantic_example.py:8: error: Incompatible types in assignment (expression has type "None", variable has type "datetime")
```

This is not false positive. Pydantic `__init__.py` uses implicit reexport (this is an error, and I don't want to ignore it using `--no-implicit-reexport`), and this example uses None for a non-optional field (this is also an error).

In general, I can't trust a library that suggests putting None in a non-optional field in the very first example. This violates the mypy type system.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pydantic/__init__.py`
Content:
```
1 # flake8: noqa
2 from . import dataclasses
3 from .class_validators import root_validator, validator
4 from .env_settings import BaseSettings
5 from .error_wrappers import ValidationError
6 from .errors import *
7 from .fields import Field, Required, Schema
8 from .main import *
9 from .networks import *
10 from .parse import Protocol
11 from .tools import *
12 from .types import *
13 from .version import VERSION
14
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pydantic/__init__.py b/pydantic/__init__.py
--- a/pydantic/__init__.py
+++ b/pydantic/__init__.py
@@ -11,3 +11,85 @@
 from .tools import *
 from .types import *
 from .version import VERSION
+
+# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2
+# please use "from pydantic.errors import ..." instead
+__all__ = [
+    # dataclasses
+    'dataclasses',
+    'root_validator',
+    'validator',
+    # env_settings
+    'BaseSettings',
+    # error_wrappers
+    'ValidationError',
+    # fields
+    'Field',
+    'Required',
+    'Schema',
+    # main
+    'BaseConfig',
+    'BaseModel',
+    'Extra',
+    'compiled',
+    'create_model',
+    'validate_model',
+    # network
+    'AnyUrl',
+    'AnyHttpUrl',
+    'HttpUrl',
+    'stricturl',
+    'EmailStr',
+    'NameEmail',
+    'IPvAnyAddress',
+    'IPvAnyInterface',
+    'IPvAnyNetwork',
+    'PostgresDsn',
+    'RedisDsn',
+    'validate_email',
+    # parse
+    'Protocol',
+    # tools
+    'parse_file_as',
+    'parse_obj_as',
+    # types
+    'NoneStr',
+    'NoneBytes',
+    'StrBytes',
+    'NoneStrBytes',
+    'StrictStr',
+    'ConstrainedBytes',
+    'conbytes',
+    'ConstrainedList',
+    'conlist',
+    'ConstrainedStr',
+    'constr',
+    'PyObject',
+    'ConstrainedInt',
+    'conint',
+    'PositiveInt',
+    'NegativeInt',
+    'ConstrainedFloat',
+    'confloat',
+    'PositiveFloat',
+    'NegativeFloat',
+    'ConstrainedDecimal',
+    'condecimal',
+    'UUID1',
+    'UUID3',
+    'UUID4',
+    'UUID5',
+    'FilePath',
+    'DirectoryPath',
+    'Json',
+    'JsonWrapper',
+    'SecretStr',
+    'SecretBytes',
+    'StrictBool',
+    'StrictInt',
+    'StrictFloat',
+    'PaymentCardNumber',
+    'ByteSize',
+    # version
+    'VERSION',
+]

{"golden_diff": "diff --git a/pydantic/__init__.py b/pydantic/__init__.py\n--- a/pydantic/__init__.py\n+++ b/pydantic/__init__.py\n@@ -11,3 +11,85 @@\n from .tools import *\n from .types import *\n from .version import VERSION\n+\n+# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2\n+# please use \"from pydantic.errors import ...\" instead\n+__all__ = [\n+    # dataclasses\n+    'dataclasses',\n+    'root_validator',\n+    'validator',\n+    # env_settings\n+    'BaseSettings',\n+    # error_wrappers\n+    'ValidationError',\n+    # fields\n+    'Field',\n+    'Required',\n+    'Schema',\n+    # main\n+    'BaseConfig',\n+    'BaseModel',\n+    'Extra',\n+    'compiled',\n+    'create_model',\n+    'validate_model',\n+    # network\n+    'AnyUrl',\n+    'AnyHttpUrl',\n+    'HttpUrl',\n+    'stricturl',\n+    'EmailStr',\n+    'NameEmail',\n+    'IPvAnyAddress',\n+    'IPvAnyInterface',\n+    'IPvAnyNetwork',\n+    'PostgresDsn',\n+    'RedisDsn',\n+    'validate_email',\n+    # parse\n+    'Protocol',\n+    # tools\n+    'parse_file_as',\n+    'parse_obj_as',\n+    # types\n+    'NoneStr',\n+    'NoneBytes',\n+    'StrBytes',\n+    'NoneStrBytes',\n+    'StrictStr',\n+    'ConstrainedBytes',\n+    'conbytes',\n+    'ConstrainedList',\n+    'conlist',\n+    'ConstrainedStr',\n+    'constr',\n+    'PyObject',\n+    'ConstrainedInt',\n+    'conint',\n+    'PositiveInt',\n+    'NegativeInt',\n+    'ConstrainedFloat',\n+    'confloat',\n+    'PositiveFloat',\n+    'NegativeFloat',\n+    'ConstrainedDecimal',\n+    'condecimal',\n+    'UUID1',\n+    'UUID3',\n+    'UUID4',\n+    'UUID5',\n+    'FilePath',\n+    'DirectoryPath',\n+    'Json',\n+    'JsonWrapper',\n+    'SecretStr',\n+    'SecretBytes',\n+    'StrictBool',\n+    'StrictInt',\n+    'StrictFloat',\n+    'PaymentCardNumber',\n+    'ByteSize',\n+    # version\n+    'VERSION',\n+]\n", "issue": "Mypy finds errors in the first example from the documentation\n<details>\r\n<summary>This example</summary>\r\n\r\n\r\n```python\r\nfrom datetime import datetime\r\nfrom typing import List\r\nfrom pydantic import BaseModel\r\n\r\nclass User(BaseModel):\r\n    id: int\r\n    name = 'John Doe'\r\n    signup_ts: datetime = None\r\n    friends: List[int] = []\r\n\r\nexternal_data = {\r\n    'id': '123',\r\n    'signup_ts': '2019-06-01 12:22',\r\n    'friends': [1, 2, '3']\r\n}\r\nuser = User(**external_data)\r\nprint(user.id)\r\nprint(repr(user.signup_ts))\r\nprint(user.friends)\r\nprint(user.dict())\r\n```\r\n\r\n</details>\r\n\r\n```\r\n$ mypy --strict pydantic_example.py \r\npydantic_example.py:3: error: Module 'pydantic' has no attribute 'BaseModel'\r\npydantic_example.py:5: error: Class cannot subclass 'BaseModel' (has type 'Any')\r\npydantic_example.py:8: error: Incompatible types in assignment (expression has type \"None\", variable has type \"datetime\")\r\n```\r\n\r\nThis is not false positive. Pydantic `__init__.py` uses implicit reexport (this is an error, and I don't want to ignore it using `--no-implicit-reexport`), and this example uses None for a non-optional field (this is also an error).\r\n\r\nIn general, I can't trust a library that suggests putting None in a non-optional field in the very first example. This violates the mypy type system.\n", "before_files": [{"content": "# flake8: noqa\nfrom . import dataclasses\nfrom .class_validators import root_validator, validator\nfrom .env_settings import BaseSettings\nfrom .error_wrappers import ValidationError\nfrom .errors import *\nfrom .fields import Field, Required, Schema\nfrom .main import *\nfrom .networks import *\nfrom .parse import Protocol\nfrom .tools import *\nfrom .types import *\nfrom .version import VERSION\n", "path": "pydantic/__init__.py"}], "after_files": [{"content": "# flake8: noqa\nfrom . import dataclasses\nfrom .class_validators import root_validator, validator\nfrom .env_settings import BaseSettings\nfrom .error_wrappers import ValidationError\nfrom .errors import *\nfrom .fields import Field, Required, Schema\nfrom .main import *\nfrom .networks import *\nfrom .parse import Protocol\nfrom .tools import *\nfrom .types import *\nfrom .version import VERSION\n\n# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2\n# please use \"from pydantic.errors import ...\" instead\n__all__ = [\n    # dataclasses\n    'dataclasses',\n    'root_validator',\n    'validator',\n    # env_settings\n    'BaseSettings',\n    # error_wrappers\n    'ValidationError',\n    # fields\n    'Field',\n    'Required',\n    'Schema',\n    # main\n    'BaseConfig',\n    'BaseModel',\n    'Extra',\n    'compiled',\n    'create_model',\n    'validate_model',\n    # network\n    'AnyUrl',\n    'AnyHttpUrl',\n    'HttpUrl',\n    'stricturl',\n    'EmailStr',\n    'NameEmail',\n    'IPvAnyAddress',\n    'IPvAnyInterface',\n    'IPvAnyNetwork',\n    'PostgresDsn',\n    'RedisDsn',\n    'validate_email',\n    # parse\n    'Protocol',\n    # tools\n    'parse_file_as',\n    'parse_obj_as',\n    # types\n    'NoneStr',\n    'NoneBytes',\n    'StrBytes',\n    'NoneStrBytes',\n    'StrictStr',\n    'ConstrainedBytes',\n    'conbytes',\n    'ConstrainedList',\n    'conlist',\n    'ConstrainedStr',\n    'constr',\n    'PyObject',\n    'ConstrainedInt',\n    'conint',\n    'PositiveInt',\n    'NegativeInt',\n    'ConstrainedFloat',\n    'confloat',\n    'PositiveFloat',\n    'NegativeFloat',\n    'ConstrainedDecimal',\n    'condecimal',\n    'UUID1',\n    'UUID3',\n    'UUID4',\n    'UUID5',\n    'FilePath',\n    'DirectoryPath',\n    'Json',\n    'JsonWrapper',\n    'SecretStr',\n    'SecretBytes',\n    'StrictBool',\n    'StrictInt',\n    'StrictFloat',\n    'PaymentCardNumber',\n    'ByteSize',\n    # version\n    'VERSION',\n]\n", "path": "pydantic/__init__.py"}]}