Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-readthedocs-sphinx-ext for
openSUSE:Factory checked in at 2022-02-03 23:16:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext (Old)
and /work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.1898
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-readthedocs-sphinx-ext"
Thu Feb 3 23:16:09 2022 rev:8 rq:950283 version:2.1.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext/python-readthedocs-sphinx-ext.changes
2020-08-01 12:30:48.998436510 +0200
+++
/work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.1898/python-readthedocs-sphinx-ext.changes
2022-02-03 23:16:38.464549453 +0100
@@ -1,0 +2,15 @@
+Sat Jan 29 17:46:24 UTC 2022 - Arun Persaud <[email protected]>
+
+- specfile:
+ * update copyright year
+
+- update to version 2.1.4:
+ * Update canonical_url to properly respect builder
+
+- changes from version 2.1.3:
+ * Use circleci
+
+- changes from version 2.1.2:
+ * Canonical URL: don't set it if is empty
+
+-------------------------------------------------------------------
Old:
----
readthedocs-sphinx-ext-2.1.1.tar.gz
New:
----
readthedocs-sphinx-ext-2.1.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-readthedocs-sphinx-ext.spec ++++++
--- /var/tmp/diff_new_pack.QktYob/_old 2022-02-03 23:16:39.108545057 +0100
+++ /var/tmp/diff_new_pack.QktYob/_new 2022-02-03 23:16:39.112545030 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-readthedocs-sphinx-ext
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-readthedocs-sphinx-ext
-Version: 2.1.1
+Version: 2.1.4
Release: 0
Summary: Sphinx extension for Read the Docs overrides
License: MIT
++++++ readthedocs-sphinx-ext-2.1.1.tar.gz ->
readthedocs-sphinx-ext-2.1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-2.1.1/PKG-INFO
new/readthedocs-sphinx-ext-2.1.4/PKG-INFO
--- old/readthedocs-sphinx-ext-2.1.1/PKG-INFO 2020-07-23 22:20:55.000000000
+0200
+++ new/readthedocs-sphinx-ext-2.1.4/PKG-INFO 2021-03-17 19:55:27.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: readthedocs-sphinx-ext
-Version: 2.1.1
+Version: 2.1.4
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-2.1.1/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
---
old/readthedocs-sphinx-ext-2.1.1/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
2020-07-23 22:18:06.000000000 +0200
+++
new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
2021-03-17 19:53:55.000000000 +0100
@@ -1,20 +1,22 @@
<!-- RTD Extra Head -->
-{%- if pagename == "index" %}
- {%- set canonical_page = "" %}
-{%- elif pagename.endswith("/index") %}
- {%- set canonical_page = pagename[:-("/index"|length)] + "/" %}
-{%- else %}
- {%- set ending = "/" if builder == "readthedocsdirhtml" else ".html" %}
- {%- set canonical_page = pagename + ending %}
-{%- endif %}
+{%- if canonical_url %}
+ {%- if pagename == "index" %}
+ {%- set canonical_page = "" %}
+ {%- elif pagename.endswith("/index") %}
+ {%- set canonical_page = pagename[:-("/index"|length)] + "/" %}
+ {%- else %}
+ {%- set ending = "/" if 'dirhtml' in builder else ".html" %}
+ {%- set canonical_page = pagename + ending %}
+ {%- endif %}
-<!--
-Always link to the latest version, as canonical.
-http://docs.readthedocs.org/en/latest/canonical.html
--->
-<link rel="canonical" href="{{ canonical_url }}{{ canonical_page }}" />
+ <!--
+ Always link to the latest version, as canonical.
+ http://docs.readthedocs.org/en/latest/canonical.html
+ -->
+ <link rel="canonical" href="{{ canonical_url|e }}{{ canonical_page }}" />
+{%- endif %}
<link rel="stylesheet" href="{{ rtd_css_url }}" type="text/css" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/readthedocs_ext/external_version_warning.py
new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/external_version_warning.py
---
old/readthedocs-sphinx-ext-2.1.1/readthedocs_ext/external_version_warning.py
2020-07-23 22:16:17.000000000 +0200
+++
new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/external_version_warning.py
2021-03-17 19:33:39.000000000 +0100
@@ -16,19 +16,50 @@
If the version type is external this will show a warning banner
at the top of each page of the documentation.
"""
+ is_gitlab = app.config.html_context.get('display_gitlab')
+ name = 'merge request' if is_gitlab else 'pull request'
+
+ build_url = app.config.readthedocs_build_url
+ build_url_node = nodes.reference(
+ '',
+ '',
+ nodes.Text('was created '),
+ internal=False,
+ refuri=build_url,
+ )
+
+ pr_number = app.config.html_context.get('current_version')
+ pr_number = '#{number}'.format(number=pr_number)
+ vcs_url = app.config.readthedocs_vcs_url
+ vcs_url_node = nodes.reference(
+ '',
+ '',
+ nodes.Text(pr_number),
+ internal=False,
+ refuri=vcs_url,
+ )
+
+ children = [
+ nodes.Text('This page '),
+ build_url_node, # was created
+ nodes.Text('from a {name} ('.format(name=name)),
+ vcs_url_node, # #123
+ nodes.Text(').'),
+ ]
+ prose = nodes.paragraph('', '', *children)
+ warning_node = nodes.warning(prose, prose)
+
for document in doctree.traverse(nodes.document):
- # TODO: Link to the Pull Request
- text = 'This page was created from a pull request.'
- if app.builder.config.html_context.get('display_gitlab'):
- text = 'This page was created from a merge request.'
- prose = nodes.paragraph(text, text)
- warning = nodes.warning(prose, prose)
- document.insert(0, warning)
+ document.insert(0, warning_node)
def setup(app):
app.connect('doctree-resolved', process_external_version_warning_banner)
+ # Settings
+ app.add_config_value('readthedocs_vcs_url', '', 'html')
+ app.add_config_value('readthedocs_build_url', '', 'html')
+
return {
'parallel_read_safe': True,
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/readthedocs_ext/readthedocs.py
new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/readthedocs.py
--- old/readthedocs-sphinx-ext-2.1.1/readthedocs_ext/readthedocs.py
2020-07-23 22:18:06.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.4/readthedocs_ext/readthedocs.py
2021-03-17 19:33:39.000000000 +0100
@@ -100,7 +100,7 @@
# This decouples the theme CSS (which is versioned independently) from
readthedocs.org
if theme_css.endswith('sphinx_rtd_theme.css'):
try:
- import sphinx_rtd_theme
+ import sphinx_rtd_theme # noqa
inject_css = LooseVersion(sphinx_rtd_theme.__version__) <
LooseVersion('0.4.0')
except ImportError:
pass
@@ -162,9 +162,7 @@
'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', [])
- },
+ 'subprojects': dict(ctx.get('subprojects', [])),
'features': {
'docsearch_disabled': ctx.get('docsearch_disabled', False),
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/readthedocs_sphinx_ext.egg-info/PKG-INFO
new/readthedocs-sphinx-ext-2.1.4/readthedocs_sphinx_ext.egg-info/PKG-INFO
--- old/readthedocs-sphinx-ext-2.1.1/readthedocs_sphinx_ext.egg-info/PKG-INFO
2020-07-23 22:20:55.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.4/readthedocs_sphinx_ext.egg-info/PKG-INFO
2021-03-17 19:55:27.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: readthedocs-sphinx-ext
-Version: 2.1.1
+Version: 2.1.4
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-2.1.1/readthedocs_sphinx_ext.egg-info/SOURCES.txt
new/readthedocs-sphinx-ext-2.1.4/readthedocs_sphinx_ext.egg-info/SOURCES.txt
---
old/readthedocs-sphinx-ext-2.1.1/readthedocs_sphinx_ext.egg-info/SOURCES.txt
2020-07-23 22:20:55.000000000 +0200
+++
new/readthedocs-sphinx-ext-2.1.4/readthedocs_sphinx_ext.egg-info/SOURCES.txt
2021-03-17 19:55:27.000000000 +0100
@@ -21,6 +21,8 @@
tests/__init__.py
tests/test_integration.py
tests/util.py
+tests/pr-example/conf.py
+tests/pr-example/index.rst
tests/pyexample/conf.py
tests/pyexample/escape' this js.rst
tests/pyexample/index.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-2.1.1/setup.py
new/readthedocs-sphinx-ext-2.1.4/setup.py
--- old/readthedocs-sphinx-ext-2.1.1/setup.py 2020-07-23 22:18:30.000000000
+0200
+++ new/readthedocs-sphinx-ext-2.1.4/setup.py 2021-03-17 19:54:56.000000000
+0100
@@ -4,7 +4,7 @@
setup(
name='readthedocs-sphinx-ext',
- version='2.1.1',
+ version='2.1.4',
author='Read the Docs, Inc',
author_email='[email protected]',
url='http://github.com/readthedocs/readthedocs-sphinx-ext',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/tests/pr-example/conf.py
new/readthedocs-sphinx-ext-2.1.4/tests/pr-example/conf.py
--- old/readthedocs-sphinx-ext-2.1.1/tests/pr-example/conf.py 1970-01-01
01:00:00.000000000 +0100
+++ new/readthedocs-sphinx-ext-2.1.4/tests/pr-example/conf.py 2021-03-17
19:33:39.000000000 +0100
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
+
+extensions = ['readthedocs_ext.external_version_warning']
+
+source_suffix = '.rst'
+master_doc = 'index'
+project = 'pyexample'
+copyright = '2021, readthedocs'
+author = 'readthedocs'
+version = '0.1'
+release = '0.1'
+language = None
+exclude_patterns = ['_build']
+todo_include_todos = False
+html_theme = 'alabaster'
+html_static_path = ['_static']
+htmlhelp_basename = 'pyexampledoc'
+
+html_context = {
+ 'slug': 'test-slug',
+ 'commit': 'deadd00d',
+ 'current_version': '123',
+}
+
+readthedocs_vcs_url =
'https://github.com/readthedocs/readthedocs.org/pull/7826'
+readthedocs_build_url =
'https://readthedocs.org/projects/docs/builds/12759474/'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/tests/pr-example/index.rst
new/readthedocs-sphinx-ext-2.1.4/tests/pr-example/index.rst
--- old/readthedocs-sphinx-ext-2.1.1/tests/pr-example/index.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/readthedocs-sphinx-ext-2.1.4/tests/pr-example/index.rst 2021-03-17
19:33:39.000000000 +0100
@@ -0,0 +1,9 @@
+.. pyexample documentation master file, created by
+ sphinx-quickstart on Fri May 29 13:34:37 2015.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to pyexample's documentation!
+=====================================
+
+Hey there friend!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-2.1.1/tests/pyexample/conf.py
new/readthedocs-sphinx-ext-2.1.4/tests/pyexample/conf.py
--- old/readthedocs-sphinx-ext-2.1.1/tests/pyexample/conf.py 2020-05-22
23:40:15.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.4/tests/pyexample/conf.py 2021-03-17
19:33:39.000000000 +0100
@@ -29,4 +29,5 @@
'user_analytics_code': '',
'global_analytics_code': "malic''ious",
'commit': 'deadd00d',
+ 'canonical_url': 'https://example.com/"',
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/tests/pyexample-json/conf.py
new/readthedocs-sphinx-ext-2.1.4/tests/pyexample-json/conf.py
--- old/readthedocs-sphinx-ext-2.1.1/tests/pyexample-json/conf.py
2019-10-21 23:22:04.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.4/tests/pyexample-json/conf.py
2021-03-17 19:33:39.000000000 +0100
@@ -22,3 +22,4 @@
html_theme = 'alabaster'
html_static_path = ['_static']
htmlhelp_basename = 'pyexampledoc'
+html_baseurl = 'https://example.com/'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-2.1.1/tests/test_integration.py
new/readthedocs-sphinx-ext-2.1.4/tests/test_integration.py
--- old/readthedocs-sphinx-ext-2.1.1/tests/test_integration.py 2020-07-23
22:16:17.000000000 +0200
+++ new/readthedocs-sphinx-ext-2.1.4/tests/test_integration.py 2021-03-17
19:33:39.000000000 +0100
@@ -1,18 +1,25 @@
import unittest
+from textwrap import dedent
-from .util import sphinx_build, build_output
+import pytest
+from sphinx import version_info
+
+from .util import build_output, sphinx_build
class LanguageIntegrationTests(unittest.TestCase):
- def _run_test(self, test_dir, test_file, test_string, builder='html'):
+ def _run_test(self, test_dir, test_file, test_string, builder='html',
assert_in=True):
with build_output(test_dir, test_file, builder) as data:
if not isinstance(test_string, list):
test_strings = [test_string]
else:
test_strings = test_string
for string in test_strings:
- self.assertIn(string, data)
+ if assert_in:
+ self.assertIn(string, data)
+ else:
+ self.assertNotIn(string, data)
class IntegrationTests(LanguageIntegrationTests):
@@ -90,3 +97,43 @@
with build_output('pyexample', '_build/html/index.html',
builder='html') as data:
self.assertNotIn("malic''ious", data)
self.assertIn('malic\\u0027\\u0027ious', data)
+
+ def test_escape_canonical_url(self):
+ self._run_test(
+ 'pyexample',
+ '_build/html/index.html',
+ '<link rel="canonical" href="https://example.com/"" />',
+ builder='html',
+ )
+
+ @pytest.mark.skipif(version_info < (1, 8), reason='Requires sphinx>=1.8')
+ def test_canonical_url(self):
+ self._run_test(
+ 'pyexample-json',
+ '_build/html/index.html',
+ 'Always link to the latest version, as canonical.',
+ builder='html',
+ assert_in=False,
+ )
+
+ self._run_test(
+ 'pyexample-json',
+ '_build/html/index.html',
+ '<link rel="canonical" href="https://example.com/index.html" />',
+ builder='html',
+ )
+
+ def test_version_warning(self):
+ self._run_test(
+ 'pr-example',
+ '_build/html/index.html',
+ # This paragraph can have a "last" class in old versions of sphinx
+ # <p class="last">
+ '>This page '
+ '<a class="reference external"
href="https://readthedocs.org/projects/docs/builds/12759474/">'
+ 'was created </a>'
+ 'from a pull request '
+ '(<a class="reference external"
href="https://github.com/readthedocs/readthedocs.org/pull/7826">'
+ '#123</a>).</p>',
+ builder='html',
+ )