Hello community,

here is the log from the commit of package python-readthedocs-sphinx-ext for 
openSUSE:Factory checked in at 2020-07-15 12:10:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext (Old)
 and      /work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.3060 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-readthedocs-sphinx-ext"

Wed Jul 15 12:10:25 2020 rev:6 rq:820511 version:2.1.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext/python-readthedocs-sphinx-ext.changes
      2020-06-11 14:37:50.624114137 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.3060/python-readthedocs-sphinx-ext.changes
    2020-07-15 12:11:20.816552484 +0200
@@ -1,0 +2,13 @@
+Sat Jul 11 19:09:45 UTC 2020 - Arun Persaud <a...@gmx.de>
+
+- update to version 2.1.0:
+  * Merge pull request #90 from readthedocs/humitos/parallel-read-safe
+
+- changes from version 2.0.0:
+  * Define parallel_read_safe=True for our extensions
+  * Move the feature flags added in #85
+  * Re-add the builders as deprecated
+  * Use Py3 for Lint
+  * Remove the custom RTD builders
+
+-------------------------------------------------------------------

Old:
----
  readthedocs-sphinx-ext-1.0.4.tar.gz

New:
----
  readthedocs-sphinx-ext-2.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-readthedocs-sphinx-ext.spec ++++++
--- /var/tmp/diff_new_pack.ZifUmy/_old  2020-07-15 12:11:25.076556943 +0200
+++ /var/tmp/diff_new_pack.ZifUmy/_new  2020-07-15 12:11:25.080556948 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-readthedocs-sphinx-ext
-Version:        1.0.4
+Version:        2.1.0
 Release:        0
 Summary:        Sphinx extension for Read the Docs overrides
 License:        MIT

++++++ readthedocs-sphinx-ext-1.0.4.tar.gz -> 
readthedocs-sphinx-ext-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/readthedocs-sphinx-ext-1.0.4/PKG-INFO 
new/readthedocs-sphinx-ext-2.1.0/PKG-INFO
--- old/readthedocs-sphinx-ext-1.0.4/PKG-INFO   2020-05-26 18:33:15.000000000 
+0200
+++ new/readthedocs-sphinx-ext-2.1.0/PKG-INFO   2020-07-08 19:50:32.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: readthedocs-sphinx-ext
-Version: 1.0.4
+Version: 2.1.0
 Summary: Sphinx extension for Read the Docs overrides
 Home-page: http://github.com/readthedocs/readthedocs-sphinx-ext
 Author: Read the Docs, Inc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/_static/readthedocs-data.js_t 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/_static/readthedocs-data.js_t
--- 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/_static/readthedocs-data.js_t  
    2020-05-26 18:32:01.000000000 +0200
+++ 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/_static/readthedocs-data.js_t  
    1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-var READTHEDOCS_DATA = {
-    project: {{ slug|default('')|tojson }},
-    version: {{ version_slug|default('')|tojson }},
-    language: {{ rtd_language|default('')|tojson }},
-    programming_language: {{ programming_language|default('')|tojson }},
-    subprojects: {},
-    canonical_url: {{ canonical_url|default('')|tojson }},
-    theme: {{ html_theme|default('')|tojson }},
-    builder: "sphinx",
-    docroot: {{ conf_py_path|default('')|tojson }},
-    source_suffix: {{ source_suffix|default('')|tojson }},
-    api_host: {{ api_host|default('')|tojson }},
-    {% if proxied_api_host %}
-    proxied_api_host: {{ proxied_api_host|tojson }},
-    {% endif %}
-    commit: {{ commit|default('')|tojson }},
-    ad_free: {% if ad_free %}true{% else %}false{% endif %},
-
-    global_analytics_code: {% if global_analytics_code %}{{ 
global_analytics_code|default('')|tojson }}{% else %}null{% endif %},
-    user_analytics_code: {% if user_analytics_code %}{{ 
user_analytics_code|default('')|tojson }}{% else %}null{% endif %}
-};
-
-{% for slug, url in subprojects %}
-READTHEDOCS_DATA.subprojects[{{ slug|default('')|tojson }}] = {{ 
url|default('')|tojson }};
-{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
--- 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
    2020-04-21 18:23:00.000000000 +0200
+++ 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
    2020-07-08 19:22:18.000000000 +0200
@@ -18,16 +18,17 @@
 
 <link rel="stylesheet" href="{{ rtd_css_url }}" type="text/css" />
 
-<script type="text/javascript" src="{{ pathto('_static/readthedocs-data.js', 
1) }}"></script>
+<script type="application/json" id="READTHEDOCS_DATA">{{ rtd_data | tojson 
}}</script>
 
-<!-- Add page-specific data, which must exist in the page js, not global -->
+<!--
+Using this variable directly instead of using `JSON.parse` is deprecated.
+The READTHEDOCS_DATA global variable will be removed in the future.
+-->
 <script type="text/javascript">
-READTHEDOCS_DATA['page'] = {{ pagename|tojson }}
-{%- if page_source_suffix %}
-READTHEDOCS_DATA['source_suffix'] = {{ page_source_suffix|tojson }}
-{%- endif %}
+READTHEDOCS_DATA = 
JSON.parse(document.getElementById('READTHEDOCS_DATA').innerHTML);
 </script>
 
 <script type="text/javascript" src="{{ rtd_analytics_url }}" 
async="async"></script>
+<script type="text/javascript" src="{{ rtd_js_url }}" async="async"></script>
 
 <!-- end RTD <extrahead> -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/embed.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/embed.py
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/embed.py   2016-01-20 
19:14:16.000000000 +0100
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/embed.py   2020-07-08 
19:22:18.000000000 +0200
@@ -74,4 +74,6 @@
     app.add_config_value('readthedocs_embed_version', '', 'html')
     app.add_config_value('readthedocs_embed_doc', '', 'html')
 
-    return app
+    return {
+        'parallel_read_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/external_version_warning.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/external_version_warning.py
--- 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/external_version_warning.py    
    2020-04-21 19:24:24.000000000 +0200
+++ 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/external_version_warning.py    
    2020-07-08 19:22:18.000000000 +0200
@@ -28,3 +28,7 @@
 
 def setup(app):
     app.connect('doctree-resolved', process_external_version_warning_banner)
+
+    return {
+        'parallel_read_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/mixins.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/mixins.py
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/mixins.py  2020-04-21 
18:23:00.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/mixins.py  1970-01-01 
01:00:00.000000000 +0100
@@ -1,71 +0,0 @@
-import os
-
-import sphinx
-from sphinx.util.console import bold
-
-if sphinx.version_info < (1, 5):
-    # ``copy_static_entry`` was deprecated in Sphinx 1.5a1
-    from sphinx.util import copy_static_entry
-else:
-    from sphinx.util.fileutil import copy_asset
-
-try:
-    # Avaliable from Sphinx 1.6
-    from sphinx.util.logging import getLogger
-except ImportError:
-    from logging import getLogger
-
-log = getLogger(__name__)
-
-
-class BuilderMixin(object):  # pylint: disable=old-style-class
-
-    """Builder mixin class for copying and templating extra static files
-
-    Adds additional script and stylesheet files to the output static files 
path.
-    Template static files are provided a custom context and then copied to the
-    new path.
-    """
-
-    static_readthedocs_files = []
-
-    def get_static_readthedocs_context(self):
-        return self.globalcontext.copy()
-
-    def copy_static_readthedocs_files(self):
-        log.info(bold('copying readthedocs static files... '), nonl=True)
-        for filename in self.static_readthedocs_files:
-            path_dest = os.path.join(self.outdir, '_static')
-            path_src = os.path.join(
-                os.path.abspath(os.path.dirname(__file__)),
-                '_static',
-                filename
-            )
-            ctx = self.get_static_readthedocs_context()
-            if sphinx.version_info < (1, 5):
-                copy_static_entry(
-                    path_src,
-                    path_dest,
-                    self,
-                    context=ctx,
-                )
-            else:
-                from sphinx.util.template import SphinxRenderer
-                renderer = SphinxRenderer()
-
-                copy_asset(
-                    path_src,
-                    path_dest,
-                    context=ctx,
-                    renderer=renderer,
-                )
-        log.info('done')
-
-    def copy_static_files(self):
-        """Copy Read the Docs specific files after initial static pass
-
-        This overrides the base builder ``copy_static_files`` method to inject
-        custom static files.
-        """
-        super(BuilderMixin, self).copy_static_files()
-        self.copy_static_readthedocs_files()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/readthedocs.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/readthedocs.py
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/readthedocs.py     
2020-05-20 01:24:34.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/readthedocs.py     
2020-07-08 19:29:57.000000000 +0200
@@ -7,6 +7,7 @@
 import os
 import re
 import types
+from datetime import datetime
 from distutils.version import LooseVersion
 
 import sphinx
@@ -15,7 +16,6 @@
 
 
 from .embed import EmbedDirective
-from .mixins import BuilderMixin
 
 try:
     # Avaliable from Sphinx 1.6
@@ -29,22 +29,36 @@
     from sphinx.builders.html import StandaloneHTMLBuilder
     from sphinx.builders.singlehtml import SingleFileHTMLBuilder
 except ImportError:
-    from sphinx.builders.html import (DirectoryHTMLBuilder,
-                                      SingleFileHTMLBuilder,
-                                      StandaloneHTMLBuilder)
+    from sphinx.builders.html import (
+        DirectoryHTMLBuilder,
+        SingleFileHTMLBuilder,
+        StandaloneHTMLBuilder,
+    )
 
 log = getLogger(__name__)
 
+
 DEFAULT_STATIC_URL = 'https://assets.readthedocs.org/static/'
+
+# Exclude the SingleHTML builder that is used by RTD to zip up local media
+# That builder is never used "online"
 ONLINE_BUILDERS = [
-    'readthedocs', 'readthedocsdirhtml', 'readthedocssinglehtml'
+    'html',
+    'dirhtml',
+    'singlehtml',
+    # Deprecated builders
+    'readthedocs',
+    'readthedocsdirhtml',
+    'readthedocssinglehtml',
 ]
 # Only run JSON output once during HTML build
 # This saves resources and keeps filepaths correct,
 # because singlehtml filepaths are different
 JSON_BUILDERS = [
-    'html', 'dirhtml',
-    'readthedocs', 'readthedocsdirhtml'
+    'html',
+    'dirhtml',
+    'readthedocs',
+    'readthedocsdirhtml',
 ]
 
 # Whitelist keys that we want to output
@@ -59,31 +73,12 @@
 ]
 
 
-def finalize_media(app):
-    """Point media files at our media server."""
-
-    if (app.builder.name == 'readthedocssinglehtmllocalmedia' or
-            app.builder.format != 'html' or
-            not hasattr(app.builder, 'script_files')):
-        return  # Use local media for downloadable files
-    # Pull project data from conf.py if it exists
-    context = app.builder.config.html_context
-    STATIC_URL = context.get('STATIC_URL', DEFAULT_STATIC_URL)
-    js_file = '{}javascript/readthedocs-doc-embed.js'.format(STATIC_URL)
-    if sphinx.version_info < (1, 8):
-        app.builder.script_files.append(js_file)
-    else:
-        kwargs = {'async': 'async'}     # Workaround reserved word in Py3.7
-        app.add_js_file(js_file, **kwargs)
-
-
 def update_body(app, pagename, templatename, context, doctree):
     """
     Add Read the Docs content to Sphinx body content.
 
     This is the most reliable way to inject our content into the page.
     """
-
     STATIC_URL = context.get('STATIC_URL', DEFAULT_STATIC_URL)
     if app.builder.name == 'readthedocssinglehtmllocalmedia':
         if 'html_theme' in context and context['html_theme'] == 
'sphinx_rtd_theme':
@@ -132,18 +127,45 @@
             then adds the Read the Docs HTML content at the end of body.
             """
             # Render Read the Docs content
-            template_context = render_context.copy()
-            template_context['rtd_css_url'] = 
'{}css/readthedocs-doc-embed.css'.format(STATIC_URL)
-            template_context['rtd_analytics_url'] = 
'{}javascript/readthedocs-analytics.js'.format(
-                STATIC_URL,
-            )
+            ctx = render_context.copy()
+            ctx['rtd_data'] = {
+                'project': ctx.get('slug', ''),
+                'version': ctx.get('version_slug', ''),
+                'language': ctx.get('rtd_language', ''),
+                'programming_language': ctx.get('programming_language', ''),
+                'canonical_url': ctx.get('canonical_url', ''),
+                'theme': ctx.get('html_theme', ''),
+                'builder': 'sphinx',
+                'docroot': ctx.get('conf_py_path', ''),
+                'source_suffix': ctx.get('source_suffix', ''),
+                'page': ctx.get('pagename', ''),
+                'api_host': ctx.get('api_host', ''),
+                'commit': ctx.get('commit', ''),
+                'ad_free': ctx.get('ad_free', ''),
+                'build_date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
+                'global_analytics_code': ctx.get('global_analytics_code'),
+                'user_analytics_code': ctx.get('user_analytics_code'),
+                'subprojects': {
+                    slug: url for slug, url in ctx.get('subprojects', [])
+                },
+                'features': {
+                    'docsearch_disabled': ctx.get('docsearch_disabled', False),
+                },
+            }
+            if ctx.get('page_source_suffix'):
+                ctx['rtd_data']['source_suffix'] = ctx['page_source_suffix']
+            if ctx.get('proxied_api_host'):
+                ctx['rtd_data']['proxied_api_host'] = ctx['proxied_api_host']
+            ctx['rtd_css_url'] = 
'{}css/readthedocs-doc-embed.css'.format(STATIC_URL)
+            ctx['rtd_js_url'] = 
'{}javascript/readthedocs-doc-embed.js'.format(STATIC_URL)
+            ctx['rtd_analytics_url'] = 
'{}javascript/readthedocs-analytics.js'.format(STATIC_URL)
             source = os.path.join(
                 os.path.abspath(os.path.dirname(__file__)),
                 '_templates',
                 'readthedocs-insert.html.tmpl'
             )
             templ = open(source).read()
-            rtd_content = app.builder.templates.render_string(templ, 
template_context)
+            rtd_content = app.builder.templates.render_string(templ, ctx)
 
             # Handle original render function
             content = old_render(template, render_context)
@@ -200,6 +222,36 @@
         )
 
 
+def remove_search_init(app, exception):
+    """Remove Sphinx's Search.init() so it can be initialized by Read the 
Docs."""
+    if exception:
+        return
+
+    searchtools_file = os.path.abspath(
+        os.path.join(app.outdir, '_static', 'searchtools.js')
+    )
+
+    if os.path.exists(searchtools_file):
+        replacement_text = '/* Search initialization removed for Read the Docs 
*/'
+        replacement_regex = re.compile(
+            r'''
+            ^\$\(document\).ready\(function\s*\(\)\s*{(?:\n|\r\n?)
+            \s*Search.init\(\);(?:\n|\r\n?)
+            \}\);
+            ''',
+            (re.MULTILINE | re.VERBOSE)
+        )
+
+        log.info(bold('Updating searchtools for Read the Docs search... '), 
nonl=True)
+        with codecs.open(searchtools_file, 'r', encoding='utf-8') as infile:
+            data = infile.read()
+        with codecs.open(searchtools_file, 'w', encoding='utf-8') as outfile:
+            data = replacement_regex.sub(replacement_text, data)
+            outfile.write(data)
+    else:
+        log.warning('Missing searchtools: {}'.format(searchtools_file))
+
+
 def dump_sphinx_data(app, exception):
     """
     Dump data that is only in memory during Sphinx build.
@@ -261,99 +313,62 @@
         )
 
 
-class HtmlBuilderMixin(BuilderMixin):
+class ReadtheDocsBuilder(StandaloneHTMLBuilder):
 
-    static_readthedocs_files = [
-        'readthedocs-data.js_t',
-        # We patch searchtools and copy it with a special handler
-        # 'searchtools.js_t'
-    ]
-
-    REPLACEMENT_TEXT = '/* Search initialization removed for Read the Docs */'
-    REPLACEMENT_PATTERN = re.compile(
-        r'''
-        ^\$\(document\).ready\(function\s*\(\)\s*{(?:\n|\r\n?)
-        \s*Search.init\(\);(?:\n|\r\n?)
-        \}\);
-        ''',
-        (re.MULTILINE | re.VERBOSE)
-    )
+    """
+    Sphinx builder that builds HTML docs.
 
-    def get_static_readthedocs_context(self):
-        ctx = super(HtmlBuilderMixin, self).get_static_readthedocs_context()
-        if self.indexer is not None:
-            ctx.update(self.indexer.context_for_searchtool())
-        return ctx
-
-    def copy_static_readthedocs_files(self):
-        super(HtmlBuilderMixin, self).copy_static_readthedocs_files()
-        self._copy_searchtools()
-
-    def _copy_searchtools(self, renderer=None):
-        """Copy and patch searchtools
-
-        This uses the included Sphinx version's searchtools, but patches it to
-        remove automatic initialization. This is a fork of
-        ``sphinx.util.fileutil.copy_asset``
-        """
-        log.info(bold('copying searchtools... '), nonl=True)
+    Note: This builder is DEPRECATED.
+          In the future Read the Docs will use Sphinx's "html" instead.
+    """
 
-        if sphinx.version_info < (1, 8):
-            search_js_file = 'searchtools.js_t'
-        else:
-            search_js_file = 'searchtools.js'
-        path_src = os.path.join(
-            package_dir, 'themes', 'basic', 'static', search_js_file
-        )
-        if os.path.exists(path_src):
-            path_dest = os.path.join(self.outdir, '_static', 'searchtools.js')
-            if renderer is None:
-                # Sphinx 1.4 used the renderer from the existing builder, but
-                # the pattern for Sphinx 1.5 is to pass in a renderer separate
-                # from the builder. This supports both patterns for future
-                # compatibility
-                if sphinx.version_info < (1, 5):
-                    renderer = self.templates
-                else:
-                    from sphinx.util.template import SphinxRenderer
-                    renderer = SphinxRenderer()
-            with codecs.open(path_src, 'r', encoding='utf-8') as h_src:
-                with codecs.open(path_dest, 'w', encoding='utf-8') as h_dest:
-                    data = h_src.read()
-                    data = self.REPLACEMENT_PATTERN.sub(self.REPLACEMENT_TEXT, 
data)
-                    h_dest.write(renderer.render_string(
-                        data,
-                        self.get_static_readthedocs_context()
-                    ))
-        else:
-            log.warning('Missing {}'.format(search_js_file))
-        log.info('done')
+    name = 'readthedocs'
 
 
-class ReadtheDocsBuilder(HtmlBuilderMixin, StandaloneHTMLBuilder):
-    name = 'readthedocs'
+class ReadtheDocsDirectoryHTMLBuilder(DirectoryHTMLBuilder):
 
+    """
+    Sphinx builder that builds docs with clean URLs where each page gets its 
own directory.
+
+    Note: This builder is DEPRECATED.
+          In the future Read the Docs will use Sphinx's "dirhtml" instead.
+    """
 
-class ReadtheDocsDirectoryHTMLBuilder(HtmlBuilderMixin, DirectoryHTMLBuilder):
     name = 'readthedocsdirhtml'
 
 
-class ReadtheDocsSingleFileHTMLBuilder(BuilderMixin, SingleFileHTMLBuilder):
+class ReadtheDocsSingleFileHTMLBuilder(SingleFileHTMLBuilder):
+
+    """
+    Sphinx builder that builds a single HTML file to be served by Read the 
Docs.
+
+    This is for users who choose singlehtml as their main output format.
+    The downloadable .zip file is the builder below.
+
+    Note: This builder is DEPRECATED.
+          In the future Read the Docs will use Sphinx's "singlehtml" instead.
+    """
+
     name = 'readthedocssinglehtml'
 
 
-class ReadtheDocsSingleFileHTMLBuilderLocalMedia(BuilderMixin, 
SingleFileHTMLBuilder):
+class ReadtheDocsSingleFileHTMLBuilderLocalMedia(SingleFileHTMLBuilder):
+
+    """
+    Sphinx builder that builds a single HTML file that will be zipped by Read 
the Docs.
+
+    Read the Docs specific extras are typically not added to this builder
+    since it is intended for offline use.
+    """
+
     name = 'readthedocssinglehtmllocalmedia'
 
 
 def setup(app):
-    app.add_builder(ReadtheDocsBuilder)
-    app.add_builder(ReadtheDocsDirectoryHTMLBuilder)
-    app.add_builder(ReadtheDocsSingleFileHTMLBuilder)
     app.add_builder(ReadtheDocsSingleFileHTMLBuilderLocalMedia)
-    app.connect('builder-inited', finalize_media)
     app.connect('html-page-context', update_body)
     app.connect('html-page-context', generate_json_artifacts)
+    app.connect('build-finished', remove_search_init)
     app.connect('build-finished', dump_sphinx_data)
 
     # Embed
@@ -363,4 +378,11 @@
     app.add_config_value('readthedocs_embed_doc', '', 'html')
     app.add_config_value('rtd_generate_json_artifacts', False, 'html')
 
-    return {}
+    # Deprecated builders
+    app.add_builder(ReadtheDocsBuilder)
+    app.add_builder(ReadtheDocsDirectoryHTMLBuilder)
+    app.add_builder(ReadtheDocsSingleFileHTMLBuilder)
+
+    return {
+        'parallel_read_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/template-meta.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/template-meta.py
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/template-meta.py   
2018-04-19 06:41:22.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/template-meta.py   
2020-07-08 19:22:18.000000000 +0200
@@ -18,3 +18,7 @@
 
 def setup(app):
     app.connect('html-page-context', on_page_context)
+
+    return {
+        'parallel_read_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/versionwarning.py 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/versionwarning.py
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_ext/versionwarning.py  
2019-06-12 00:28:26.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_ext/versionwarning.py  
2020-07-08 19:22:18.000000000 +0200
@@ -64,3 +64,7 @@
     app.connect('doctree-resolved', process_meta)
     app.add_config_value('versionwarning-node', True, 'html')
     app.add_config_value('versionwarning-console', True, 'html')
+
+    return {
+        'parallel_read_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_sphinx_ext.egg-info/PKG-INFO 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_sphinx_ext.egg-info/PKG-INFO
--- old/readthedocs-sphinx-ext-1.0.4/readthedocs_sphinx_ext.egg-info/PKG-INFO   
2020-05-26 18:33:14.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/readthedocs_sphinx_ext.egg-info/PKG-INFO   
2020-07-08 19:50:32.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: readthedocs-sphinx-ext
-Version: 1.0.4
+Version: 2.1.0
 Summary: Sphinx extension for Read the Docs overrides
 Home-page: http://github.com/readthedocs/readthedocs-sphinx-ext
 Author: Read the Docs, Inc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_sphinx_ext.egg-info/SOURCES.txt 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_sphinx_ext.egg-info/SOURCES.txt
--- 
old/readthedocs-sphinx-ext-1.0.4/readthedocs_sphinx_ext.egg-info/SOURCES.txt    
    2020-05-26 18:33:15.000000000 +0200
+++ 
new/readthedocs-sphinx-ext-2.1.0/readthedocs_sphinx_ext.egg-info/SOURCES.txt    
    2020-07-08 19:50:32.000000000 +0200
@@ -6,15 +6,12 @@
 ./readthedocs_ext/__init__.py
 ./readthedocs_ext/embed.py
 ./readthedocs_ext/external_version_warning.py
-./readthedocs_ext/mixins.py
 ./readthedocs_ext/readthedocs.py
 ./readthedocs_ext/template-meta.py
 ./readthedocs_ext/versionwarning.py
 ./tests/__init__.py
 ./tests/test_integration.py
-./tests/test_mixins.py
 ./tests/util.py
-readthedocs_ext/_static/readthedocs-data.js_t
 readthedocs_ext/_templates/readthedocs-insert.html.tmpl
 readthedocs_sphinx_ext.egg-info/PKG-INFO
 readthedocs_sphinx_ext.egg-info/SOURCES.txt
@@ -23,7 +20,6 @@
 readthedocs_sphinx_ext.egg-info/top_level.txt
 tests/__init__.py
 tests/test_integration.py
-tests/test_mixins.py
 tests/util.py
 tests/pyexample/conf.py
 tests/pyexample/escape' this js.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/readthedocs-sphinx-ext-1.0.4/setup.py 
new/readthedocs-sphinx-ext-2.1.0/setup.py
--- old/readthedocs-sphinx-ext-1.0.4/setup.py   2020-05-26 18:32:11.000000000 
+0200
+++ new/readthedocs-sphinx-ext-2.1.0/setup.py   2020-07-08 19:29:57.000000000 
+0200
@@ -4,7 +4,7 @@
 
 setup(
     name='readthedocs-sphinx-ext',
-    version='1.0.4',
+    version='2.1.0',
     author='Read the Docs, Inc',
     author_email='d...@readthedocs.com',
     url='http://github.com/readthedocs/readthedocs-sphinx-ext',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/readthedocs-sphinx-ext-1.0.4/tests/test_integration.py 
new/readthedocs-sphinx-ext-2.1.0/tests/test_integration.py
--- old/readthedocs-sphinx-ext-1.0.4/tests/test_integration.py  2020-04-21 
18:23:00.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/tests/test_integration.py  2020-07-08 
19:22:18.000000000 +0200
@@ -1,7 +1,5 @@
 import unittest
 
-from readthedocs_ext.readthedocs import HtmlBuilderMixin
-
 from .util import sphinx_build, build_output
 
 
@@ -22,45 +20,40 @@
     def test_integration(self):
         self._run_test(
             'pyexample',
-            '_build/readthedocs/index.html',
+            '_build/html/index.html',
             'Hey there friend!',
-            builder='readthedocs',
+            builder='html',
         )
 
     def test_media_integration(self):
         self._run_test(
             'pyexample',
-            '_build/readthedocs/index.html',
+            '_build/html/index.html',
             'assets.readthedocs.org',
-            builder='readthedocs',
+            builder='html',
         )
 
     def test_included_js(self):
         self._run_test(
             'pyexample',
-            '_build/readthedocs/index.html',
-            'readthedocs-analytics.js',
-            builder='readthedocs',
+            '_build/html/index.html',
+            ['readthedocs-analytics.js', 'readthedocs-doc-embed.js'],
+            builder='html',
         )
 
-    def test_replacement_pattern(self):
-        pattern = HtmlBuilderMixin.REPLACEMENT_PATTERN
-        src = "$(document).ready(function() {\n  Search.init();\n});"
-        self.assertRegexpMatches(src, pattern)
-        # Minor changes to spacing, just to ensure rule is correct. This should
-        # never happen as this block of code is 10 years old
-        src = "$(document).ready(function    ()     {\n    Search.init();\n});"
-        self.assertRegexpMatches(src, pattern)
+    def test_included_data(self):
+        self._run_test(
+            'pyexample',
+            '_build/html/index.html',
+            'id="READTHEDOCS_DATA"',
+            builder='html',
+        )
 
     def test_searchtools_is_patched(self):
-        with build_output('pyexample', 
'_build/readthedocs/_static/searchtools.js',
-                          builder='readthedocs') as data:
+        with build_output('pyexample', '_build/html/_static/searchtools.js',
+                          builder='html') as data:
             self.assertNotIn('Search.init();', data)
-            self.assertNotRegexpMatches(
-                data,
-                HtmlBuilderMixin.REPLACEMENT_PATTERN
-            )
-            self.assertIn(HtmlBuilderMixin.REPLACEMENT_TEXT, data)
+            self.assertIn('Search initialization removed for Read the Docs', 
data)
 
     def test_generate_json_artifacts(self):
         self._run_test(
@@ -89,12 +82,11 @@
         )
 
     def test_escape_js_vars(self):
-        with build_output('pyexample', '_build/readthedocs/escape\' this 
js.html',
-                          builder='readthedocs') as data:
+        with build_output('pyexample', '_build/html/escape\' this js.html',
+                          builder='html') as data:
             self.assertNotIn('escape \' this js', data)
             self.assertIn('escape\\u0027 this js', data)
 
-        with build_output('pyexample', 
'_build/readthedocs/_static/readthedocs-data.js',
-                          builder='readthedocs') as data:
+        with build_output('pyexample', '_build/html/index.html', 
builder='html') as data:
             self.assertNotIn("malic''ious", data)
             self.assertIn('malic\\u0027\\u0027ious', data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/readthedocs-sphinx-ext-1.0.4/tests/test_mixins.py 
new/readthedocs-sphinx-ext-2.1.0/tests/test_mixins.py
--- old/readthedocs-sphinx-ext-1.0.4/tests/test_mixins.py       2018-06-06 
23:18:16.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.0/tests/test_mixins.py       1970-01-01 
01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-import unittest
-
-import sphinx
-
-from readthedocs_ext.readthedocs import HtmlBuilderMixin
-
-from .util import sphinx_build
-
-
-class MixinTests(unittest.TestCase):
-
-    def test_html_builder_context_contains_additions(self):
-        with sphinx_build('pyexample', 'readthedocs') as app:
-            self.assertIn(
-                'search_scorer_tool',
-                app.builder.get_static_readthedocs_context(),
-            )
-
-    def test_htmldir_builder_context_contains_additions(self):
-        with sphinx_build('pyexample', 'readthedocsdirhtml') as app:
-            self.assertIn(
-                'search_scorer_tool',
-                app.builder.get_static_readthedocs_context(),
-            )


Reply via email to