mirror of
https://github.com/django/django.git
synced 2025-07-12 15:55:13 +00:00
Fixed #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.
This commit is contained in:
parent
ee0a7c741e
commit
cec6bd5a59
26 changed files with 105 additions and 1321 deletions
|
@ -1,20 +1,11 @@
|
|||
"""
|
||||
Sphinx plugins for Django documentation.
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
|
||||
from docutils import nodes, transforms
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
try:
|
||||
from django.utils import simplejson as json
|
||||
except ImportError:
|
||||
json = None
|
||||
|
||||
from sphinx import addnodes, roles, __version__ as sphinx_ver
|
||||
from sphinx.builders.html import StandaloneHTMLBuilder
|
||||
|
@ -210,9 +201,6 @@ class DjangoStandaloneHTMLBuilder(StandaloneHTMLBuilder):
|
|||
|
||||
def finish(self):
|
||||
super(DjangoStandaloneHTMLBuilder, self).finish()
|
||||
if json is None:
|
||||
self.warn("cannot create templatebuiltins.js due to missing simplejson dependency")
|
||||
return
|
||||
self.info(bold("writing templatebuiltins.js..."))
|
||||
xrefs = self.env.domaindata["std"]["objects"]
|
||||
templatebuiltins = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue