Deprecate request.json property

This commit is contained in:
INADA Naoki 2014-10-15 02:21:52 +09:00
parent 7169f44d88
commit 61097c47a3
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@ class Request(RequestBase):
The :meth:`get_json` method should be used instead.
"""
# XXX: deprecate property
from warnings import warn
warn(DeprecationWarning('json is deprecated. '
'Use get_json() instead.'), stacklevel=2)
return self.get_json()
@property