Hello community, here is the log from the commit of package python-oslotest for openSUSE:Factory checked in at 2016-09-30 15:30:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslotest (Old) and /work/SRC/openSUSE:Factory/.python-oslotest.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslotest" Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslotest/python-oslotest.changes 2016-09-01 14:02:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-oslotest.new/python-oslotest.changes 2016-09-30 15:30:53.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Aug 30 16:15:25 UTC 2016 - [email protected] + +- update to version 2.10.0 + * A DisableModules fixture that removes modules from path + * Updated from global requirements + +------------------------------------------------------------------- Old: ---- oslotest-2.8.0.tar.gz New: ---- oslotest-2.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslotest.spec ++++++ --- /var/tmp/diff_new_pack.MNBLzy/_old 2016-09-30 15:30:54.000000000 +0200 +++ /var/tmp/diff_new_pack.MNBLzy/_new 2016-09-30 15:30:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-oslotest -Version: 2.8.0 +Version: 2.10.0 Release: 0 Summary: OpenStack test framework License: Apache-2.0 @@ -27,8 +27,8 @@ BuildRequires: openstack-macros BuildRequires: python-debtcollector >= 1.2.0 BuildRequires: python-devel -BuildRequires: python-fixtures >= 1.3.1 -BuildRequires: python-mock >= 1.2 +BuildRequires: python-fixtures >= 3.0.0 +BuildRequires: python-mock >= 2.0 BuildRequires: python-mox3 >= 0.7.0 BuildRequires: python-pbr >= 1.6 BuildRequires: python-python-subunit >= 0.0.18 @@ -36,10 +36,11 @@ BuildRequires: python-testrepository >= 0.0.18 BuildRequires: python-testscenarios >= 0.4 BuildRequires: python-testtools >= 1.4.0 -Requires: python-fixtures >= 1.3.1 -Requires: python-mock >= 1.2 +Requires: python-fixtures >= 3.0.0 +Requires: python-mock >= 2.0 Requires: python-mox3 >= 0.7.0 -Requires: python-os-client-config >= 1.13.1 +# NOTE: python-os-client-config is only needed for functional testing +#Requires: python-os-client-config >= 1.13.1 Requires: python-python-subunit >= 0.0.18 Requires: python-six >= 1.9.0 Requires: python-testrepository >= 0.0.18 ++++++ oslotest-2.8.0.tar.gz -> oslotest-2.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/AUTHORS new/oslotest-2.10.0/AUTHORS --- old/oslotest-2.8.0/AUTHORS 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/AUTHORS 2016-08-25 14:02:57.000000000 +0200 @@ -18,6 +18,7 @@ Ihar Hrachyshka <[email protected]> Ilya Pekelny <[email protected]> James Carey <[email protected]> +Jamie Lennox <[email protected]> Jason Kölker <[email protected]> Jay Pipes <[email protected]> Jeremy Stanley <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/ChangeLog new/oslotest-2.10.0/ChangeLog --- old/oslotest-2.8.0/ChangeLog 2016-08-02 20:21:08.000000000 +0200 +++ new/oslotest-2.10.0/ChangeLog 2016-08-25 14:02:57.000000000 +0200 @@ -1,6 +1,16 @@ CHANGES ======= +2.10.0 +------ + +* Updated from global requirements + +2.9.0 +----- + +* Updated from global requirements + 2.8.0 ----- @@ -8,6 +18,7 @@ * Fix parameters of assertEqual are misplaced * Updated from global requirements * Add Python 3.5 classifier and venv +* A DisableModules fixture that removes modules from path 2.7.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/PKG-INFO new/oslotest-2.10.0/PKG-INFO --- old/oslotest-2.8.0/PKG-INFO 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/PKG-INFO 2016-08-25 14:02:57.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslotest -Version: 2.8.0 +Version: 2.10.0 Summary: Oslo test framework Home-page: http://wiki.openstack.org/wiki/Oslo#oslotest Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest/modules.py new/oslotest-2.10.0/oslotest/modules.py --- old/oslotest-2.8.0/oslotest/modules.py 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-2.10.0/oslotest/modules.py 2016-08-25 14:01:26.000000000 +0200 @@ -0,0 +1,50 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import sys + +import fixtures + + +class DisableModuleFixture(fixtures.Fixture): + """A fixture to provide support for unloading/disabling modules.""" + + def __init__(self, module, *args, **kwargs): + super(DisableModuleFixture, self).__init__(*args, **kwargs) + self.module = module + + def setUp(self): + """Ensure ImportError for the specified module.""" + super(DisableModuleFixture, self).setUp() + + cleared_modules = {} + + for name in list(sys.modules.keys()): + if name == self.module or name.startswith(self.module + '.'): + cleared_modules[name] = sys.modules.pop(name) + + finder = _NoModuleFinder(self.module) + sys.meta_path.insert(0, finder) + + self.addCleanup(sys.meta_path.remove, finder) + self.addCleanup(sys.modules.update, cleared_modules) + + +class _NoModuleFinder(object): + """Disallow further imports of 'module'.""" + + def __init__(self, module): + self.module = module + + def find_module(self, fullname, path): + if fullname == self.module or fullname.startswith(self.module + '.'): + raise ImportError diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest/tests/unit/test_modules.py new/oslotest-2.10.0/oslotest/tests/unit/test_modules.py --- old/oslotest-2.8.0/oslotest/tests/unit/test_modules.py 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-2.10.0/oslotest/tests/unit/test_modules.py 2016-08-25 14:01:26.000000000 +0200 @@ -0,0 +1,28 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from oslotest import base +from oslotest import modules + + +class CreateDisableModuleTest(base.BaseTestCase): + + def test_disable_module(self): + + s = __import__('sys') + self.assertTrue(s) + + with modules.DisableModuleFixture('sys'): + self.assertRaises(ImportError, __import__, 'sys') + + s = __import__('sys') + self.assertTrue(s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest.egg-info/PKG-INFO new/oslotest-2.10.0/oslotest.egg-info/PKG-INFO --- old/oslotest-2.8.0/oslotest.egg-info/PKG-INFO 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/oslotest.egg-info/PKG-INFO 2016-08-25 14:02:57.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslotest -Version: 2.8.0 +Version: 2.10.0 Summary: Oslo test framework Home-page: http://wiki.openstack.org/wiki/Oslo#oslotest Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest.egg-info/SOURCES.txt new/oslotest-2.10.0/oslotest.egg-info/SOURCES.txt --- old/oslotest-2.8.0/oslotest.egg-info/SOURCES.txt 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/oslotest.egg-info/SOURCES.txt 2016-08-25 14:02:57.000000000 +0200 @@ -28,6 +28,7 @@ oslotest/functional.py oslotest/log.py oslotest/mockpatch.py +oslotest/modules.py oslotest/moxstubout.py oslotest/output.py oslotest/timeout.py @@ -44,6 +45,7 @@ oslotest/tests/unit/test_createfile.py oslotest/tests/unit/test_log.py oslotest/tests/unit/test_mockpatch.py +oslotest/tests/unit/test_modules.py oslotest/tests/unit/test_moxstubout.py oslotest/tests/unit/test_output.py oslotest/tests/unit/test_timeout.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest.egg-info/pbr.json new/oslotest-2.10.0/oslotest.egg-info/pbr.json --- old/oslotest-2.8.0/oslotest.egg-info/pbr.json 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/oslotest.egg-info/pbr.json 2016-08-25 14:02:57.000000000 +0200 @@ -1 +1 @@ -{"is_release": true, "git_version": "425d465"} \ No newline at end of file +{"git_version": "0fad885", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/oslotest.egg-info/requires.txt new/oslotest-2.10.0/oslotest.egg-info/requires.txt --- old/oslotest-2.8.0/oslotest.egg-info/requires.txt 2016-08-02 20:21:09.000000000 +0200 +++ new/oslotest-2.10.0/oslotest.egg-info/requires.txt 2016-08-25 14:02:57.000000000 +0200 @@ -6,5 +6,5 @@ testtools>=1.4.0 mock>=2.0 mox3>=0.7.0 -os-client-config>=1.13.1 +os-client-config!=1.19.0,!=1.19.1,!=1.20.0,>=1.13.1 debtcollector>=1.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/requirements.txt new/oslotest-2.10.0/requirements.txt --- old/oslotest-2.8.0/requirements.txt 2016-08-02 20:18:37.000000000 +0200 +++ new/oslotest-2.10.0/requirements.txt 2016-08-25 14:01:27.000000000 +0200 @@ -10,5 +10,5 @@ testtools>=1.4.0 # MIT mock>=2.0 # BSD mox3>=0.7.0 # Apache-2.0 -os-client-config>=1.13.1 # Apache-2.0 +os-client-config!=1.19.0,!=1.19.1,!=1.20.0,>=1.13.1 # Apache-2.0 debtcollector>=1.2.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.8.0/test-requirements.txt new/oslotest-2.10.0/test-requirements.txt --- old/oslotest-2.8.0/test-requirements.txt 2016-08-02 20:18:37.000000000 +0200 +++ new/oslotest-2.10.0/test-requirements.txt 2016-08-25 14:01:26.000000000 +0200 @@ -12,4 +12,4 @@ # this is required for the docs build jobs sphinx!=1.3b1,<1.3,>=1.2.1 # BSD oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 -oslo.config>=3.12.0 # Apache-2.0 +oslo.config>=3.14.0 # Apache-2.0
