Lines Matching refs:Policy
1 """This will be the home for the policy that hooks in the new
6 from email._policybase import Policy, Compat32, compat32, _extend_docstrings
15 'Policy',
26 class EmailPolicy(Policy):
31 The API extensions enabled by this policy are currently provisional.
34 This policy adds new header parsing and folding algorithms. Instead of
40 all Policies, this policy adds the following additional attributes:
108 # switch a Message object between a Compat32 policy and a policy derived
110 # Message object constructed with this policy to be passed to a library
112 # convert it to use the newer style by just changing its policy. It is
166 Header folding is controlled by the refold_source policy setting. A
170 to the policy, it is converted into a custom header object by passing
173 calling its fold method with the current policy.
177 policy and returned. The exception is lines containing non-ascii
205 return value.fold(policy=self)
213 return self.header_factory(name, ''.join(lines)).fold(policy=self)
218 # Make the default policy use the class default header_factory