Merge: #21991: make headerregistry params property MappingProxyType.

This commit is contained in:
R David Murray 2014-10-17 19:32:08 -04:00
commit d2ff243b38
3 changed files with 9 additions and 1 deletions

View file

@ -7,6 +7,7 @@ Eventually HeaderRegistry will be a public API, but it isn't yet,
and will probably change some before that happens.
"""
from types import MappingProxyType
from email import utils
from email import errors
@ -456,7 +457,7 @@ class ParameterizedMIMEHeader:
@property
def params(self):
return self._params.copy()
return MappingProxyType(self._params)
class ContentTypeHeader(ParameterizedMIMEHeader):