--- /dev/null
+# Stubs for email.policy (Python 3.4)\r
+\r
+from abc import abstractmethod\r
+from typing import Any, List, Optional, Tuple, Union, Callable\r
+import sys\r
+from email.message import Message\r
+from email.errors import MessageDefect\r
+from email.header import Header\r
+from email.contentmanager import ContentManager\r
+\r
+class Policy:\r
+ max_line_length = ... # type: Optional[int]\r
+ linesep = ... # type: str\r
+ cte_type = ... # type: str\r
+ raise_on_defect = ... # type: bool\r
+ if sys.version_info >= (3, 5):\r
+ mange_from = ... # type: bool\r
+ def __init__(self, **kw: Any) -> None: ...\r
+ def clone(self, **kw: Any) -> 'Policy': ...\r
+ def handle_defect(self, obj: Message,\r
+ defect: MessageDefect) -> None: ...\r
+ def register_defect(self, obj: Message,\r
+ defect: MessageDefect) -> None: ...\r
+ def header_max_count(self, name: str) -> Optional[int]: ...\r
+ @abstractmethod\r
+ def header_source_parse(self, sourcelines: List[str]) -> str: ...\r
+ @abstractmethod\r
+ def header_store_parse(self, name: str,\r
+ value: str) -> Tuple[str, str]: ...\r
+ @abstractmethod\r
+ def header_fetch_parse(self, name: str,\r
+ value: str) -> str: ...\r
+ @abstractmethod\r
+ def fold(self, name: str, value: str) -> str: ...\r
+ @abstractmethod\r
+ def fold_binary(self, name: str, value: str) -> bytes: ...\r
+\r
+class Compat32(Policy):\r
+ def header_source_parse(self, sourcelines: List[str]) -> str: ...\r
+ def header_store_parse(self, name: str,\r
+ value: str) -> Tuple[str, str]: ...\r
+ def header_fetch_parse(self, name: str, value: str) -> Union[str, Header]: ... # type: ignore\r
+ def fold(self, name: str, value: str) -> str: ...\r
+ def fold_binary(self, name: str, value: str) -> bytes: ...\r
+\r
+compat32 = ... # type: Compat32\r
+\r
+class EmailPolicy(Policy):\r
+ utf8 = ... # type: bool\r
+ refold_source = ... # type: str\r
+ header_factory = ... # type: Callable[[str, str], str]\r
+ content_manager = ... # type: ContentManager\r
+ def header_source_parse(self, sourcelines: List[str]) -> str: ...\r
+ def header_store_parse(self, name: str,\r
+ value: str) -> Tuple[str, str]: ...\r
+ def header_fetch_parse(self, name: str, value: str) -> str: ...\r
+ def fold(self, name: str, value: str) -> str: ...\r
+ def fold_binary(self, name: str, value: str) -> bytes: ...\r
+\r
+default = ... # type: EmailPolicy\r
+SMTP = ... # type: EmailPolicy\r
+SMTPUTF8 = ... # type: EmailPolicy\r
+HTTP = ... # type: EmailPolicy\r
+strict = ... # type: EmailPolicy\r