Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-os-api-ref for openSUSE:Factory checked in at 2022-10-06 07:41:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-os-api-ref (Old) and /work/SRC/openSUSE:Factory/.python-os-api-ref.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-os-api-ref" Thu Oct 6 07:41:20 2022 rev:15 rq:1007958 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-os-api-ref/python-os-api-ref.changes 2022-05-13 23:03:49.671159326 +0200 +++ /work/SRC/openSUSE:Factory/.python-os-api-ref.new.2275/python-os-api-ref.changes 2022-10-06 07:41:28.632590211 +0200 @@ -1,0 +2,5 @@ +Tue Oct 4 15:02:18 UTC 2022 - cloud-de...@suse.de + +- added 0001-Remove-deprecated-sphinx-testing-dependency.patch + +------------------------------------------------------------------- New: ---- 0001-Remove-deprecated-sphinx-testing-dependency.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-os-api-ref.spec ++++++ --- /var/tmp/diff_new_pack.eCTW6i/_old 2022-10-06 07:41:29.116591288 +0200 +++ /var/tmp/diff_new_pack.eCTW6i/_new 2022-10-06 07:41:29.120591297 +0200 @@ -24,6 +24,8 @@ Group: Development/Languages/Python URL: https://docs.openstack.org/os-api-ref Source0: https://files.pythonhosted.org/packages/source/o/os-api-ref/os-api-ref-2.3.0.tar.gz +# https://review.opendev.org/c/openstack/os-api-ref/+/860080 +Patch0: 0001-Remove-deprecated-sphinx-testing-dependency.patch BuildRequires: openstack-macros BuildRequires: python3-PyYAML >= 3.12 BuildRequires: python3-Sphinx @@ -31,8 +33,6 @@ BuildRequires: python3-openstackdocstheme >= 2.2.1 BuildRequires: python3-pbr >= 2.0.0 BuildRequires: python3-python-subunit -BuildRequires: python3-six -BuildRequires: python3-sphinx-testing BuildRequires: python3-stestr BuildRequires: python3-testtools BuildArch: noarch @@ -55,7 +55,6 @@ Requires: python3-Sphinx Requires: python3-openstackdocstheme >= 2.2.1 Requires: python3-pbr >= 2.0.0 -Requires: python3-six %description -n python3-os-api-ref This project is a collection of sphinx stanzas that assist in building an API ++++++ 0001-Remove-deprecated-sphinx-testing-dependency.patch ++++++ >From 06cd5abff4a05929178fb79fd7c9f09705640b13 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno <daniel.gar...@suse.com> Date: Mon, 3 Oct 2022 12:08:38 +0200 Subject: [PATCH] Remove deprecated sphinx-testing dependency This patch replaces the sphinx-testing package using the SphinxTestApp provided by the Sphinx package. The sphinx-testing package is deprecated and should be replaced with the sphinx.testing package that's bundled with Sphinx. Change-Id: I60b4d1a8b83dc35c394e29d746a2fbb3ff744c1a --- os_api_ref/tests/base.py | 27 ++++++++++++++++++++++++++ os_api_ref/tests/test_basic_example.py | 16 +-------------- os_api_ref/tests/test_microversions.py | 5 ++--- os_api_ref/tests/test_warnings.py | 4 +--- test-requirements.txt | 1 - 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/os_api_ref/tests/base.py b/os_api_ref/tests/base.py index 730258f..6e5e0dc 100644 --- a/os_api_ref/tests/base.py +++ b/os_api_ref/tests/base.py @@ -16,8 +16,12 @@ import os import fixtures +import tempfile import testtools +from sphinx.testing.path import path +from sphinx.testing.util import SphinxTestApp + def example_dir(name=""): return os.path.join(os.path.dirname(__file__), 'examples', name) @@ -26,6 +30,29 @@ def example_dir(name=""): _TRUE_VALUES = ('True', 'true', '1', 'yes') +class with_app: + def __init__(self, **kwargs): + if 'srcdir' in kwargs: + self.srcdir = path(kwargs['srcdir']) + self.sphinx_app_args = kwargs + + def __call__(self, f): + def newf(*args, **kwargs): + with tempfile.TemporaryDirectory() as tmpdirname: + tmpdir = path(tmpdirname) + tmproot = tmpdir / self.srcdir.basename() + self.srcdir.copytree(tmproot) + self.sphinx_app_args['srcdir'] = tmproot + self.builddir = tmproot.joinpath('_build') + + app = SphinxTestApp(freshenv=True, **self.sphinx_app_args) + + f(*args, app, app._status, app._warning, **kwargs) + + app.cleanup() + return newf + + class OutputStreamCapture(fixtures.Fixture): """Capture output streams during tests. diff --git a/os_api_ref/tests/test_basic_example.py b/os_api_ref/tests/test_basic_example.py index 4a82a6a..83e2892 100644 --- a/os_api_ref/tests/test_basic_example.py +++ b/os_api_ref/tests/test_basic_example.py @@ -18,23 +18,10 @@ 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 -# 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 -sphinx.application.abspath = lambda x: x - - class TestBasicExample(base.TestCase): """Test basic rendering. @@ -42,8 +29,7 @@ class TestBasicExample(base.TestCase): examples, so if someone breaks something we know. """ - @with_app(buildername='html', srcdir=base.example_dir('basic'), - copy_srcdir_to_tmpdir=True) + @base.with_app(buildername='html', srcdir=base.example_dir('basic')) def setUp(self, app, status, warning): super(TestBasicExample, self).setUp() self.app = app diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py index 7da8c2f..8281442 100644 --- a/os_api_ref/tests/test_microversions.py +++ b/os_api_ref/tests/test_microversions.py @@ -18,7 +18,6 @@ Tests for `os_api_ref` module. """ from bs4 import BeautifulSoup -from sphinx_testing import with_app from os_api_ref.tests import base @@ -30,8 +29,8 @@ class TestMicroversions(base.TestCase): examples, so if someone breaks something we know. """ - @with_app(buildername='html', srcdir=base.example_dir('microversions'), - copy_srcdir_to_tmpdir=True) + @base.with_app(buildername='html', + srcdir=base.example_dir('microversions')) def setUp(self, app, status, warning): super(TestMicroversions, self).setUp() self.app = app diff --git a/os_api_ref/tests/test_warnings.py b/os_api_ref/tests/test_warnings.py index 0a588d2..9fa9fef 100644 --- a/os_api_ref/tests/test_warnings.py +++ b/os_api_ref/tests/test_warnings.py @@ -18,7 +18,6 @@ Tests for `os_api_ref` module. """ from bs4 import BeautifulSoup -from sphinx_testing import with_app from os_api_ref.tests import base @@ -30,8 +29,7 @@ class TestWarnings(base.TestCase): examples, so if someone breaks something we know. """ - @with_app(buildername='html', srcdir=base.example_dir('warnings'), - copy_srcdir_to_tmpdir=True) + @base.with_app(buildername='html', srcdir=base.example_dir('warnings')) def setUp(self, app, status, warning): super(TestWarnings, self).setUp() self.app = app diff --git a/test-requirements.txt b/test-requirements.txt index d165510..0fd36ef 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,7 +8,6 @@ coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT -sphinx-testing>=1.0.1 # BSD License beautifulsoup4>=4.6.0 # MIT stestr>=2.0.0 # Apache-2.0 pre-commit>=2.6.0 # MIT -- 2.37.3