• Home
  • Raw
  • Download

Lines Matching refs:policy

120     def __init__(self, policy=compat32):  argument
121 self.policy = policy
137 def as_string(self, unixfrom=False, maxheaderlen=0, policy=None): argument
152 policy = self.policy if policy is None else policy
157 policy=policy)
166 def as_bytes(self, unixfrom=False, policy=None): argument
175 policy = self.policy if policy is None else policy
177 g = BytesGenerator(fp, mangle_from_=False, policy=policy)
288 self.policy.handle_defect(self, defect)
399 max_count = self.policy.header_max_count(name)
409 self._headers.append(self.policy.header_store_parse(name, val))
448 return [self.policy.header_fetch_parse(k, v)
459 return [(k, self.policy.header_fetch_parse(k, v))
471 return self.policy.header_fetch_parse(k, v)
510 values.append(self.policy.header_fetch_parse(k, v))
555 self._headers[i] = self.policy.header_store_parse(k, _value)
875 newheaders.append(self.policy.header_store_parse(h, val))
947 def __init__(self, policy=None): argument
948 if policy is None:
949 from email.policy import default
950 policy = default
951 super().__init__(policy)
954 def as_string(self, unixfrom=False, maxheaderlen=None, policy=None): argument
965 policy = self.policy if policy is None else policy
967 maxheaderlen = policy.max_line_length
968 return super().as_string(unixfrom, maxheaderlen, policy)
971 return self.as_string(policy=self.policy.clone(utf8=True))
1095 content_manager = self.policy.content_manager
1100 content_manager = self.policy.content_manager
1119 part = type(self)(policy=self.policy)
1143 part = type(self)(policy=self.policy)