Browse Source

No . in identifier

pull/2262/head
Ayush Kohli 8 years ago
parent
commit
5068ff9913
  1. 2
      flask/_compat.py
  2. 4
      flask/json.py

2
flask/_compat.py

@ -14,7 +14,7 @@ import sys
PY2 = sys.version_info[0] == 2
PY3.6 = sys.version_info[0] == 3 and sys.version_info[1] == 6
PY36 = sys.version_info[0] == 3 and sys.version_info[1] == 6
_identity = lambda x: x

4
flask/json.py

@ -12,7 +12,7 @@ import io
import uuid
from datetime import date
from .globals import current_app, request
from ._compat import text_type, PY2, PY3.6
from ._compat import text_type, PY2, PY36
from .ctx import has_request_context
from werkzeug.http import http_date
@ -154,7 +154,7 @@ def loads(s, **kwargs):
application on the stack.
"""
_load_arg_defaults(kwargs)
if not PY3.6:
if not PY36:
if isinstance(s, bytes):
s = s.decode(kwargs.pop('encoding', None) or 'utf-8')
return _json.loads(s, **kwargs)

Loading…
Cancel
Save