diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-05-27 19:03:38 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-05-27 19:03:38 (GMT) |
commit | ea9766897bf1d2ccf610ff9ce805acca7c4cce6f (patch) | |
tree | df17698b2efec46c390580be246b4124fce93cd6 /Lib/email/policy.py | |
parent | 393da3240a29852c0e1188c6ccd007e89426a887 (diff) | |
download | cpython-ea9766897bf1d2ccf610ff9ce805acca7c4cce6f.zip cpython-ea9766897bf1d2ccf610ff9ce805acca7c4cce6f.tar.gz cpython-ea9766897bf1d2ccf610ff9ce805acca7c4cce6f.tar.bz2 |
Make headerregistry fully part of the provisional api.
When I made the checkin of the provisional email policy, I knew that
Address and Group needed to be made accessible from somewhere. The more
I looked at it, though, the more it became clear that since this is a
provisional API anyway, there's no good reason to hide headerregistry as
a private API. It was designed to ultimately be part of the public API,
and so it should be part of the provisional API.
This patch fully documents the headerregistry API, and deletes the
abbreviated version of those docs I had added to the provisional policy
docs.
Diffstat (limited to 'Lib/email/policy.py')
-rw-r--r-- | Lib/email/policy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/email/policy.py b/Lib/email/policy.py index 18946c3..47ed66b 100644 --- a/Lib/email/policy.py +++ b/Lib/email/policy.py @@ -4,7 +4,7 @@ code that adds all the email6 features. from email._policybase import Policy, Compat32, compat32 from email.utils import _has_surrogates -from email._headerregistry import HeaderRegistry as _HeaderRegistry +from email.headerregistry import HeaderRegistry as HeaderRegistry __all__ = [ 'Compat32', @@ -60,13 +60,13 @@ class EmailPolicy(Policy): """ refold_source = 'long' - header_factory = _HeaderRegistry() + header_factory = HeaderRegistry() def __init__(self, **kw): # Ensure that each new instance gets a unique header factory # (as opposed to clones, which share the factory). if 'header_factory' not in kw: - object.__setattr__(self, 'header_factory', _HeaderRegistry()) + object.__setattr__(self, 'header_factory', HeaderRegistry()) super().__init__(**kw) # The logic of the next three methods is chosen such that it is possible to |