summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-03-10 14:08:05 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-03-10 14:08:05 (GMT)
commitc08383633a45d0aee77d3dc68c957be29b224e57 (patch)
tree25c9918062f946690083f86d0cf85efecf2f3ba0 /Doc/library
parentc51eaf5ca0901f680efb96d7f5400dfc4773a764 (diff)
downloadcpython-c08383633a45d0aee77d3dc68c957be29b224e57.zip
cpython-c08383633a45d0aee77d3dc68c957be29b224e57.tar.gz
cpython-c08383633a45d0aee77d3dc68c957be29b224e57.tar.bz2
whatsnew: Message.set_param *replace*, Policy.content_manager.
Also cleaned up the email section and fixed some markup bugs in the email docs.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/email-examples.rst6
-rw-r--r--Doc/library/email.contentmanager.rst19
-rw-r--r--Doc/library/email.message.rst4
-rw-r--r--Doc/library/email.policy.rst2
4 files changed, 18 insertions, 13 deletions
diff --git a/Doc/library/email-examples.rst b/Doc/library/email-examples.rst
index 294e131..cbbcb78 100644
--- a/Doc/library/email-examples.rst
+++ b/Doc/library/email-examples.rst
@@ -40,8 +40,10 @@ text version: [2]_
.. literalinclude:: ../includes/email-alternative.py
-Examples using the Provision API
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. _email-contentmanager-api-examples:
+
+Examples using the Provisional API
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is a reworking of the last example using the provisional API. To make
things a bit more interesting, we include a related image in the html part, and
we save a copy of what we are going to send to disk, as well as sending it.
diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst
index 5162da1..8f0bfdb 100644
--- a/Doc/library/email.contentmanager.rst
+++ b/Doc/library/email.contentmanager.rst
@@ -54,6 +54,7 @@ this module.
documented in this module because of the provisional nature of the code, the
implementation lives in the :mod:`email.message` module.
+.. currentmodule:: email.message
.. class:: EmailMessage(policy=default)
@@ -235,6 +236,16 @@ this module.
all other headers intact and in their original order.
+.. class:: MIMEPart(policy=default)
+
+ This class represents a subpart of a MIME message. It is identical to
+ :class:`EmailMessage`, except that no :mailheader:`MIME-Version` headers are
+ added when :meth:`~EmailMessage.set_content` is called, since sub-parts do
+ not need their own :mailheader:`MIME-Version` headers.
+
+
+.. currentmodule:: email.contentmanager
+
.. class:: ContentManager()
Base class for content managers. Provides the standard registry mechanisms
@@ -305,14 +316,6 @@ this module.
values of *typekey*, see :meth:`set_content`.
-.. class:: MIMEPart(policy=default)
-
- This class represents a subpart of a MIME message. It is identical to
- :class:`EmailMessage`, except that no :mailheader:`MIME-Version` headers are
- added when :meth:`~EmailMessage.set_content` is called, since sub-parts do
- not need their own :mailheader:`MIME-Version` headers.
-
-
Content Manager Instances
~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index 84a5f51..58f708c 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -466,7 +466,7 @@ Here are the methods of the :class:`Message` class:
to ``False``.
- .. method:: set_param(param, value, header='Content-Type', requote=True,
+ .. method:: set_param(param, value, header='Content-Type', requote=True, \
charset=None, language='', replace=False)
Set a parameter in the :mailheader:`Content-Type` header. If the
@@ -488,7 +488,7 @@ Here are the methods of the :class:`Message` class:
end of the list of headers. If *replace* is ``True``, the header
will be updated in place.
- .. versionchanged: 3.4 ``replace`` keyword was added.
+ .. versionchanged:: 3.4 ``replace`` keyword was added.
.. method:: del_param(param, header='content-type', requote=True)
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index c2f9e6a..97358f0 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -419,7 +419,7 @@ added matters. To illustrate::
additional arguments. By default ``content_manager`` is set to
:data:`~email.contentmanager.raw_data_manager`.
- .. versionadded 3.4
+ .. versionadded:: 3.4
The class provides the following concrete implementations of the abstract