diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 07:23:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 07:23:15 (GMT) |
commit | cc283378d65e8294895eead78815f8cda15653f5 (patch) | |
tree | c1d6c0768a57d75807a35e24083c9b354339ef6d /Lib/http | |
parent | 009b0a1face9c16b608b3cd18df8c88632006ae1 (diff) | |
download | cpython-cc283378d65e8294895eead78815f8cda15653f5.zip cpython-cc283378d65e8294895eead78815f8cda15653f5.tar.gz cpython-cc283378d65e8294895eead78815f8cda15653f5.tar.bz2 |
Issue #29192: Removed deprecated features in the http.cookies module.
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/cookies.py | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py index be3b080..7e0259e 100644 --- a/Lib/http/cookies.py +++ b/Lib/http/cookies.py @@ -138,12 +138,6 @@ _nulljoin = ''.join _semispacejoin = '; '.join _spacejoin = ' '.join -def _warn_deprecated_setter(setter): - import warnings - msg = ('The .%s setter is deprecated. The attribute will be read-only in ' - 'future releases. Please use the set() method instead.' % setter) - warnings.warn(msg, DeprecationWarning, stacklevel=3) - # # Define an exception visible to External modules # @@ -303,29 +297,14 @@ class Morsel(dict): def key(self): return self._key - @key.setter - def key(self, key): - _warn_deprecated_setter('key') - self._key = key - @property def value(self): return self._value - @value.setter - def value(self, value): - _warn_deprecated_setter('value') - self._value = value - @property def coded_value(self): return self._coded_value - @coded_value.setter - def coded_value(self, coded_value): - _warn_deprecated_setter('coded_value') - self._coded_value = coded_value - def __setitem__(self, K, V): K = K.lower() if not K in self._reserved: @@ -366,14 +345,7 @@ class Morsel(dict): def isReservedKey(self, K): return K.lower() in self._reserved - def set(self, key, val, coded_val, LegalChars=_LegalChars): - if LegalChars != _LegalChars: - import warnings - warnings.warn( - 'LegalChars parameter is deprecated, ignored and will ' - 'be removed in future versions.', DeprecationWarning, - stacklevel=2) - + def set(self, key, val, coded_val): if key.lower() in self._reserved: raise CookieError('Attempt to set a reserved key %r' % (key,)) if not _is_legal_key(key): |