Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(207131)

Side by Side Diff: Doc/library/email.headerregistry.rst

Issue 18761: Fix internal doc references for the email package (Closed)
Patch Set: Created 6 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 :mod:`email.headerregistry`: Custom Header Objects 1 :mod:`email.headerregistry`: Custom Header Objects
2 -------------------------------------------------- 2 --------------------------------------------------
3 3
4 .. module:: email.headerregistry 4 .. module:: email.headerregistry
5 :synopsis: Automatic Parsing of headers based on the field name 5 :synopsis: Automatic Parsing of headers based on the field name
6 6
7 .. moduleauthor:: R. David Murray <rdmurray@bitdance.com> 7 .. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
8 .. sectionauthor:: R. David Murray <rdmurray@bitdance.com> 8 .. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
9 9
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 *name* and *value* are passed to ``BaseHeader`` from the 49 *name* and *value* are passed to ``BaseHeader`` from the
50 :attr:`~email.policy.EmailPolicy.header_factory` call. The string value of 50 :attr:`~email.policy.EmailPolicy.header_factory` call. The string value of
51 any header object is the *value* fully decoded to unicode. 51 any header object is the *value* fully decoded to unicode.
52 52
53 This base class defines the following read-only properties: 53 This base class defines the following read-only properties:
54 54
55 55
56 .. attribute:: name 56 .. attribute:: name
57 57
58 The name of the header (the portion of the field before the ':'). This 58 The name of the header (the portion of the field before the ':'). This
59 is exactly the value passed in the :attr:`~EmailPolicy.header_factory` 59 is exactly the value passed in the :attr:`~email.policy.EmailPolicy.header _factory`
r.david.murray 2013/08/16 23:31:43 Hmm. I would have though that this would work, be
eric.araujo 2013/08/16 23:45:03 Depends on module and currentmodule directives use
60 call for *name*; that is, case is preserved. 60 call for *name*; that is, case is preserved.
61 61
62 62
63 .. attribute:: defects 63 .. attribute:: defects
64 64
65 A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any 65 A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any
66 RFC compliance problems found during parsing. The email package tries to 66 RFC compliance problems found during parsing. The email package tries to
67 be complete about detecting compliance issues. See the :mod:`errors` 67 be complete about detecting compliance issues. See the :mod:`email.errors `
68 module for a discussion of the types of defects that may be reported. 68 module for a discussion of the types of defects that may be reported.
69 69
70 70
71 .. attribute:: max_count 71 .. attribute:: max_count
72 72
73 The maximum number of headers of this type that can have the same 73 The maximum number of headers of this type that can have the same
74 ``name``. A value of ``None`` means unlimited. The ``BaseHeader`` value 74 ``name``. A value of ``None`` means unlimited. The ``BaseHeader`` value
75 for this attribute is ``None``; it is expected that specialized header 75 for this attribute is ``None``; it is expected that specialized header
76 classes will override this value as needed. 76 classes will override this value as needed.
77 77
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 .. class:: SingleAddressHeader 223 .. class:: SingleAddressHeader
224 224
225 A subclass of :class:`.AddressHeader` that adds one 225 A subclass of :class:`.AddressHeader` that adds one
226 additional attribute: 226 additional attribute:
227 227
228 228
229 .. attribute:: address 229 .. attribute:: address
230 230
231 The single address encoded by the header value. If the header value 231 The single address encoded by the header value. If the header value
232 actually contains more than one address (which would be a violation of 232 actually contains more than one address (which would be a violation of
233 the RFC under the default :mod:`policy`), accessing this attribute will 233 the RFC under the default :mod:`~email.policy`), accessing this attribute will
eric.araujo 2013/08/16 23:45:03 Wouldn’t a glossary link be better than a module l
r.david.murray 2013/08/17 01:04:05 A glossary link to what? The policy module docs e
234 result in a :exc:`ValueError`. 234 result in a :exc:`ValueError`.
235 235
236 236
237 Many of the above classes also have a ``Unique`` variant (for example, 237 Many of the above classes also have a ``Unique`` variant (for example,
238 ``UniqueUnstructuredHeader``). The only difference is that in the ``Unique`` 238 ``UniqueUnstructuredHeader``). The only difference is that in the ``Unique``
239 variant, :attr:`~.BaseHeader.max_count` is set to 1. 239 variant, :attr:`~.BaseHeader.max_count` is set to 1.
240 240
241 241
242 .. class:: MIMEVersionHeader 242 .. class:: MIMEVersionHeader
243 243
(...skipping 24 matching lines...) Expand all
268 also take a list of supplemental parameters, which have a common format. 268 also take a list of supplemental parameters, which have a common format.
269 This class serves as a base for all the MIME headers that take parameters. 269 This class serves as a base for all the MIME headers that take parameters.
270 270
271 .. attribute:: params 271 .. attribute:: params
272 272
273 A dictionary mapping parameter names to parameter values. 273 A dictionary mapping parameter names to parameter values.
274 274
275 275
276 .. class:: ContentTypeHeader 276 .. class:: ContentTypeHeader
277 277
278 A :class:`ParameterizedMIMEHheader` class that handles the 278 A :class:`ParameterizedMIMEHeader` class that handles the
279 :mailheader:`Content-Type` header. 279 :mailheader:`Content-Type` header.
280 280
281 .. attribute:: content_type 281 .. attribute:: content_type
282 282
283 The content type string, in the form ``maintype/subtype``. 283 The content type string, in the form ``maintype/subtype``.
284 284
285 .. attribute:: maintype 285 .. attribute:: maintype
286 286
287 .. attribute:: subtype 287 .. attribute:: subtype
288 288
289 289
290 .. class:: ContentDispositionHeader 290 .. class:: ContentDispositionHeader
291 291
292 A :class:`ParameterizedMIMEHheader` class that handles the 292 A :class:`ParameterizedMIMEHeader` class that handles the
293 :mailheader:`Content-Disposition` header. 293 :mailheader:`Content-Disposition` header.
294 294
295 .. attribute:: content-disposition 295 .. attribute:: content-disposition
296 296
297 ``inline`` and ``attachment`` are the only valid values in common use. 297 ``inline`` and ``attachment`` are the only valid values in common use.
298 298
299 299
300 .. class:: ContentTransferEncoding 300 .. class:: ContentTransferEncoding
301 301
302 Handles the :mailheader:`Content-Transfer-Encoding` header. 302 Handles the :mailheader:`Content-Transfer-Encoding` header.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 A possibly empty tuple of :class:`.Address` objects representing the 443 A possibly empty tuple of :class:`.Address` objects representing the
444 addresses in the group. 444 addresses in the group.
445 445
446 .. method:: __str__() 446 .. method:: __str__()
447 447
448 The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`, 448 The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`,
449 but with no Content Transfer Encoding of any non-ASCII characters. If 449 but with no Content Transfer Encoding of any non-ASCII characters. If
450 ``display_name`` is none and there is a single ``Address`` in the 450 ``display_name`` is none and there is a single ``Address`` in the
451 ``addresses`` list, the ``str`` value will be the same as the ``str`` of 451 ``addresses`` list, the ``str`` value will be the same as the ``str`` of
452 that single ``Address``. 452 that single ``Address``.
OLDNEW

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+