diff options
| author | R David Murray <rdmurray@bitdance.com> | 2012-05-27 15:03:38 -0400 |
|---|---|---|
| committer | R David Murray <rdmurray@bitdance.com> | 2012-05-27 15:03:38 -0400 |
| commit | ea9766897bf1d2ccf610ff9ce805acca7c4cce6f (patch) | |
| tree | df17698b2efec46c390580be246b4124fce93cd6 /Lib/email | |
| parent | 393da3240a29852c0e1188c6ccd007e89426a887 (diff) | |
| download | cpython-git-ea9766897bf1d2ccf610ff9ce805acca7c4cce6f.tar.gz | |
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')
| -rw-r--r-- | Lib/email/headerregistry.py (renamed from Lib/email/_headerregistry.py) | 0 | ||||
| -rw-r--r-- | Lib/email/policy.py | 6 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/email/_headerregistry.py b/Lib/email/headerregistry.py index 658854630f..658854630f 100644 --- a/Lib/email/_headerregistry.py +++ b/Lib/email/headerregistry.py diff --git a/Lib/email/policy.py b/Lib/email/policy.py index 18946c3215..47ed66b642 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 |
