Hello community,
here is the log from the commit of package python-os-service-types for
openSUSE:Factory checked in at 2019-01-21 11:13:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-os-service-types (Old)
and /work/SRC/openSUSE:Factory/.python-os-service-types.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-os-service-types"
Mon Jan 21 11:13:43 2019 rev:4 rq:666662 version:1.3.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-os-service-types/python-os-service-types.changes
2018-09-07 15:38:33.990590074 +0200
+++
/work/SRC/openSUSE:Factory/.python-os-service-types.new.28833/python-os-service-types.changes
2019-01-21 11:13:44.278254562 +0100
@@ -1,0 +2,6 @@
+Thu Jan 17 10:57:32 UTC 2019 - Dirk Mueller <[email protected]>
+
+- add 0001-Use-keystoneauth-only-in-applicable-test.patch (bsc#1121608)
+ - avoid build cycle
+
+-------------------------------------------------------------------
New:
----
0001-Use-keystoneauth-only-in-applicable-test.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-os-service-types.spec ++++++
--- /var/tmp/diff_new_pack.cJw20j/_old 2019-01-21 11:13:44.874253819 +0100
+++ /var/tmp/diff_new_pack.cJw20j/_new 2019-01-21 11:13:44.878253814 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-os-service-types
#
-# 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,7 +12,7 @@
# 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/
#
@@ -24,15 +24,15 @@
Group: Development/Languages/Python
URL: https://docs.openstack.org/developer/os-service-types
Source0:
https://files.pythonhosted.org/packages/source/o/os-service-types/os-service-types-%{version}.tar.gz
+# https://review.openstack.org/599979
+Patch0: 0001-Use-keystoneauth-only-in-applicable-test.patch
BuildRequires: openstack-macros
-BuildRequires: python2-keystoneauth1
BuildRequires: python2-oslotest
BuildRequires: python2-pbr >= 2.0.0
BuildRequires: python2-python-subunit
BuildRequires: python2-requests-mock
BuildRequires: python2-stestr
BuildRequires: python2-testscenarios
-BuildRequires: python3-keystoneauth1
BuildRequires: python3-oslotest
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-python-subunit
@@ -70,6 +70,11 @@
%autosetup -p1 -n os-service-types-1.3.0
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
+# The TestRemote test cases must be excluded because they introduce a circular
+# dependency on python-keystoneauth1.
+# Using --black-regex with stestr is not enough because the problem occurs when
+# keystoneauth is imported, not when the test is run.
+rm os_service_types/tests/test_remote.py
%build
%{python_build}
++++++ 0001-Use-keystoneauth-only-in-applicable-test.patch ++++++
>From 93729fcfcf6a02a4462516d2954940e9f9bf4e51 Mon Sep 17 00:00:00 2001
From: Colleen Murphy <[email protected]>
Date: Wed, 5 Sep 2018 11:25:11 +0200
Subject: [PATCH] Use keystoneauth only in applicable test
keystoneauth uses os-service-types as a run time dependency.
os-service-types uses keystoneauth as a testing dependency. This causes
an issue for packagers: in order to run the unit tests at build time,
an os-service-types package must include keystoneauth as a build
dependency, but since keystoneauth includes os-service-types as a run
time dependency, it causes a circular dependency.
To make it easier on packagers, this patch changes the usage of
keystoneauth in the tests to only be used by the TestRemote class
instead of the base TestCase class. This way, a packager could avoid
including keystoneauth as a build dependency by choosing to skip just
the problematic os-service-types test instead of skipping the entire
test suite.
Change-Id: I7f8da9c09f20ae808e1dc7aef2341396d91e7cf4
---
os_service_types/tests/base.py | 4 ----
os_service_types/tests/test_remote.py | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/os_service_types/tests/base.py b/os_service_types/tests/base.py
index 731d152..38f0444 100644
--- a/os_service_types/tests/base.py
+++ b/os_service_types/tests/base.py
@@ -18,7 +18,6 @@
import copy
import datetime
-import keystoneauth1.session
from oslotest import base
import os_service_types.service_types
@@ -30,9 +29,6 @@ class TestCase(base.BaseTestCase):
def setUp(self):
super(TestCase, self).setUp()
- # use keystoneauth1 to get a Sessiom with no auth information
- self.session = keystoneauth1.session.Session()
-
self.builtin_content = os_service_types.service_types.BUILTIN_DATA
self.builtin_version = self.builtin_content['version']
diff --git a/os_service_types/tests/test_remote.py
b/os_service_types/tests/test_remote.py
index 2a1e8e5..bf3d714 100644
--- a/os_service_types/tests/test_remote.py
+++ b/os_service_types/tests/test_remote.py
@@ -24,6 +24,8 @@ available in these tests.
from requests_mock.contrib import fixture as rm_fixture
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
+import keystoneauth1.session
+
import os_service_types
import os_service_types.service_types
from os_service_types.tests import base
@@ -39,6 +41,8 @@ class TestRemote(base.TestCase, base.ServiceDataMixin):
'GET', os_service_types.service_types.SERVICE_TYPES_URL,
json=self.remote_content,
headers={'etag': self.getUniqueString('etag')})
+ # use keystoneauth1 to get a Sessiom with no auth information
+ self.session = keystoneauth1.session.Session()
# Make an object that fetches from the network
self.service_types = os_service_types.ServiceTypes(
session=self.session)
--
2.18.0