Home
last modified time | relevance | path

Searched refs:header_factory (Results 1 – 8 of 8) sorted by relevance

/external/python/cpython3/Lib/test/test_email/
Dtest_policy.py35 'header_factory': email.policy.EmailPolicy.header_factory,
63 policies[new_policy]['header_factory'] = new_policy.header_factory
198 h = email.policy.default.header_factory('Test', 'test')
209 policy1.header_factory.map_to_type('foo', self.Foo)
210 h = policy1.header_factory('foo', 'test')
213 h = policy2.header_factory('foo', 'test')
220 policy1.header_factory.map_to_type('foo', self.Foo)
221 h = policy1.header_factory('foo', 'test')
223 h = policy2.header_factory('foo', 'test')
228 myfactory = mypolicy.header_factory
[all …]
Dtest_pickleable.py15 header_factory = HeaderRegistry() variable in TestPickleCopyHeader
17 unstructured = header_factory('subject', 'this is a test')
27 header = self.header_factory(name, value)
32 header = self.header_factory(name, value)
Dtest_contentmanager.py643 header_factory = self.policy.header_factory
645 header_factory("To", "foo@example.com"),
646 header_factory("From", "foo@example.com"),
647 header_factory("Subject", "I'm talking to myself.")))
684 header_factory = self.policy.header_factory
687 header_factory("Content-Type", " foo/bar"),)
702 header_factory = self.policy.header_factory
705 header_factory('To', 'a@fairly@@invalid@address'),)
/external/python/cpython3/Lib/email/
Dpolicy.py89 header_factory = HeaderRegistry() variable in EmailPolicy
105 return self.header_factory[name].max_count
147 return (name, self.header_factory(name, value))
162 return self.header_factory(name, value)
213 return self.header_factory(name, ''.join(lines)).fold(policy=self)
219 del default.header_factory
Dcontentmanager.py100 headers = [mp.header_factory(*mp.header_source_parse([header]))
/external/python/cpython3/Doc/library/
Demail.headerregistry.rst18 :attr:`~email.policy.EmailPolicy.header_factory` of the :mod:`~email.policy` in
20 ``header_factory`` implemented by the email package for handling :RFC:`5322`
45 :attr:`~email.policy.EmailPolicy.header_factory` call. The string value of
55 :attr:`~email.policy.EmailPolicy.header_factory` call for *name*; that
Demail.policy.rst417 .. attribute:: header_factory
422 default ``header_factory`` (see :mod:`~email.headerregistry`) is provided
467 ``header_factory``, and the resulting header object is returned as
476 removed, are passed to the ``header_factory``, and the resulting
489 to the ``header_factory``. Folding of a header object is done by
/external/python/cpython3/Doc/whatsnew/
D3.3.rst1277 header_factory A callable that take a ``name`` and ``value`` and
1281 The ``header_factory`` is the key to the new features provided by the new
1283 a ``Message`` object is an object produced by the ``header_factory``, and any
1285 ``header_factory``. All such header objects have a ``name`` attribute equal