Hello community,
here is the log from the commit of package python-os-api-ref for
openSUSE:Factory checked in at 2019-05-03 22:41:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-os-api-ref (Old)
and /work/SRC/openSUSE:Factory/.python-os-api-ref.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-os-api-ref"
Fri May 3 22:41:42 2019 rev:6 rq:692848 version:1.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-os-api-ref/python-os-api-ref.changes
2018-03-19 23:35:22.243862917 +0100
+++
/work/SRC/openSUSE:Factory/.python-os-api-ref.new.5148/python-os-api-ref.changes
2019-05-03 22:41:43.639153138 +0200
@@ -1,0 +2,23 @@
+Mon Apr 8 11:40:47 UTC 2019 - [email protected]
+
+- update to version 1.6.0
+ - Change openstack-dev to openstack-discuss
+ - Fix UnicodeDecodeError
+ - readthedocs.io support
+ - Remove name from project stanza
+ - Use 'sphinx.util.logging'
+ - Update sphinx extension logging
+ - Raise warning if top-level value is not a dict
+ - Fix sphinx-build invocation
+ - Update the remained discuss email
+ - Fixing duplicate label issue.
+ - switch documentation job to new PTI
+ - General overhaul of testing setup
+ - tests: Support Sphinx 1.8+
+ - Use openstackdocstheme
+ - Updated from global requirements
+ - import zuul job settings from project-config
+ - docs: Remove broken link
+- add 0001-Fix-microversion-test-handle-different-HTML-renderin.patch
+
+-------------------------------------------------------------------
Old:
----
os-api-ref-1.5.0.tar.gz
New:
----
0001-Fix-microversion-test-handle-different-HTML-renderin.patch
os-api-ref-1.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-os-api-ref.spec ++++++
--- /var/tmp/diff_new_pack.XGgOXj/_old 2019-05-03 22:41:44.535155024 +0200
+++ /var/tmp/diff_new_pack.XGgOXj/_new 2019-05-03 22:41:44.539155032 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-os-api-ref
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,37 +12,47 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
-%global sname os-api-ref
Name: python-os-api-ref
-Version: 1.5.0
+Version: 1.6.0
Release: 0
Summary: Sphinx Extensions to support API reference sites in OpenStack
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://launchpad.net/%{sname}
-Source0:
https://files.pythonhosted.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
+URL: https://launchpad.net/%{sname}
+Source0:
https://files.pythonhosted.org/packages/source/o/os-api-ref/os-api-ref-1.6.0.tar.gz
+# https://review.openstack.org/#/c/630146/
+Patch1: 0001-Fix-microversion-test-handle-different-HTML-renderin.patch
BuildRequires: openstack-macros
-BuildRequires: python-PyYAML >= 3.10
-BuildRequires: python-Sphinx
-BuildRequires: python-beautifulsoup4 >= 4.6.0
-BuildRequires: python-docutils >= 0.11
-BuildRequires: python-openstackdocstheme >= 1.18.1
-BuildRequires: python-oslosphinx >= 4.7.0
-BuildRequires: python-pbr >= 2.0.0
-BuildRequires: python-python-subunit >= 1.0.0
-BuildRequires: python-sphinx-testing >= 0.7.2
-BuildRequires: python-testrepository >= 0.0.18
-BuildRequires: python-testtools >= 2.2.0
-Requires: python-PyYAML >= 3.10
+BuildRequires: python2-PyYAML >= 3.12
+BuildRequires: python2-Sphinx
+BuildRequires: python2-beautifulsoup4
+BuildRequires: python2-openstackdocstheme >= 1.18.1
+BuildRequires: python2-pbr >= 2.0.0
+BuildRequires: python2-python-subunit
+BuildRequires: python2-sphinx-testing
+BuildRequires: python2-stestr
+BuildRequires: python2-testrepository
+BuildRequires: python2-testtools
+BuildRequires: python3-PyYAML >= 3.12
+BuildRequires: python3-Sphinx
+BuildRequires: python3-beautifulsoup4
+BuildRequires: python3-openstackdocstheme >= 1.18.1
+BuildRequires: python3-pbr >= 2.0.0
+BuildRequires: python3-python-subunit
+BuildRequires: python3-sphinx-testing
+BuildRequires: python3-stestr
+BuildRequires: python3-testrepository
+BuildRequires: python3-testtools
+Requires: python-PyYAML >= 3.12
Requires: python-Sphinx
-Requires: python-docutils >= 0.11
Requires: python-openstackdocstheme >= 1.18.1
Requires: python-pbr >= 2.0.0
BuildArch: noarch
+%python_subpackages
%description
This project is a collection of sphinx stanzas that assist in building an API
@@ -57,22 +67,22 @@
expand / collapse all sections.
%prep
-%autosetup -n %{sname}-%{version}
+%autosetup -p1 -n os-api-ref-1.6.0
%py_req_cleanup
%build
-%{py2_build}
+%{python_build}
%install
-%{py2_install}
+%{python_install}
%check
-%{__python2} setup.py testr
+%python_exec -m stestr.cli run
-%files
+%files %{python_files}
%license LICENSE
%doc README.rst ChangeLog
-%{python2_sitelib}/os_api_ref
-%{python2_sitelib}/*.egg-info
+%{python_sitelib}/os_api_ref
+%{python_sitelib}/*.egg-info
%changelog
++++++ 0001-Fix-microversion-test-handle-different-HTML-renderin.patch ++++++
>From 4e56d09dafaa7e2b2dc9fd2cd1864ffe6c39e219 Mon Sep 17 00:00:00 2001
From: Luigi Toscano <[email protected]>
Date: Fri, 11 Jan 2019 11:58:11 +0100
Subject: [PATCH] Fix microversion test: handle different HTML renderings
The rendered HTML changes a bit between beautifulsoup4 4.6.3 and 4.7.1.
A regular expression can handle both cases.
Change-Id: I64d4c56b480d54b50e58141999636b91b5fb4f94
---
os_api_ref/tests/test_microversions.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/os_api_ref/tests/test_microversions.py
b/os_api_ref/tests/test_microversions.py
index b58f6a6..d58f673 100644
--- a/os_api_ref/tests/test_microversions.py
+++ b/os_api_ref/tests/test_microversions.py
@@ -45,13 +45,13 @@ class TestMicroversions(base.TestCase):
def test_rest_method(self):
"""Test that min / max mv css class attributes are set"""
content = self.soup.find_all(class_='rp_min_ver_2_17')
- self.assertIn(
- '<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ">',
- str(content[0]))
+ self.assertRegexpMatches(
+ str(content[0]),
+ '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
content = self.soup.find_all(class_='rp_max_ver_2_19')
- self.assertIn(
- '<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ">',
- str(content[0]))
+ self.assertRegexpMatches(
+ str(content[0]),
+ '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
def test_parameters_table(self):
"""Test that min / max mv css class attributes are set in params"""
--
2.21.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.XGgOXj/_old 2019-05-03 22:41:44.563155083 +0200
+++ /var/tmp/diff_new_pack.XGgOXj/_new 2019-05-03 22:41:44.563155083 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/openstack/os-api-ref/os-api-ref.spec.j2</param>
+ <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/stein/openstack/os-api-ref/os-api-ref.spec.j2</param>
<param name="output-name">python-os-api-ref.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/requirements.txt</param>
+ <param
name="requirements">https://raw.githubusercontent.com/openstack/os-api-ref/master/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,os-api-ref</param>
</service>
++++++ os-api-ref-1.5.0.tar.gz -> os-api-ref-1.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/.stestr.conf
new/os-api-ref-1.6.0/.stestr.conf
--- old/os-api-ref-1.5.0/.stestr.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/os-api-ref-1.6.0/.stestr.conf 2018-12-12 11:53:22.000000000 +0100
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=${OS_TEST_PATH:-./os_api_ref/tests}
+top_dir=./
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/.zuul.yaml
new/os-api-ref-1.6.0/.zuul.yaml
--- old/os-api-ref-1.5.0/.zuul.yaml 2018-01-18 15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/.zuul.yaml 2018-12-12 11:53:22.000000000 +0100
@@ -10,7 +10,12 @@
- openstack/os-api-ref
- project:
- name: openstack/os-api-ref
+ templates:
+ - openstack-python-jobs
+ - openstack-python35-jobs
+ - openstack-python36-jobs
+ - check-requirements
+ - publish-openstack-docs-pti
check:
jobs:
- os-api-ref-nova-src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/AUTHORS new/os-api-ref-1.6.0/AUTHORS
--- old/os-api-ref-1.5.0/AUTHORS 2018-01-18 15:23:16.000000000 +0100
+++ new/os-api-ref-1.6.0/AUTHORS 2018-12-12 11:55:31.000000000 +0100
@@ -4,22 +4,28 @@
Daniel Gonzalez <[email protected]>
Dirk Mueller <[email protected]>
Dmitry Shachnev <[email protected]>
+Doug Hellmann <[email protected]>
Flavio Percoco <[email protected]>
+Gergely Csatari <[email protected]>
+Graham Hayes <[email protected]>
Graham Hayes <[email protected]>
Karen Bradshaw <[email protected]>
Monty Taylor <[email protected]>
Nam Nguyen Hoai <[email protected]>
Ondřej Nový <[email protected]>
Sean Dague <[email protected]>
+Sean McGinnis <[email protected]>
Stephen Finucane <[email protected]>
+Telles Nobrega <[email protected]>
Thomas Bechtold <[email protected]>
Tony Breeds <[email protected]>
Tony Xu <[email protected]>
Tristan Cacqueray <[email protected]>
Yuval Brik <[email protected]>
-Zuul <[email protected]>
gengchc2 <[email protected]>
ghanshyam <[email protected]>
+jacky06 <[email protected]>
+melissaml <[email protected]>
ricolin <[email protected]>
shangxiaobj <[email protected]>
shashi.kant <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/ChangeLog
new/os-api-ref-1.6.0/ChangeLog
--- old/os-api-ref-1.5.0/ChangeLog 2018-01-18 15:23:16.000000000 +0100
+++ new/os-api-ref-1.6.0/ChangeLog 2018-12-12 11:55:31.000000000 +0100
@@ -1,6 +1,28 @@
CHANGES
=======
+1.6.0
+-----
+
+* Fixing duplicate label issue
+* readthedocs.io support
+* Update the remained discuss email
+* Change openstack-dev to openstack-discuss
+* Update sphinx extension logging
+* tests: Support Sphinx 1.8+
+* docs: Remove broken link
+* switch documentation job to new PTI
+* Fix sphinx-build invocation
+* import zuul job settings from project-config
+* Use 'sphinx.util.logging'
+* General overhaul of testing setup
+* Raise warning if top-level value is not a dict
+* Updated from global requirements
+* Updated from global requirements
+* Updated from global requirements
+* Use openstackdocstheme
+* Remove name from project stanza
+
1.5.0
-----
@@ -10,6 +32,7 @@
* Add 'uuid' type
* Fix Zuul jobs
* Updated from global requirements
+* Fix UnicodeDecodeError
* Updated from global requirements
* doc: Remove deprecated call to sphinx.util.compat
* Remove unconstraint package installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/PKG-INFO
new/os-api-ref-1.6.0/PKG-INFO
--- old/os-api-ref-1.5.0/PKG-INFO 2018-01-18 15:23:17.000000000 +0100
+++ new/os-api-ref-1.6.0/PKG-INFO 2018-12-12 11:55:31.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: os-api-ref
-Version: 1.5.0
+Version: 1.6.0
Summary: Sphinx Extensions to support API reference sites in OpenStack
Home-page: https://docs.openstack.org/os-api-ref/latest/
Author: OpenStack
-Author-email: [email protected]
+Author-email: [email protected]
License: UNKNOWN
-Description-Content-Type: UNKNOWN
Description: ========================
Team and repository tags
========================
@@ -52,7 +51,7 @@
A list, in no particular order, of things we should do in this
project. If you would like to contribute to any of these please show
up in ``#openstack-dev`` on IRC and ask for ``sdague`` or ``mugsie``
- to discuss or send an email to the [email protected]
list
+ to discuss or send an email to the
[email protected] list
with [api] in the subject line.
* Enhance documentation with more examples and best practices
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/README.rst
new/os-api-ref-1.6.0/README.rst
--- old/os-api-ref-1.5.0/README.rst 2018-01-18 15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/README.rst 2018-12-12 11:53:22.000000000 +0100
@@ -43,7 +43,7 @@
A list, in no particular order, of things we should do in this
project. If you would like to contribute to any of these please show
up in ``#openstack-dev`` on IRC and ask for ``sdague`` or ``mugsie``
-to discuss or send an email to the [email protected] list
+to discuss or send an email to the [email protected] list
with [api] in the subject line.
* Enhance documentation with more examples and best practices
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/doc/requirements.txt
new/os-api-ref-1.6.0/doc/requirements.txt
--- old/os-api-ref-1.5.0/doc/requirements.txt 1970-01-01 01:00:00.000000000
+0100
+++ new/os-api-ref-1.6.0/doc/requirements.txt 2018-12-12 11:53:22.000000000
+0100
@@ -0,0 +1,5 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+openstackdocstheme>=1.18.1 # Apache-2.0
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/doc/source/conf.py
new/os-api-ref-1.6.0/doc/source/conf.py
--- old/os-api-ref-1.5.0/doc/source/conf.py 2018-01-18 15:20:43.000000000
+0100
+++ new/os-api-ref-1.6.0/doc/source/conf.py 2018-12-12 11:53:22.000000000
+0100
@@ -22,9 +22,14 @@
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
- 'oslosphinx'
+ 'openstackdocstheme'
]
+# openstackdocstheme options
+repository_name = 'openstack/os-api-ref'
+bug_project = 'openstack-doc-tools'
+bug_tag = 'os-api-ref'
+
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
@@ -37,7 +42,7 @@
# General information about the project.
project = u'os-api-ref'
-copyright = u'2016, The contributors'
+copyright = u'2018, The contributors'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@@ -57,9 +62,14 @@
# html_theme = '_theme'
# html_static_path = ['static']
+html_theme = 'openstackdocs'
+
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
+# Must set this variable to include year, month, day, hours, and minutes.
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
+
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/doc/source/index.rst
new/os-api-ref-1.6.0/doc/source/index.rst
--- old/os-api-ref-1.5.0/doc/source/index.rst 2018-01-18 15:20:43.000000000
+0100
+++ new/os-api-ref-1.6.0/doc/source/index.rst 2018-12-12 11:53:22.000000000
+0100
@@ -1,8 +1,3 @@
-.. os-api-ref documentation master file, created by
- sphinx-quickstart on Tue Jul 9 22:26:36 2013.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
==============================================
Welcome to os-api-ref developer documentation!
==============================================
@@ -19,5 +14,4 @@
==================
* :ref:`genindex`
-* :ref:`modindex`
* :ref:`search`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref/__init__.py
new/os-api-ref-1.6.0/os_api_ref/__init__.py
--- old/os-api-ref-1.5.0/os_api_ref/__init__.py 2018-01-18 15:20:43.000000000
+0100
+++ new/os-api-ref-1.6.0/os_api_ref/__init__.py 2018-12-12 11:53:25.000000000
+0100
@@ -12,6 +12,7 @@
from collections import OrderedDict
import os
+import random
import re
from docutils import nodes
@@ -19,6 +20,8 @@
from docutils.parsers.rst.directives.tables import Table
from docutils.statemachine import ViewList
import pbr.version
+import six
+from sphinx.util import logging
from sphinx.util.osutil import copyfile
import yaml
@@ -29,6 +32,8 @@
__version__ = pbr.version.VersionInfo(
'os_api_ref').version_string()
+LOG = logging.getLogger(__name__)
+
# This is to allow for a graceful swap from oslosphinx to openstackdocstheme
THEME = 'openstackdocstheme'
@@ -166,8 +171,6 @@
lineno = self.state_machine.abs_line_number()
target = nodes.target()
section = nodes.section(classes=["detail-control"])
- # env = self.state.document.settings.env
- # env.app.info("Parent %s" % self.state.parent.attributes)
node = rest_method()
@@ -196,7 +199,8 @@
# We need to build a temporary target that we can replace
# later in the processing to get the TOC to resolve correctly.
- temp_target = "%s-selector" % node['target']
+ temp_target = "%s-%d-selector" % (node['target'],
+ random.randint(1, 1000))
target = nodes.target(ids=[temp_target])
self.state.add_target(temp_target, '', target, lineno)
section += node
@@ -218,25 +222,22 @@
return YAML_CACHE[fpath]
lookup = {}
- # self.app.info("Fpath: %s" % fpath)
try:
with open(fpath, 'r') as stream:
lookup = ordered_load(stream)
except IOError:
- self.app.warn(
- "Parameters file %s not found" % fpath,
- (self.env.docname, None))
+ LOG.warning("Parameters file not found, %s", fpath,
+ location=(self.env.docname, None))
return
except yaml.YAMLError as exc:
- self.app.warn(exc)
+ LOG.exception(exc_info=exc)
raise
if lookup:
self._check_yaml_sorting(fpath, lookup)
else:
- self.app.warn(
- "Parameters file is empty %s" % fpath,
- (self.env.docname, None))
+ LOG.warning("Parameters file is empty, %s", fpath,
+ location=(self.env.docname, None))
return
YAML_CACHE[fpath] = lookup
@@ -257,15 +258,18 @@
last = None
for key, value in yaml_data.items():
+ if not isinstance(value, dict):
+ raise Exception('Expected a dict for {0}; got {0}={1}).\n'
+ 'You probably have indentation typo in your'
+ 'YAML source'.format(key, value))
+
# use of an invalid 'in' value
if value['in'] not in sections:
- self.app.warn(
- "``%s`` is not a valid value for 'in' (must be one of: %s)"
- ". (see ``%s``)" % (
- value['in'],
- ", ".join(sorted(sections.keys())),
- key)
- )
+ LOG.warning("``%s`` is not a valid value for 'in' (must be "
+ "one of: %s). (see ``%s``)",
+ value['in'],
+ ", ".join(sorted(sections.keys())),
+ key)
continue
if last is None:
@@ -275,17 +279,13 @@
current_section = value['in']
last_section = last[1]['in']
if sections[current_section] < sections[last_section]:
- self.app.warn(
- "Section out of order. All parameters in section ``%s`` "
- "should be after section ``%s``. (see ``%s``)" % (
- last_section,
- current_section,
- last[0]))
+ LOG.warning("Section out of order. All parameters in section "
+ "``%s`` should be after section ``%s``. (see "
+ "``%s``)", last_section, current_section, last[0])
if (sections[value['in']] == sections[last[1]['in']] and
key.lower() < last[0].lower()):
- self.app.warn(
- "Parameters out of order ``%s`` should be after ``%s``" % (
- last[0], key))
+ LOG.warning("Parameters out of order ``%s`` should be after "
+ "``%s``", last[0], key)
last = (key, value)
def yaml_from_file(self, fpath):
@@ -301,17 +301,14 @@
content = "\n".join(self.content)
parsed = yaml.safe_load(content)
- # self.app.info("Params loaded is %s" % parsed)
- # self.app.info("Lookup table looks like %s" % lookup)
new_content = list()
for paramlist in parsed:
if not isinstance(paramlist, dict):
- self.app.warn(
- ("Invalid parameter definition ``%s``. Expected "
- "format: ``name: reference``. "
- " Skipping." % paramlist),
- (self.state_machine.node.source,
- self.state_machine.node.line))
+ location = (self.state_machine.node.source,
+ self.state_machine.node.line)
+ LOG.warning("Invalid parameter definition ``%s``. Expected "
+ "format: ``name: reference``. Skipping.",
+ paramlist, location=location)
continue
for name, ref in paramlist.items():
if ref in lookup:
@@ -322,11 +319,10 @@
# used this way, however it does provide a way to
# track down where the parameters list is that is
# wrong. So it's good enough for now.
- self.app.warn(
- ("No field definition for ``%s`` found in ``%s``. "
- " Skipping." % (ref, fpath)),
- (self.state_machine.node.source,
- self.state_machine.node.line))
+ location = (self.state_machine.node.source,
+ self.state_machine.node.line)
+ LOG.warning("No field definition for ``%s`` found in "
+ "``%s``. Skipping.", ref, fpath)
# Check for path params in stanza
for i, param in enumerate(self.env.path_params):
@@ -340,19 +336,15 @@
# Warn that path parameters are not set in rest_parameter
# stanza and will not appear in the generated table.
for param in self.env.path_params:
- self.app.warn(
- ("No path parameter ``%s`` found in rest_parameter"
- " stanza.\n"
- % param.rstrip('}').lstrip('{')),
- (self.state_machine.node.source,
- self.state_machine.node.line))
+ location = (self.state_machine.node.source,
+ self.state_machine.node.line)
+ LOG.warning("No path parameter ``%s`` found in rest_parameter"
+ " stanza.\n", param.rstrip('}').lstrip('{'))
- # self.app.info("New content %s" % new_content)
self.yaml = new_content
def run(self):
self.env = self.state.document.settings.env
- self.app = self.env.app
# Make sure we have some content, which should be yaml that
# defines some parameters.
@@ -389,7 +381,6 @@
self.col_widths = self.col_widths[1]
# Actually convert the yaml
title, messages = self.make_title()
- # self.app.info("Title %s, messages %s" % (title, messages))
table_node = self.build_table()
self.add_name(table_node)
if title:
@@ -401,7 +392,7 @@
groups = []
trow = nodes.row()
entry = nodes.entry()
- para = nodes.paragraph(text=unicode(table_data))
+ para = nodes.paragraph(text=six.u(table_data))
entry += para
trow += entry
rows.append(trow)
@@ -429,7 +420,6 @@
rows = []
groups = []
try:
- # self.app.info("Parsed content is: %s" % self.yaml)
for key, values in self.yaml:
min_version = values.get('min_version', '')
max_version = values.get('max_version', '')
@@ -457,8 +447,8 @@
rows.append(trow)
except AttributeError as exc:
if 'key' in locals():
- self.app.warn("Failure on key: %s, values: %s. %s" %
- (key, values, exc))
+ LOG.warning("Failure on key: %s, values: %s. %s",
+ key, values, exc)
else:
rows.append(self.show_no_yaml_error())
return rows, groups
@@ -649,10 +639,11 @@
'glyphicons-halflings-regular.ttf',
'glyphicons-halflings-regular.woff'
)
- if app.builder.name != 'html' or exception:
+ builders = ('html', 'readthedocs', 'readthedocssinglehtmllocalmedia')
+ if app.builder.name not in builders or exception:
return
- app.info('Copying assets: %s' % ', '.join(assets))
- app.info('Copying fonts: %s' % ', '.join(fonts))
+ LOG.info('Copying assets: %s', ', '.join(assets))
+ LOG.info('Copying fonts: %s', ', '.join(fonts))
for asset in assets:
dest = os.path.join(app.builder.outdir, '_static', asset)
source = os.path.abspath(os.path.dirname(__file__))
@@ -677,12 +668,9 @@
# TODO(sdague): if someone wants to support latex/pdf, or man page
# generation using these stanzas, here is where you'd need to
# specify content specific renderers.
- app.add_node(rest_method,
- html=(rest_method_html, None))
- app.add_node(rest_expand_all,
- html=(rest_expand_all_html, None))
- app.add_node(http_code,
- html=(http_code_html, None))
+ app.add_node(rest_method, html=(rest_method_html, None))
+ app.add_node(rest_expand_all, html=(rest_expand_all_html, None))
+ app.add_node(http_code, html=(http_code_html, None))
# This specifies all our directives that we're adding
app.add_directive('rest_parameters', RestParametersDirective)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref/http_codes.py
new/os-api-ref-1.6.0/os_api_ref/http_codes.py
--- old/os-api-ref-1.5.0/os_api_ref/http_codes.py 2018-01-18
15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref/http_codes.py 2018-12-12
11:53:22.000000000 +0100
@@ -14,8 +14,11 @@
from docutils.parsers.rst.directives.tables import Table
from docutils.statemachine import ViewList
from six.moves.http_client import responses
+from sphinx.util import logging
import yaml
+LOG = logging.getLogger(__name__)
+
# cache for file -> yaml so we only do the load and check of a yaml
# file once during a sphinx processing run.
HTTP_YAML_CACHE = {}
@@ -44,17 +47,17 @@
if fpath in HTTP_YAML_CACHE:
return HTTP_YAML_CACHE[fpath]
- # self.app.info("Fpath: %s" % fpath)
+ # LOG.info("Fpath: %s" % fpath)
try:
with open(fpath, 'r') as stream:
lookup = yaml.safe_load(stream)
except IOError:
- self.app.warn(
+ LOG.warning(
"Parameters file %s not found" % fpath,
(self.env.docname, None))
return
except yaml.YAMLError as exc:
- self.app.warn(exc)
+ LOG.warning(exc)
raise
HTTP_YAML_CACHE[fpath] = lookup
@@ -62,7 +65,6 @@
def run(self):
self.env = self.state.document.settings.env
- self.app = self.env.app
# Make sure we have some content, which should be yaml that
# defines some parameters.
@@ -85,7 +87,7 @@
self.status_defs = self._load_status_file(status_defs_file)
- # self.app.info("%s" % str(self.status_defs))
+ # LOG.info("%s" % str(self.status_defs))
if status_type not in self.status_types:
error = self.state_machine.reporter.error(
@@ -109,7 +111,7 @@
self.col_widths = self.col_widths[1]
# Actually convert the yaml
title, messages = self.make_title()
- # self.app.info("Title %s, messages %s" % (title, messages))
+ # LOG.info("Title %s, messages %s" % (title, messages))
table_node = self.build_table()
self.add_name(table_node)
@@ -138,7 +140,7 @@
(code, self.status_defs[code][reason])
)
except KeyError:
- self.app.warn(
+ LOG.warning(
"Could not find %s for code %s" % (reason, code))
new_content.append(
(code, self.status_defs[code]['default']))
@@ -191,7 +193,7 @@
rows = []
groups = []
try:
- # self.app.info("Parsed content is: %s" % self.yaml)
+ # LOG.info("Parsed content is: %s" % self.yaml)
for code, desc in self.yaml:
h_code = http_code()
@@ -204,8 +206,8 @@
rows.append(trow)
except AttributeError as exc:
# if 'key' in locals():
- self.app.warn("Failure on key: %s, values: %s. %s" %
- (code, desc, exc))
+ LOG.warning("Failure on key: %s, values: %s. %s" %
+ (code, desc, exc))
# else:
# rows.append(self.show_no_yaml_error())
return rows, groups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/os-api-ref-1.5.0/os_api_ref/tests/test_basic_example.py
new/os-api-ref-1.6.0/os_api_ref/tests/test_basic_example.py
--- old/os-api-ref-1.5.0/os_api_ref/tests/test_basic_example.py 2018-01-18
15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref/tests/test_basic_example.py 2018-12-12
11:53:22.000000000 +0100
@@ -18,11 +18,26 @@
"""
from bs4 import BeautifulSoup
+import sphinx
from sphinx_testing import with_app
from os_api_ref.tests import base
+# FIXME(stephenfin): This is horrible. We're monkeypatching this to work around
+# the fact that Sphinx 1.8+ started called 'abspath' from within the
+# 'sphinx.application.Application' class [1]. This means our careful use of
+# 'sphinx_testing.path.path' for 'Application.outdir' etc. gets stomped on.
+# We're correcting that but we're doing so globally because mock doesn't work
+# for some reason and this is bound to have some side effects
+#
+# [1] https://github.com/sphinx-doc/sphinx/commit/3a85b3502f
+try:
+ sphinx.application.abspath = lambda x: x
+except ImportError: # Sphinx < 1.8
+ pass
+
+
class TestBasicExample(base.TestCase):
"""Test basic rendering.
@@ -38,7 +53,7 @@
self.status = status
self.warning = warning
self.app.build()
- self.html = (app.outdir / 'index.html').read_text()
+ self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/os-api-ref-1.5.0/os_api_ref/tests/test_microversions.py
new/os-api-ref-1.6.0/os_api_ref/tests/test_microversions.py
--- old/os-api-ref-1.5.0/os_api_ref/tests/test_microversions.py 2018-01-18
15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref/tests/test_microversions.py 2018-12-12
11:53:22.000000000 +0100
@@ -38,7 +38,7 @@
self.app.build()
self.status = status.getvalue()
self.warning = warning.getvalue()
- self.html = (app.outdir / 'index.html').read_text()
+ self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref/tests/test_warnings.py
new/os-api-ref-1.6.0/os_api_ref/tests/test_warnings.py
--- old/os-api-ref-1.5.0/os_api_ref/tests/test_warnings.py 2018-01-18
15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref/tests/test_warnings.py 2018-12-12
11:53:22.000000000 +0100
@@ -38,7 +38,7 @@
self.app.build()
self.status = status.getvalue()
self.warning = warning.getvalue()
- self.html = (app.outdir / 'index.html').read_text()
+ self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref.egg-info/PKG-INFO
new/os-api-ref-1.6.0/os_api_ref.egg-info/PKG-INFO
--- old/os-api-ref-1.5.0/os_api_ref.egg-info/PKG-INFO 2018-01-18
15:23:16.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref.egg-info/PKG-INFO 2018-12-12
11:55:31.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: os-api-ref
-Version: 1.5.0
+Version: 1.6.0
Summary: Sphinx Extensions to support API reference sites in OpenStack
Home-page: https://docs.openstack.org/os-api-ref/latest/
Author: OpenStack
-Author-email: [email protected]
+Author-email: [email protected]
License: UNKNOWN
-Description-Content-Type: UNKNOWN
Description: ========================
Team and repository tags
========================
@@ -52,7 +51,7 @@
A list, in no particular order, of things we should do in this
project. If you would like to contribute to any of these please show
up in ``#openstack-dev`` on IRC and ask for ``sdague`` or ``mugsie``
- to discuss or send an email to the [email protected]
list
+ to discuss or send an email to the
[email protected] list
with [api] in the subject line.
* Enhance documentation with more examples and best practices
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref.egg-info/SOURCES.txt
new/os-api-ref-1.6.0/os_api_ref.egg-info/SOURCES.txt
--- old/os-api-ref-1.5.0/os_api_ref.egg-info/SOURCES.txt 2018-01-18
15:23:17.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref.egg-info/SOURCES.txt 2018-12-12
11:55:31.000000000 +0100
@@ -1,5 +1,6 @@
.coveragerc
.mailmap
+.stestr.conf
.testr.conf
.zuul.yaml
AUTHORS
@@ -17,6 +18,7 @@
setup.py
test-requirements.txt
tox.ini
+doc/requirements.txt
doc/source/conf.py
doc/source/contributing.rst
doc/source/http-status.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref.egg-info/pbr.json
new/os-api-ref-1.6.0/os_api_ref.egg-info/pbr.json
--- old/os-api-ref-1.5.0/os_api_ref.egg-info/pbr.json 2018-01-18
15:23:16.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref.egg-info/pbr.json 2018-12-12
11:55:31.000000000 +0100
@@ -1 +1 @@
-{"git_version": "cb41558", "is_release": true}
\ No newline at end of file
+{"git_version": "6fee36c", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/os_api_ref.egg-info/requires.txt
new/os-api-ref-1.6.0/os_api_ref.egg-info/requires.txt
--- old/os-api-ref-1.5.0/os_api_ref.egg-info/requires.txt 2018-01-18
15:23:16.000000000 +0100
+++ new/os-api-ref-1.6.0/os_api_ref.egg-info/requires.txt 2018-12-12
11:55:31.000000000 +0100
@@ -1,5 +1,5 @@
pbr!=2.1.0,>=2.0.0
-PyYAML>=3.10
+PyYAML>=3.12
six>=1.10.0
-sphinx!=1.6.6,>=1.6.2
-openstackdocstheme>=1.17.0
+sphinx!=1.6.6,!=1.6.7,>=1.6.2
+openstackdocstheme>=1.18.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/requirements.txt
new/os-api-ref-1.6.0/requirements.txt
--- old/os-api-ref-1.5.0/requirements.txt 2018-01-18 15:20:56.000000000
+0100
+++ new/os-api-ref-1.6.0/requirements.txt 2018-12-12 11:53:22.000000000
+0100
@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-PyYAML>=3.10 # MIT
+PyYAML>=3.12 # MIT
six>=1.10.0 # MIT
-sphinx!=1.6.6,>=1.6.2 # BSD
-openstackdocstheme>=1.17.0 # Apache-2.0
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+openstackdocstheme>=1.18.1 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/setup.cfg
new/os-api-ref-1.6.0/setup.cfg
--- old/os-api-ref-1.5.0/setup.cfg 2018-01-18 15:23:17.000000000 +0100
+++ new/os-api-ref-1.6.0/setup.cfg 2018-12-12 11:55:31.000000000 +0100
@@ -4,7 +4,7 @@
description-file =
README.rst
author = OpenStack
-author-email = [email protected]
+author-email = [email protected]
home-page = https://docs.openstack.org/os-api-ref/latest/
classifier =
Environment :: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/test-requirements.txt
new/os-api-ref-1.6.0/test-requirements.txt
--- old/os-api-ref-1.5.0/test-requirements.txt 2018-01-18 15:20:43.000000000
+0100
+++ new/os-api-ref-1.6.0/test-requirements.txt 2018-12-12 11:53:22.000000000
+0100
@@ -6,8 +6,8 @@
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
-oslosphinx>=4.7.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
sphinx-testing>=0.7.2 # BSD License
beautifulsoup4>=4.6.0 # MIT
+stestr>=2.0.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/os-api-ref-1.5.0/tox.ini new/os-api-ref-1.6.0/tox.ini
--- old/os-api-ref-1.5.0/tox.ini 2018-01-18 15:20:43.000000000 +0100
+++ new/os-api-ref-1.6.0/tox.ini 2018-12-12 11:53:22.000000000 +0100
@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
-envlist = py27,pep8,docs
+envlist = py27,py35,pep8,docs
skipsdist = True
[testenv]
@@ -11,26 +11,33 @@
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-commands = python setup.py test --slowest --no-parallel
--testr-args='{posargs}'
+commands = stestr run {posargs}
[testenv:pep8]
+basepython = python3
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:cover]
+basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
-commands = python setup.py build_sphinx
+basepython = python3
+deps =
+
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/doc/requirements.txt
+commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
+basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
-
show-source = True
ignore = E123,E125,E129
builtins = _