diff --git a/Test-using-zope.testrunner-rather-than-nose.patch b/Test-using-zope.testrunner-rather-than-nose.patch deleted file mode 100644 index 4dcf734..0000000 --- a/Test-using-zope.testrunner-rather-than-nose.patch +++ /dev/null @@ -1,269 +0,0 @@ -From dac7edd85c6f6a757a32bde76dcae7778c060f34 Mon Sep 17 00:00:00 2001 -From: chen-jan -Date: Fri, 7 Jan 2022 05:00:45 +0800 -Subject: [PATCH] test - ---- - lazr/delegates/docs/fixture.py | 34 -------------- - lazr/delegates/docs/usage_fixture.py | 27 ----------- - lazr/delegates/tests/test_docs.py | 67 ++++++++++++++++++++++++++++ - lazr/delegates/tests/test_python2.py | 11 +---- - setup.cfg | 15 ------- - setup.py | 7 +-- - tox.ini | 17 ++++++- - 7 files changed, 85 insertions(+), 93 deletions(-) - delete mode 100644 lazr/delegates/docs/fixture.py - delete mode 100644 lazr/delegates/docs/usage_fixture.py - create mode 100644 lazr/delegates/tests/test_docs.py - delete mode 100644 setup.cfg - -diff --git a/lazr/delegates/docs/fixture.py b/lazr/delegates/docs/fixture.py -deleted file mode 100644 -index 1d4aced..0000000 ---- a/lazr/delegates/docs/fixture.py -+++ /dev/null -@@ -1,34 +0,0 @@ --# Copyright 2009-2015 Canonical Ltd. All rights reserved. --# --# This file is part of lazr.delegates --# --# lazr.delegates is free software: you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation, version 3 of the License. --# --# lazr.delegates is distributed in the hope that it will be useful, but WITHOUT --# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or --# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public --# License for more details. --# --# You should have received a copy of the GNU Lesser General Public License --# along with lazr.delegates. If not, see . -- --"""Doctest fixtures for running under nose.""" -- --from __future__ import absolute_import, print_function, unicode_literals -- --__metaclass__ = type --__all__ = [ -- 'globs', -- ] -- -- --def globs(globs): -- """Set up globals for doctests.""" -- # Enable future statements to make Python 2 act more like Python 3. -- globs['absolute_import'] = absolute_import -- globs['print_function'] = print_function -- globs['unicode_literals'] = unicode_literals -- # Provide a convenient way to clean things up at the end of the test. -- return globs -diff --git a/lazr/delegates/docs/usage_fixture.py b/lazr/delegates/docs/usage_fixture.py -deleted file mode 100644 -index 7012cf7..0000000 ---- a/lazr/delegates/docs/usage_fixture.py -+++ /dev/null -@@ -1,27 +0,0 @@ --# Copyright 2009-2015 Canonical Ltd. All rights reserved. --# --# This file is part of lazr.delegates --# --# lazr.delegates is free software: you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation, version 3 of the License. --# --# lazr.delegates is distributed in the hope that it will be useful, but WITHOUT --# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or --# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public --# License for more details. --# --# You should have received a copy of the GNU Lesser General Public License --# along with lazr.delegates. If not, see . -- --"""Doctest fixtures for running under nose.""" -- --from __future__ import absolute_import, print_function, unicode_literals -- --__metaclass__ = type --__all__ = [ -- 'globs', -- ] -- -- --from lazr.delegates.docs.fixture import globs -diff --git a/lazr/delegates/tests/test_docs.py b/lazr/delegates/tests/test_docs.py -new file mode 100644 -index 0000000..7ca6971 ---- /dev/null -+++ b/lazr/delegates/tests/test_docs.py -@@ -0,0 +1,67 @@ -+# Copyright 2009-2021 Canonical Ltd. All rights reserved. -+# -+# This file is part of lazr.delegates. -+# -+# lazr.delegates is free software: you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation, version 3 of the License. -+# -+# lazr.delegates is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -+# License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public License -+# along with lazr.delegates. If not, see . -+ -+"""Test harness for doctests.""" -+ -+from __future__ import absolute_import, print_function, unicode_literals -+ -+__metaclass__ = type -+__all__ = [] -+ -+import atexit -+import doctest -+import os -+ -+from pkg_resources import ( -+ resource_filename, -+ resource_exists, -+ resource_listdir, -+ cleanup_resources, -+) -+ -+ -+DOCTEST_FLAGS = ( -+ doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | doctest.REPORT_NDIFF -+) -+ -+ -+def load_tests(loader, tests, pattern): -+ """Load the doc tests (docs/*, if any exist).""" -+ doctest_files = [] -+ if resource_exists("lazr.delegates", "docs"): -+ for name in resource_listdir("lazr.delegates", "docs"): -+ if name.endswith(".rst"): -+ doctest_files.append( -+ os.path.abspath( -+ resource_filename("lazr.delegates", "docs/%s" % name) -+ ) -+ ) -+ atexit.register(cleanup_resources) -+ globs = { -+ "absolute_import": absolute_import, -+ "print_function": print_function, -+ "unicode_literals": unicode_literals, -+ } -+ tests.addTest( -+ doctest.DocFileSuite( -+ *doctest_files, -+ module_relative=False, -+ optionflags=DOCTEST_FLAGS, -+ globs=globs, -+ encoding="UTF-8" -+ ) -+ ) -+ return tests -diff --git a/lazr/delegates/tests/test_python2.py b/lazr/delegates/tests/test_python2.py -index 1cc873b..ad3de7e 100644 ---- a/lazr/delegates/tests/test_python2.py -+++ b/lazr/delegates/tests/test_python2.py -@@ -63,14 +63,7 @@ class BaseOtherFoo(BaseFoo): - another = 'yes, another' - - --# Python 2.6 doesn't have skips. --def skip_python3(cls): -- if sys.version_info[0] > 2: -- return None -- return cls -- -- --@skip_python3 -+@unittest.skipIf(sys.version_info[0] > 2, "only relevant in Python 2") - class TestLegacyAPI(unittest.TestCase): - def test_basic_usage(self): - class SomeClass(object): -@@ -146,7 +139,7 @@ class TestLegacyAPI(unittest.TestCase): - self.assertTrue(IOther.providedBy(foo_with_teapot)) - - --@skip_python3 -+@unittest.skipIf(sys.version_info[0] > 2, "only relevant in Python 2") - class TestNewAPI(unittest.TestCase): - """Test corner cases in Python 2. - -diff --git a/setup.cfg b/setup.cfg -deleted file mode 100644 -index ffe1614..0000000 ---- a/setup.cfg -+++ /dev/null -@@ -1,15 +0,0 @@ --[nosetests] --verbosity = 3 --with-coverage = 1 --with-doctest = 1 --doctest-extension = .rst --doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE,+REPORT_NDIFF --doctest-fixtures = _fixture --cover-package = lazr.delegates --pdb = 1 -- --[egg_info] --tag_build = --tag_date = 0 --tag_svn_revision = 0 -- -diff --git a/setup.py b/setup.py -index 8e16e49..c40bdbf 100755 ---- a/setup.py -+++ b/setup.py -@@ -37,7 +37,6 @@ delegating behavior. - """, - license='LGPL v3', - install_requires=[ -- 'nose', - 'setuptools', - 'zope.interface', - ], -@@ -49,12 +48,8 @@ delegating behavior. - "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", - "Operating System :: OS Independent", - 'Programming Language :: Python', -- 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', -+ 'Programming Language :: Python :: 3.9', - ], -- # nose plugins don't really work with `python setup.py test` so use -- # `python setup.py nosetests` instead, or just `tox`. Gosh, we really -- # should switch to nose2. :/ - BAW 2014-08-20 -- #test_suite='nose.collector', - ) -diff --git a/tox.ini b/tox.ini -index 12a635e..db96714 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -1,5 +1,18 @@ - [tox] --envlist = py27,py32,py33,py34,py35 -+envlist = -+ py27 -+ py32 -+ py33 -+ py34 -+ py35 -+ py36 -+ py37 -+ py38 -+ py39 -+ coverage - - [testenv] --commands = python setup.py nosetests -+deps = -+ . -+ zope.testrunner -+commands = --- -2.30.0 - diff --git a/lazr.delegates-2.0.4.tar.gz b/lazr.delegates-2.0.4.tar.gz deleted file mode 100644 index 20f2341..0000000 Binary files a/lazr.delegates-2.0.4.tar.gz and /dev/null differ diff --git a/lazr.delegates-2.1.0.tar.gz b/lazr.delegates-2.1.0.tar.gz new file mode 100644 index 0000000..955dab5 Binary files /dev/null and b/lazr.delegates-2.1.0.tar.gz differ diff --git a/python-lazr.delegates.spec b/python-lazr.delegates.spec index 2cbb725..a13c172 100644 --- a/python-lazr.delegates.spec +++ b/python-lazr.delegates.spec @@ -1,14 +1,13 @@ %global _empty_manifest_terminate_build 0 Name: python-lazr.delegates -Version: 2.0.4 -Release: 2 +Version: 2.1.0 +Release: 1 Summary: Easily write objects that delegate behavior License: LGPL v3 URL: https://pypi.org/project/lazr.delegates -Source0: https://files.pythonhosted.org/packages/e7/23/c3f5e887055b4f238cf07b47d2ff72731b88858d36ef6095380515dcb8d1/lazr.delegates-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/d4/4e/d9cd054b93aaf0585a21a9e201840db7c0eabc43fa326d7ce6986e5b691a/lazr.delegates-2.1.0.tar.gz BuildArch: noarch -Patch0001: Test-using-zope.testrunner-rather-than-nose.patch %description The lazr.delegates package makes it easy to write objects that delegate @@ -21,6 +20,7 @@ Summary: Easily write objects that delegate behavior Provides: python-lazr.delegates BuildRequires: python3-devel BuildRequires: python3-setuptools +Requires: python3-zope-interface %description -n python3-lazr.delegates The lazr.delegates package makes it easy to write objects that delegate @@ -76,6 +76,9 @@ mv %{buildroot}/doclist.lst . %{_pkgdocdir} %changelog +* Fri Apr 07 2023 Ge Wang - 2.1.0-1 +- update to version 2.1.0 + * Fri Jan 07 2022 Chen Chen - 2.0.4-2 - using zope.testrunner instead of nose - update python version