Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-combi for openSUSE:Factory checked in at 2021-09-16 23:15:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-combi (Old) and /work/SRC/openSUSE:Factory/.python-combi.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-combi" Thu Sep 16 23:15:04 2021 rev:2 rq:919557 version:1.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-combi/python-combi.changes 2018-06-02 12:05:36.190393015 +0200 +++ /work/SRC/openSUSE:Factory/.python-combi.new.1899/python-combi.changes 2021-09-16 23:17:53.979998805 +0200 @@ -1,0 +2,10 @@ +Thu Sep 16 17:07:42 UTC 2021 - Matej Cepl <[email protected]> + +- Add denose.patch (and denose-clear-trailing-space.patch which just + removes trailing whitespace) to remove dependency on nose. + gh#cool-RR/combi#5 +- Package was effectively killed upstream + https://github.com/cool-RR/combi/commit/0142389599a394298299bed7e95c689b3790a457, + so we will probably remove it as well. + +------------------------------------------------------------------- New: ---- denose-clear-trailing-space.patch denose.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-combi.spec ++++++ --- /var/tmp/diff_new_pack.PQIILL/_old 2021-09-16 23:17:54.427999269 +0200 +++ /var/tmp/diff_new_pack.PQIILL/_new 2021-09-16 23:17:54.427999269 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-combi # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,27 +12,32 @@ # 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/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-combi Version: 1.1.2 Release: 0 Summary: A Pythonic package for combinatorics License: MIT Group: Development/Languages/Python -Url: https://pypi.python.org/pypi/combi/ +URL: https://pypi.python.org/pypi/combi/ Source: https://files.pythonhosted.org/packages/source/c/combi/combi-%{version}.tar.gz +# PATCH-FIX-UPSTREAM denose.patch gh#cool-RR/combi#5 [email protected] +# Remove dependency on nose, use pytest instead +Patch0: denose-clear-trailing-space.patch +Patch1: denose.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros # SECTION test requirements -BuildRequires: %{python_module nose >= 1.0.0} +BuildRequires: %{python_module pytest} # /SECTION -Recommends: python-nose >= 1.0.0 +Recommends: python-pytest BuildArch: noarch %python_subpackages @@ -44,29 +49,22 @@ programming. %prep -%setup -q -n combi-%{version} -sed -i -e '/^#!\//, 1d' */test_combi/scripts/_test_combi.py -chmod a-x */test_combi/scripts/_test_combi.py +%autosetup -p1 -n combi-%{version} %build %python_build %install %python_install -rm %{buildroot}%{_bindir}/_test_combi %{python_expand rm %{buildroot}%{$python_sitelib}/combi/MIT_license.txt %fdupes %{buildroot}%{$python_sitelib} } %check -pushd docs -%{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}" -$python %{buildroot}%{$python_sitelib}/test_combi/scripts/_test_combi.py -} -popd +%pytest source_py3/test_combi %files %{python_files} -%license source_py2/combi/MIT_license.txt +%license source_py3/combi/MIT_license.txt %doc docs/changelog.txt %{python_sitelib}/combi-%{version}-py*.egg-info %{python_sitelib}/combi/ ++++++ denose-clear-trailing-space.patch ++++++ ++++ 1466 lines (skipped) ++++++ denose.patch ++++++ --- setup.cfg | 14 ------------- setup.py | 8 ------- source_py2/combi/_python_toolbox/cute_testing.py | 1 source_py2/test_combi/__init__.py | 23 ---------------------- source_py2/test_combi/scripts/_test_combi.py | 15 -------------- source_py2/test_combi/test_extensive.py | 16 +++------------ source_py3/combi/_python_toolbox/cute_testing.py | 3 -- source_py3/test_combi/__init__.py | 24 ----------------------- source_py3/test_combi/scripts/_test_combi.py | 15 -------------- source_py3/test_combi/test_extensive.py | 23 ++++++---------------- 10 files changed, 12 insertions(+), 130 deletions(-) --- a/setup.cfg +++ b/setup.cfg @@ -1,14 +0,0 @@ -[nosetests] -where=source_py2/test_combi -py3where=source_py3/test_combi - -verbosity=3 -detailed-errors=1 - -with-xunit=1 - -cover-erase=1 -cover-package=combi,test_combi -cover-branches=1 -cover-html-dir=../.coverage_html_report -cover-html=1 --- a/setup.py +++ b/setup.py @@ -266,20 +266,14 @@ install_requires = ['setuptools'] setuptools.setup( name='combi', version='1.1.2', - test_suite='nose.collector', install_requires=install_requires, - tests_require=['nose>=1.0.0', + tests_require=['pytest', 'docutils>=0.8'], description='A Pythonic package for combinatorics', author='Ram Rachum', author_email='[email protected]', package_dir={'': source_folder}, packages=get_packages(), - entry_points={ - 'console_scripts': [ - '_test_combi = test_combi:invoke_nose', - ], - }, long_description=my_long_description, license='MIT', classifiers=my_classifiers, --- a/source_py2/combi/_python_toolbox/cute_testing.py +++ b/source_py2/combi/_python_toolbox/cute_testing.py @@ -3,7 +3,6 @@ '''This module defines tools for testing.''' -import nose import sys from combi._python_toolbox.third_party import unittest2 --- a/source_py2/test_combi/__init__.py +++ b/source_py2/test_combi/__init__.py @@ -8,13 +8,6 @@ except: from combi._python_toolbox.third_party import pathlib -import nose - - -if nose.__versioninfo__ < (1, 0, 0): - raise Exception('Nose version 1.0.0 or higher is required to run tests.') - - def __bootstrap(): ''' Add needed packages in repo to path if we can't find them. @@ -50,19 +43,3 @@ def __bootstrap(): __bootstrap() - - -_default_nose_arguments = [ - '--verbosity=3', - '--detailed-errors', - '--with-xunit', - '--cover-erase', - '--cover-package=combi,test_combi', - '--exe', # Needed because `setup.py` makes our test modules executable -] - - -def invoke_nose(arguments=_default_nose_arguments): - '''Start Nose using this `test_combi` test package.''' - nose.run(defaultTest='test_combi', - argv=(arguments + sys.argv[1:])) --- a/source_py2/test_combi/scripts/_test_combi.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2009-2017 Ram Rachum. -# This program is distributed under the MIT license. - -''' -Script for launching `combi` tests when installed in local Python. -''' - - -import test_combi - - -if __name__ == '__main__': - test_combi.invoke_nose() \ No newline at end of file --- a/source_py2/test_combi/test_extensive.py +++ b/source_py2/test_combi/test_extensive.py @@ -6,7 +6,7 @@ import itertools import collections import ast -import nose +import pytest from combi._python_toolbox import nifty_collections from combi._python_toolbox import context_management @@ -515,14 +515,6 @@ def _iterate_tests(): ) -# We use this shit because Nose can't parallelize generator tests: -lambdas = [] -for i, f in enumerate(_iterate_tests()): - f.name = 'f_%s' % i - locals()[f.name] = f - lambdas.append(f) -for i, partition in enumerate(sequence_tools.partitions(lambdas, 500)): - exec('def test_%s(): return (%s)' % - (i, ', '.join('%s()'% f.name for f in partition))) - - [email protected]("f", _iterate_tests()) +def test_extensive(f): + return (f) --- a/source_py3/combi/_python_toolbox/cute_testing.py +++ b/source_py3/combi/_python_toolbox/cute_testing.py @@ -3,7 +3,6 @@ '''This module defines tools for testing.''' -import nose import sys from combi._python_toolbox.third_party import unittest2 @@ -153,5 +152,3 @@ class TestCase(unittest2.TestCase, conte # todo: Should probably do something with exception-swallowing here to # abide with the context manager protocol, but I don't need it yet. return self.__exit__(*sys.exc_info()) - - --- a/source_py3/test_combi/__init__.py +++ b/source_py3/test_combi/__init__.py @@ -7,14 +7,6 @@ try: except: from combi._python_toolbox.third_party import pathlib - -import nose - - -if nose.__versioninfo__ < (1, 0, 0): - raise Exception('Nose version 1.0.0 or higher is required to run tests.') - - def __bootstrap(): ''' Add needed packages in repo to path if we can't find them. @@ -50,19 +42,3 @@ def __bootstrap(): __bootstrap() - - -_default_nose_arguments = [ - '--verbosity=3', - '--detailed-errors', - '--with-xunit', - '--cover-erase', - '--cover-package=combi,test_combi', - '--exe', # Needed because `setup.py` makes our test modules executable -] - - -def invoke_nose(arguments=_default_nose_arguments): - '''Start Nose using this `test_combi` test package.''' - nose.run(defaultTest='test_combi', - argv=(arguments + sys.argv[1:])) --- a/source_py3/test_combi/scripts/_test_combi.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2009-2017 Ram Rachum. -# This program is distributed under the MIT license. - -''' -Script for launching `combi` tests when installed in local Python. -''' - - -import test_combi - - -if __name__ == '__main__': - test_combi.invoke_nose() \ No newline at end of file --- a/source_py3/test_combi/test_extensive.py +++ b/source_py3/test_combi/test_extensive.py @@ -6,7 +6,7 @@ import itertools import collections import ast -import nose +import pytest from combi._python_toolbox import nifty_collections from combi._python_toolbox import context_management @@ -508,22 +508,13 @@ def _iterate_tests(): ) for i in range(len(product_space_)): - fucking_globals = dict(globals()) - fucking_globals.update(locals()) + f_globals = dict(globals()) + f_globals.update(locals()) yield eval( 'lambda: _check_variation_selection(*product_space_[%s])' % i, - fucking_globals, locals() + f_globals, locals() ) - -# We use this shit because Nose can't parallelize generator tests: -lambdas = [] -for i, f in enumerate(_iterate_tests()): - f.name = 'f_%s' % i - locals()[f.name] = f - lambdas.append(f) -for i, partition in enumerate(sequence_tools.partitions(lambdas, 500)): - exec('def test_%s(): return (%s)' % - (i, ', '.join('%s()'% f.name for f in partition))) - - [email protected]("f", _iterate_tests()) +def test_extensive(f): + return (f)
