diff --git a/0001-Add-support-for-Sphinx-2.0.patch b/0001-Add-support-for-Sphinx-2.0.patch deleted file mode 100644 index 794f1a3..0000000 --- a/0001-Add-support-for-Sphinx-2.0.patch +++ /dev/null @@ -1,215 +0,0 @@ -From 525eee5a72ac0b0dc84d22336f061e3776e26c62 Mon Sep 17 00:00:00 2001 -From: Stephen Finucane -Date: Thu, 25 Apr 2019 17:23:43 +0100 -Subject: [PATCH] Add support for Sphinx 2.0 - -Sphinx 2.0 switched the default HTML builder from HTML4 to HTML5 [1]. -Since some of our tests are validating raw HTML output, this has caused -them to break. We can't drop support for Sphinx < 2.0 yet since Sphinx -2.0 doesn't support Python 2.7, so simply if-else this mofo until such a -time as we _can_ drop support. - -[1] https://github.com/sphinx-doc/sphinx/issues/4587 - -Change-Id: I4631169908e34fa924f5a0a783a94ad9c1215d9f -Signed-off-by: Stephen Finucane ---- - os_api_ref/tests/test_basic_example.py | 91 +++++++++++++++++++++++++- - os_api_ref/tests/test_microversions.py | 45 ++++++++++++- - 2 files changed, 132 insertions(+), 4 deletions(-) - -diff --git a/os_api_ref/tests/test_basic_example.py b/os_api_ref/tests/test_basic_example.py -index dc89bae..20a4fad 100644 ---- a/os_api_ref/tests/test_basic_example.py -+++ b/os_api_ref/tests/test_basic_example.py -@@ -91,7 +91,33 @@ class TestBasicExample(base.TestCase): - def test_parameters(self): - """Do we get some parameters table""" - -- table = """ -+ # TODO(stephenfin): Drop support for this once we drop support for both -+ # Python 2.7 and Sphinx < 2.0, likely in "U" -+ if sphinx.version_info >= (2, 0, 0): -+ table = """
-+-+-+-+-+-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+

Name

In

Type

Description

name

body

string

The name of things

""" -+ else: -+ table = """ - - - -@@ -118,7 +144,65 @@ class TestBasicExample(base.TestCase): - - def test_rest_response(self): - -- success_table = """table border="1" class="docutils"> -+ # TODO(stephenfin): Drop support for this once we drop support for both -+ # Python 2.7 and Sphinx < 2.0, likely in "U" -+ if sphinx.version_info >= (2, 0, 0): -+ success_table = """
-+-+-+-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+

Code

Reason

200 - OK

Request was successful.

100 - Continue

An unusual code for an API

201 - Created

Resource was created and is ready to use.

""" -+ -+ error_table = """ -+-+-+-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+

Code

Reason

405 - Method Not Allowed

Method is not valid for this endpoint.

403 - Forbidden

Policy does not allow current user to do this operation.

401 - Unauthorized

User must authenticate before making a request

400 - Bad Request

Some content in the request was invalid

500 - Internal Server Error

Something went wrong inside the service.

409 - Conflict

There is already a zone with this name.

""" -+ else: -+ success_table = """table border="1" class="docutils"> - - - -@@ -142,7 +226,7 @@ class TestBasicExample(base.TestCase): - - """ - -- error_table = """ -+ error_table = """
- - - -@@ -174,5 +258,6 @@ class TestBasicExample(base.TestCase): - -
- """ -+ - self.assertIn(success_table, self.content) - self.assertIn(error_table, self.content) -diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py -index d58f673..11f3636 100644 ---- a/os_api_ref/tests/test_microversions.py -+++ b/os_api_ref/tests/test_microversions.py -@@ -18,6 +18,7 @@ Tests for `os_api_ref` module. - """ - - from bs4 import BeautifulSoup -+import sphinx - from sphinx_testing import with_app - - from os_api_ref.tests import base -@@ -55,7 +56,48 @@ class TestMicroversions(base.TestCase): - - def test_parameters_table(self): - """Test that min / max mv css class attributes are set in params""" -- table = """
-+ if sphinx.version_info >= (2, 0, 0): -+ table = """
-+ -+-+-+-+-+-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+

Name

In

Type

Description

name

body

string

The name of things

name2

body

string

The name of things

-+

New in version 2.11

-+

name3

body

string

The name of things

-+

Available until version 2.20

-+
-+
-+""" # noqa -+ else: -+ table = """
- - - -@@ -94,6 +136,7 @@ class TestMicroversions(base.TestCase): -
-
- """ # noqa -+ - self.assertIn(table, self.content) - - def test_mv_selector(self): --- -2.21.0 - diff --git a/0001-Add-support-for-Sphinx-v2.1.patch b/0001-Add-support-for-Sphinx-v2.1.patch deleted file mode 100644 index a408cf7..0000000 --- a/0001-Add-support-for-Sphinx-v2.1.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 2a3f53494df93d4fe0e67055f95fc3e33cf7e8f4 Mon Sep 17 00:00:00 2001 -From: Stephen Finucane -Date: Mon, 24 Jun 2019 16:07:20 +0100 -Subject: [PATCH] Add support for Sphinx v2.1 - -Come a new Sphinx version, come new breakages. This one is because of -commit 107c20a11f [1], which changed the default centering style of -tables. - -[1] https://github.com/sphinx-doc/sphinx/commit/107c20a11f - -Change-Id: I1155300828ad0012bd80b7615a0baca121c5e72e -Signed-off-by: Stephen Finucane ---- - os_api_ref/tests/test_basic_example.py | 15 +++++++++------ - os_api_ref/tests/test_microversions.py | 4 ++-- - 2 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/os_api_ref/tests/test_basic_example.py b/os_api_ref/tests/test_basic_example.py -index 20a4fad..dcfb7d7 100644 ---- a/os_api_ref/tests/test_basic_example.py -+++ b/os_api_ref/tests/test_basic_example.py -@@ -94,7 +94,7 @@ class TestBasicExample(base.TestCase): - # TODO(stephenfin): Drop support for this once we drop support for both - # Python 2.7 and Sphinx < 2.0, likely in "U" - if sphinx.version_info >= (2, 0, 0): -- table = """ -+ table = """
- - - -@@ -115,7 +115,8 @@ class TestBasicExample(base.TestCase): - - - --

The name of things

""" -+""".format('center' if sphinx.version_info < (2, 1, 0) -+ else 'default') - else: - table = """ - -@@ -147,7 +148,7 @@ class TestBasicExample(base.TestCase): - # TODO(stephenfin): Drop support for this once we drop support for both - # Python 2.7 and Sphinx < 2.0, likely in "U" - if sphinx.version_info >= (2, 0, 0): -- success_table = """
-+ success_table = """
- - - -@@ -168,9 +169,10 @@ class TestBasicExample(base.TestCase): - - - --

Resource was created and is ready to use.

""" -+""".format('center' if sphinx.version_info < (2, 1, 0) -+ else 'default') - -- error_table = """ -+ error_table = """
- - - -@@ -200,7 +202,8 @@ class TestBasicExample(base.TestCase): - - - --

There is already a zone with this name.

""" -+""".format('center' if sphinx.version_info < (2, 1, 0) -+ else 'default') - else: - success_table = """table border="1" class="docutils"> - -diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py -index 11f3636..9aa4bf2 100644 ---- a/os_api_ref/tests/test_microversions.py -+++ b/os_api_ref/tests/test_microversions.py -@@ -58,7 +58,7 @@ class TestMicroversions(base.TestCase): - """Test that min / max mv css class attributes are set in params""" - if sphinx.version_info >= (2, 0, 0): - table = """
-- -+
- - - -@@ -95,7 +95,7 @@ class TestMicroversions(base.TestCase): - -
-
--""" # noqa -+""".format('center' if sphinx.version_info < (2, 1, 0) else 'default') # noqa - else: - table = """
- --- -2.22.0 - diff --git a/0001-Fix-microversion-test-handle-different-HTML-renderin.patch b/0001-Fix-microversion-test-handle-different-HTML-renderin.patch deleted file mode 100644 index f76f274..0000000 --- a/0001-Fix-microversion-test-handle-different-HTML-renderin.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 4e56d09dafaa7e2b2dc9fd2cd1864ffe6c39e219 Mon Sep 17 00:00:00 2001 -From: Luigi Toscano -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( -- '
', -- str(content[0])) -+ self.assertRegexpMatches( -+ str(content[0]), -+ '^
', -- str(content[0])) -+ self.assertRegexpMatches( -+ str(content[0]), -+ '^
- https://raw.githubusercontent.com/openstack/rpm-packaging/stable/stein/openstack/os-api-ref/os-api-ref.spec.j2 + https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/os-api-ref/os-api-ref.spec.j2 python-os-api-ref.spec https://raw.githubusercontent.com/openstack/os-api-ref/master/requirements.txt cloud-devel@suse.de diff --git a/os-api-ref-1.6.0.tar.gz b/os-api-ref-1.6.0.tar.gz deleted file mode 100644 index 1944219..0000000 --- a/os-api-ref-1.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8101b2e3fe4fff65c324f4ea26c2d54a3c740e42636c6cfde3b66b030276cbbe -size 88779 diff --git a/os-api-ref-1.6.2.tar.gz b/os-api-ref-1.6.2.tar.gz new file mode 100644 index 0000000..a1be1d9 --- /dev/null +++ b/os-api-ref-1.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecf5e35aeba4c474cacd27d9dd8c44345bbe5c0362ffa90b0f1a8d94a3a4c8c8 +size 91367 diff --git a/python-os-api-ref.changes b/python-os-api-ref.changes index b34d771..02e2ee9 100644 --- a/python-os-api-ref.changes +++ b/python-os-api-ref.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Oct 9 12:49:38 UTC 2019 - cloud-devel@suse.de + +- removed 0001-Add-support-for-Sphinx-2.0.patch +- removed 0001-Fix-microversion-test-handle-different-HTML-renderin.patch +- removed 0001-Add-support-for-Sphinx-v2.1.patch +- update to version 1.6.2 + - Add support for Sphinx 2.0 + - Update hacking version + - Generate stable targets rather than random + - Update Testing for Train + - Add support for Sphinx v2.1 + - Add Python 3 Train unit tests + - Remove support for py34 + - Replace git.openstack.org URLs with opendev.org URLs + - Fix microversion test: handle different HTML renderings + - trivial: Remove unused attribute + - OpenDev Migration Patch + ------------------------------------------------------------------- Mon Jul 8 06:29:32 UTC 2019 - cloud-devel@suse.de diff --git a/python-os-api-ref.spec b/python-os-api-ref.spec index 70da685..bc8f89f 100644 --- a/python-os-api-ref.spec +++ b/python-os-api-ref.spec @@ -17,17 +17,13 @@ Name: python-os-api-ref -Version: 1.6.0 +Version: 1.6.2 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/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 -Patch2: 0001-Add-support-for-Sphinx-2.0.patch -Patch3: 0001-Add-support-for-Sphinx-v2.1.patch +Source0: https://files.pythonhosted.org/packages/source/o/os-api-ref/os-api-ref-1.6.2.tar.gz BuildRequires: openstack-macros BuildRequires: python2-PyYAML >= 3.12 BuildRequires: python2-Sphinx @@ -35,9 +31,9 @@ BuildRequires: python2-beautifulsoup4 BuildRequires: python2-openstackdocstheme >= 1.18.1 BuildRequires: python2-pbr >= 2.0.0 BuildRequires: python2-python-subunit +BuildRequires: python2-six >= 1.10.0 BuildRequires: python2-sphinx-testing BuildRequires: python2-stestr -BuildRequires: python2-testrepository BuildRequires: python2-testtools BuildRequires: python3-PyYAML >= 3.12 BuildRequires: python3-Sphinx @@ -45,14 +41,15 @@ BuildRequires: python3-beautifulsoup4 BuildRequires: python3-openstackdocstheme >= 1.18.1 BuildRequires: python3-pbr >= 2.0.0 BuildRequires: python3-python-subunit +BuildRequires: python3-six >= 1.10.0 BuildRequires: python3-sphinx-testing BuildRequires: python3-stestr -BuildRequires: python3-testrepository BuildRequires: python3-testtools Requires: python-PyYAML >= 3.12 Requires: python-Sphinx Requires: python-openstackdocstheme >= 1.18.1 Requires: python-pbr >= 2.0.0 +Requires: python-six >= 1.10.0 BuildArch: noarch %python_subpackages @@ -69,7 +66,7 @@ of collapsing sections for REST methods and javascript controls to expand / collapse all sections. %prep -%autosetup -p1 -n os-api-ref-1.6.0 +%autosetup -p1 -n os-api-ref-1.6.2 %py_req_cleanup %build