forked from django/django
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed django#18023 -- Removed bundled simplejson.
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
- Loading branch information
Showing
26 changed files
with
105 additions
and
1,321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Django 1.5 only supports Python >= 2.6, where the standard library includes | ||
# the json module. Previous version of Django shipped a copy for Python < 2.6. | ||
|
||
# For backwards compatibility, we're keeping an importable json module | ||
# at this location, with the same lookup sequence. | ||
|
||
# Avoid shadowing the simplejson module | ||
from __future__ import absolute_import | ||
|
||
import warnings | ||
warnings.warn("django.utils.simplejson is deprecated; use json instead.", | ||
PendingDeprecationWarning) | ||
|
||
try: | ||
import simplejson | ||
except ImportError: | ||
use_simplejson = False | ||
else: | ||
# The system-installed version has priority providing it is either not an | ||
# earlier version or it contains the C speedups. | ||
from json import __version__ as stdlib_json_version | ||
use_simplejson = (hasattr(simplejson, '_speedups') or | ||
simplejson.__version__.split('.') >= stdlib_json_version.split('.')) | ||
|
||
# Make sure we copy over the version. See #17071 | ||
if use_simplejson: | ||
from simplejson import * | ||
from simplejson import __version__ | ||
else: | ||
from json import * | ||
from json import __version__ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.