mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merge: #21991: make headerregistry params property MappingProxyType.
This commit is contained in:
commit
d2ff243b38
3 changed files with 9 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue