Hello community, here is the log from the commit of package python-python-subunit for openSUSE:Factory checked in at 2018-08-06 11:54:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-subunit (Old) and /work/SRC/openSUSE:Factory/.python-python-subunit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-subunit" Mon Aug 6 11:54:58 2018 rev:20 rq:627616 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-subunit/python-python-subunit.changes 2017-10-05 11:59:00.654694452 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-subunit.new/python-python-subunit.changes 2018-08-06 11:54:58.629317244 +0200 @@ -1,0 +2,7 @@ +Mon Aug 6 09:21:45 UTC 2018 - tchva...@suse.com + +- Version update to 1.3.0: + * Fix make_stream_binary with FileIO object inputs + * Add a --rename flag to subunit-filter + +------------------------------------------------------------------- Old: ---- python-subunit-1.2.0.tar.gz New: ---- python-subunit-1.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-subunit.spec ++++++ --- /var/tmp/diff_new_pack.N3I3II/_old 2018-08-06 11:54:59.033317946 +0200 +++ /var/tmp/diff_new_pack.N3I3II/_new 2018-08-06 11:54:59.037317953 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-python-subunit # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -18,18 +18,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-python-subunit -Version: 1.2.0 +Version: 1.3.0 Release: 0 Summary: Python implementation of subunit test streaming protocol -License: Apache-2.0 or BSD-3-Clause +License: Apache-2.0 OR BSD-3-Clause Group: Development/Languages/Python -Url: https://launchpad.net/subunit +URL: https://launchpad.net/subunit Source: https://files.pythonhosted.org/packages/source/p/python-subunit/python-subunit-%{version}.tar.gz Source99: %{name}-rpmlintrc # PATCH-FIX-OPENSUSE speili...@suse.com -- Filters are installed in /usr/bin. Patch0: python-subunit-filter-path.patch -BuildRequires: %{python_module devel} BuildRequires: %{python_module fixtures} +BuildRequires: %{python_module setuptools} # Test requriements BuildRequires: %{python_module testscenarios} BuildRequires: %{python_module testtools >= 0.9.34} @@ -37,7 +37,6 @@ BuildRequires: python-rpm-macros Requires: python-extras Requires: python-testtools >= 0.9.34 -BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -64,14 +63,14 @@ %python_install #NOTE(saschpe): The testsuite demands executables: %{python_expand chmod +x %{buildroot}%{$python_sitelib}/subunit/tests/sample-*.py - find %{buildroot}%{$python_sitelib}/subunit/tests/ -type f -name "sample-*.py" -exec sed -i "s|#!/usr/bin/env python|#!%__$python|" {} \; + find %{buildroot}%{$python_sitelib}/subunit/tests/ -type f -name "sample-*.py" -exec sed -i "s|#!%{_bindir}/env python|#!%__$python|" {} \; $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/subunit/tests/ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/subunit/tests/ %fdupes -s %{buildroot}%{$python_sitelib} } for bin in subunit-2to1 subunit2csv subunit-1to2 subunit-filter subunit-ls \ subunit-notify subunit-stats subunit-tags subunit-output subunit2gtk \ - subunit2junitxml subunit2pyunit tap2subunit + subunit2junitxml subunit2pyunit tap2subunit subunit2disk do %python_clone -a %{buildroot}%{_bindir}/$bin done @@ -84,13 +83,12 @@ %post %{python_install_alternative subunit-2to1 subunit2csv subunit-1to2 subunit-filter subunit-ls subunit-notify subunit-stats subunit-tags subunit-output subunit2gtk - subunit2junitxml subunit2pyunit tap2subunit} + subunit2junitxml subunit2pyunit tap2subunit subunit2disk} %postun %python_uninstall_alternative subunit-2to1 %files %{python_files} -%defattr(-,root,root,-) %doc README.rst NEWS %python_alternative %{_bindir}/subunit2csv %python_alternative %{_bindir}/subunit-2to1 @@ -105,6 +103,7 @@ %python_alternative %{_bindir}/subunit2junitxml %python_alternative %{_bindir}/subunit2pyunit %python_alternative %{_bindir}/tap2subunit +%python_alternative %{_bindir}/subunit2disk %{python_sitelib}/subunit %{python_sitelib}/python_subunit-%{version}-py*.egg-info ++++++ python-subunit-1.2.0.tar.gz -> python-subunit-1.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/NEWS new/python-subunit-1.3.0/NEWS --- old/python-subunit-1.2.0/NEWS 2015-10-23 01:21:04.000000000 +0200 +++ new/python-subunit-1.3.0/NEWS 2018-03-04 09:44:18.000000000 +0100 @@ -5,6 +5,27 @@ NEXT (In development) --------------------- +1.3.0 +----- + +IMPROVEMENTS +~~~~~~~~~~~~ + +* Add a --rename flag to subunit-filter. + (Jelmer Vernooij, #1758522) + +BUGFIXES +~~~~~~~~ + +* Fix make_stream_binary with FileIO object inputs. + (Matthew Treinish) + +* Fix v2 run() on windows platforms. + (Claudiu Belu) + +1.2.0 +----- + IMPROVEMENTS ~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/PKG-INFO new/python-subunit-1.3.0/PKG-INFO --- old/python-subunit-1.2.0/PKG-INFO 2015-10-23 02:51:01.000000000 +0200 +++ new/python-subunit-1.3.0/PKG-INFO 2018-04-05 08:33:48.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: python-subunit -Version: 1.2.0 +Version: 1.3.0 Summary: Python implementation of subunit test streaming protocol Home-page: http://launchpad.net/subunit Author: Robert Collins @@ -486,7 +486,7 @@ * Do a PyPI release: PYTHONPATH=../../python python ../../setup.py sdist bdist_wheel upload -s * Upload the regular one to LP. * Push a tagged commit. - + git push -t origin master:master Keywords: python test streaming Platform: UNKNOWN @@ -494,3 +494,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Testing +Provides-Extra: test +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/README.rst new/python-subunit-1.3.0/README.rst --- old/python-subunit-1.2.0/README.rst 2015-10-23 01:15:38.000000000 +0200 +++ new/python-subunit-1.3.0/README.rst 2018-01-24 13:21:13.000000000 +0100 @@ -478,4 +478,4 @@ * Do a PyPI release: PYTHONPATH=../../python python ../../setup.py sdist bdist_wheel upload -s * Upload the regular one to LP. * Push a tagged commit. - + git push -t origin master:master diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/filters/subunit-filter new/python-subunit-1.3.0/filters/subunit-filter --- old/python-subunit-1.2.0/filters/subunit-filter 2013-08-25 11:58:23.000000000 +0200 +++ new/python-subunit-1.3.0/filters/subunit-filter 2018-03-04 09:44:18.000000000 +0100 @@ -69,9 +69,9 @@ parser.add_option("--no-skip", action="store_true", help="exclude skips", dest="skip") parser.add_option("--xfail", action="store_false", - help="include expected falures", default=True, dest="xfail") + help="include expected failures", default=True, dest="xfail") parser.add_option("--no-xfail", action="store_true", - help="exclude expected falures", default=True, dest="xfail") + help="exclude expected failures", default=True, dest="xfail") parser.add_option( "--with-tag", type=str, help="include tests with these tags", action="append", dest="with_tags") @@ -91,6 +91,9 @@ parser.add_option("-F", "--only-genuine-failures", action="callback", callback=only_genuine_failures_callback, help="Only pass through failures and exceptions.") + parser.add_option("--rename", action="append", nargs=2, + help="Apply specified regex subsitutions to test names.", + dest="renames", default=[]) return parser @@ -125,6 +128,14 @@ return check_regexps +def _compile_rename(patterns): + def rename(name): + for (from_pattern, to_pattern) in patterns: + name = re.sub(from_pattern, to_pattern, name) + return name + return rename + + def _make_result(output, options, predicate): """Make the result that we'll send the test outcomes to.""" fixup_expected_failures = set() @@ -139,7 +150,8 @@ filter_skip=options.skip, filter_xfail=options.xfail, filter_predicate=predicate, - fixup_expected_failures=fixup_expected_failures)) + fixup_expected_failures=fixup_expected_failures, + rename=_compile_rename(options.renames))) def main(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/filters/subunit2disk new/python-subunit-1.3.0/filters/subunit2disk --- old/python-subunit-1.2.0/filters/subunit2disk 1970-01-01 01:00:00.000000000 +0100 +++ new/python-subunit-1.3.0/filters/subunit2disk 2015-07-13 05:14:09.000000000 +0200 @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# subunit: extensions to python unittest to get test results from subprocesses. +# Copyright (C) 2013 Subunit Contributors +# +# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause +# license at the users choice. A copy of both licenses are available in the +# project source as Apache-2.0 and BSD. You may not use this file except in +# compliance with one of these two licences. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# license you chose for the specific language governing permissions and +# limitations under that license. + + +"""Export a stream to files and directories on disk.""" + +from subunit._to_disk import to_disk + + +if __name__ == '__main__': + exit(to_disk()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python/subunit/__init__.py new/python-subunit-1.3.0/python/subunit/__init__.py --- old/python-subunit-1.2.0/python/subunit/__init__.py 2015-10-23 01:17:45.000000000 +0200 +++ new/python-subunit-1.3.0/python/subunit/__init__.py 2018-01-24 13:18:05.000000000 +0100 @@ -153,7 +153,7 @@ # If the releaselevel is 'final', then the tarball will be major.minor.micro. # Otherwise it is major.minor.micro~$(revno). -__version__ = (1, 2, 0, 'final', 0) +__version__ = (1, 3, 0, 'final', 0) PROGRESS_SET = 0 PROGRESS_CUR = 1 @@ -1287,15 +1287,17 @@ def _unwrap_text(stream): """Unwrap stream if it is a text stream to get the original buffer.""" + exceptions = (_UnsupportedOperation, IOError) if sys.version_info > (3, 0): unicode_type = str else: unicode_type = unicode + exceptions += (ValueError,) try: # Read streams if type(stream.read(0)) is unicode_type: return stream.buffer - except (_UnsupportedOperation, IOError): + except exceptions: # Cannot read from the stream: try via writes try: stream.write(_b('')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python/subunit/test_results.py new/python-subunit-1.3.0/python/subunit/test_results.py --- old/python-subunit-1.2.0/python/subunit/test_results.py 2015-09-05 04:44:24.000000000 +0200 +++ new/python-subunit-1.3.0/python/subunit/test_results.py 2018-03-04 09:44:18.000000000 +0100 @@ -25,6 +25,7 @@ TracebackContent, ) from testtools import StreamResult +from testtools.testcase import PlaceHolder from subunit import iso8601 import subunit @@ -450,7 +451,8 @@ def __init__(self, result, filter_error=False, filter_failure=False, filter_success=True, filter_skip=False, filter_xfail=False, - filter_predicate=None, fixup_expected_failures=None): + filter_predicate=None, fixup_expected_failures=None, + rename=None): """Create a FilterResult object filtering to result. :param filter_error: Filter out errors. @@ -467,6 +469,7 @@ parameter for efficiency. :param fixup_expected_failures: Set of test ids to consider known failing. + :param rename: Optional function to rename test ids """ predicates = [] if filter_error: @@ -500,8 +503,10 @@ self._fixup_expected_failures = frozenset() else: self._fixup_expected_failures = fixup_expected_failures + self._rename_fn = rename def addError(self, test, err=None, details=None): + test = self._apply_renames(test) if self._failure_expected(test): self.addExpectedFailure(test, err=err, details=details) else: @@ -509,6 +514,7 @@ test, err=err, details=details) def addFailure(self, test, err=None, details=None): + test = self._apply_renames(test) if self._failure_expected(test): self.addExpectedFailure(test, err=err, details=details) else: @@ -516,6 +522,7 @@ test, err=err, details=details) def addSuccess(self, test, details=None): + test = self._apply_renames(test) if self._failure_expected(test): self.addUnexpectedSuccess(test, details=details) else: @@ -524,6 +531,14 @@ def _failure_expected(self, test): return (test.id() in self._fixup_expected_failures) + def _apply_renames(self, test): + if self._rename_fn is None: + return test + new_id = self._rename_fn(test.id()) + # TODO(jelmer): Isn't there a cleaner way of doing this? + setattr(test, "id", lambda: new_id) + return test + class TestIdPrintingResult(testtools.TestResult): """Print test ids to a stream. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python/subunit/tests/test_subunit_filter.py new/python-subunit-1.3.0/python/subunit/tests/test_subunit_filter.py --- old/python-subunit-1.2.0/python/subunit/tests/test_subunit_filter.py 2013-06-16 11:58:35.000000000 +0200 +++ new/python-subunit-1.3.0/python/subunit/tests/test_subunit_filter.py 2018-03-04 09:44:18.000000000 +0100 @@ -280,6 +280,22 @@ ('addSkip', foo, {}), ('stopTest', foo), ], result._events) + def test_renames(self): + def rename(name): + return name + " - renamed" + result = ExtendedTestResult() + result_filter = TestResultFilter( + result, filter_success=False, rename=rename) + input_stream = _b( + "test: foo\n" + "successful: foo\n") + self.run_tests(result_filter, input_stream) + self.assertEquals( + [('startTest', 'foo - renamed'), + ('addSuccess', 'foo - renamed'), + ('stopTest', 'foo - renamed')], + [(ev[0], ev[1].id()) for ev in result._events]) + if sys.version_info < (2, 7): # These tests require Python >=2.7. del test_fixup_expected_failures, test_fixup_expected_errors, test_fixup_unexpected_success diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python/subunit/tests/test_test_protocol.py new/python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py --- old/python-subunit-1.2.0/python/subunit/tests/test_test_protocol.py 2015-07-13 07:55:22.000000000 +0200 +++ new/python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py 2018-01-24 13:06:12.000000000 +0100 @@ -15,8 +15,11 @@ # import datetime +import io import unittest2 as unittest import os +import sys +import tempfile from testtools import PlaceHolder, skipIf, TestCase, TestResult from testtools.compat import _b, _u, BytesIO @@ -52,6 +55,44 @@ return TestResult()._err_details_to_string(None, details=details) +class TestHelpers(TestCase): + def test__unwrap_text_file_read_mode(self): + fd, file_path = tempfile.mkstemp() + self.addCleanup(os.remove, file_path) + fake_file = os.fdopen(fd, 'r') + if sys.version_info > (3, 0): + self.assertEqual(fake_file.buffer, + subunit._unwrap_text(fake_file)) + else: + self.assertEqual(fake_file, subunit._unwrap_text(fake_file)) + + def test__unwrap_text_file_write_mode(self): + fd, file_path = tempfile.mkstemp() + self.addCleanup(os.remove, file_path) + fake_file = os.fdopen(fd, 'w') + if sys.version_info > (3, 0): + self.assertEqual(fake_file.buffer, + subunit._unwrap_text(fake_file)) + else: + self.assertEqual(fake_file, subunit._unwrap_text(fake_file)) + + def test__unwrap_text_fileIO_read_mode(self): + fd, file_path = tempfile.mkstemp() + self.addCleanup(os.remove, file_path) + fake_file = io.FileIO(file_path, 'r') + self.assertEqual(fake_file, subunit._unwrap_text(fake_file)) + + def test__unwrap_text_fileIO_write_mode(self): + fd, file_path = tempfile.mkstemp() + self.addCleanup(os.remove, file_path) + fake_file = io.FileIO(file_path, 'w') + self.assertEqual(fake_file, subunit._unwrap_text(fake_file)) + + def test__unwrap_text_BytesIO(self): + fake_stream = io.BytesIO() + self.assertEqual(fake_stream, subunit._unwrap_text(fake_stream)) + + class TestTestImports(unittest.TestCase): def test_imports(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python/subunit/v2.py new/python-subunit-1.3.0/python/subunit/v2.py --- old/python-subunit-1.2.0/python/subunit/v2.py 2015-10-23 01:09:44.000000000 +0200 +++ new/python-subunit-1.3.0/python/subunit/v2.py 2018-01-24 13:06:12.000000000 +0100 @@ -309,6 +309,11 @@ # annoying). buffered = [content] while len(buffered[-1]): + # Note: Windows does not support passing a file descriptor to + # select.select. fallback to one-byte-at-a-time. + if sys.platform == 'win32': + break + try: self.source.fileno() except: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python_subunit.egg-info/PKG-INFO new/python-subunit-1.3.0/python_subunit.egg-info/PKG-INFO --- old/python-subunit-1.2.0/python_subunit.egg-info/PKG-INFO 2015-10-23 02:51:00.000000000 +0200 +++ new/python-subunit-1.3.0/python_subunit.egg-info/PKG-INFO 2018-04-05 08:33:48.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: python-subunit -Version: 1.2.0 +Version: 1.3.0 Summary: Python implementation of subunit test streaming protocol Home-page: http://launchpad.net/subunit Author: Robert Collins @@ -486,7 +486,7 @@ * Do a PyPI release: PYTHONPATH=../../python python ../../setup.py sdist bdist_wheel upload -s * Upload the regular one to LP. * Push a tagged commit. - + git push -t origin master:master Keywords: python test streaming Platform: UNKNOWN @@ -494,3 +494,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Testing +Provides-Extra: test +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/python_subunit.egg-info/SOURCES.txt new/python-subunit-1.3.0/python_subunit.egg-info/SOURCES.txt --- old/python-subunit-1.2.0/python_subunit.egg-info/SOURCES.txt 2015-10-23 02:51:01.000000000 +0200 +++ new/python-subunit-1.3.0/python_subunit.egg-info/SOURCES.txt 2018-04-05 08:33:48.000000000 +0200 @@ -12,6 +12,7 @@ filters/subunit-stats filters/subunit-tags filters/subunit2csv +filters/subunit2disk filters/subunit2gtk filters/subunit2junitxml filters/subunit2pyunit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/setup.cfg new/python-subunit-1.3.0/setup.cfg --- old/python-subunit-1.2.0/setup.cfg 2015-10-23 02:51:01.000000000 +0200 +++ new/python-subunit-1.3.0/setup.cfg 2018-04-05 08:33:48.000000000 +0200 @@ -2,7 +2,6 @@ universal = 1 [egg_info] -tag_svn_revision = 0 -tag_date = 0 tag_build = +tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-subunit-1.2.0/setup.py new/python-subunit-1.3.0/setup.py --- old/python-subunit-1.2.0/setup.py 2015-10-20 04:10:52.000000000 +0200 +++ new/python-subunit-1.3.0/setup.py 2018-01-24 13:36:18.000000000 +0100 @@ -73,6 +73,7 @@ 'filters/subunit-stats', 'filters/subunit-tags', 'filters/subunit2csv', + 'filters/subunit2disk', 'filters/subunit2gtk', 'filters/subunit2junitxml', 'filters/subunit2pyunit',