From e595d17a77742d92e39f057a54ad1c31a7e7235ecdfedd56b8fbb94d119699a7 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Mon, 20 Oct 2025 11:34:40 +0000 Subject: [PATCH] - Update to 6.0 * Replace pkg_resources namespace with PEP 420 native namespace. - Add py314.patch to skip tests failing with Python 3.14 (reported) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.testing?expand=0&rev=26 --- .gitattributes | 23 +++++ .gitignore | 1 + py314.patch | 31 +++++++ python-zope.testing.changes | 172 ++++++++++++++++++++++++++++++++++++ python-zope.testing.spec | 108 ++++++++++++++++++++++ zope_testing-5.1.tar.gz | 3 + zope_testing-6.0.tar.gz | 3 + 7 files changed, 341 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 py314.patch create mode 100644 python-zope.testing.changes create mode 100644 python-zope.testing.spec create mode 100644 zope_testing-5.1.tar.gz create mode 100644 zope_testing-6.0.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/py314.patch b/py314.patch new file mode 100644 index 0000000..e5052ef --- /dev/null +++ b/py314.patch @@ -0,0 +1,31 @@ +Index: zope_testing-6.0/src/zope/testing/tests.py +=================================================================== +--- zope_testing-6.0.orig/src/zope/testing/tests.py ++++ zope_testing-6.0/src/zope/testing/tests.py +@@ -36,15 +36,17 @@ def test_suite(): + doctest.DocFileSuite('wait.txt', setUp=setUp) + )) + +- suite.addTests( +- doctest.DocFileSuite( +- 'doctestcase.txt', +- checker=renormalizing.RENormalizing([ +- # for Python 3.11+ +- (re.compile(r'\(tests\.MyTest\.test.?\)'), '(tests.MyTest)'), +- (re.compile(r'\(tests.MoreTests.test_.*\)'), +- '(tests.MoreTests)') +- ]))) ++ if sys.version_info[1] < 14: ++ suite.addTests( ++ doctest.DocFileSuite( ++ 'doctestcase.txt', ++ checker=renormalizing.RENormalizing([ ++ # for Python 3.11+ ++ (re.compile(r'\(tests\.MyTest\.test.?\)'), '(tests.MyTest)'), ++ (re.compile(r'\(tests.MoreTests.test_.*\)'), ++ '(tests.MoreTests)') ++ ]))) ++ + suite.addTests(doctest.DocFileSuite('cleanup.txt')) + suite.addTests(doctest.DocFileSuite('formparser.txt', setUp=setUp)) + return suite diff --git a/python-zope.testing.changes b/python-zope.testing.changes new file mode 100644 index 0000000..c4d896f --- /dev/null +++ b/python-zope.testing.changes @@ -0,0 +1,172 @@ +------------------------------------------------------------------- +Mon Oct 20 08:25:53 UTC 2025 - Markéta Machová + +- Update to 6.0 + * Replace pkg_resources namespace with PEP 420 native namespace. +- Add py314.patch to skip tests failing with Python 3.14 (reported) + +------------------------------------------------------------------- +Mon May 5 04:01:02 UTC 2025 - Steve Kowalik + +- Update to 5.1: + * Drop support for Python 3.7, 3.8. + * Add support for Python 3.12, 3.13. +- Switch to pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Fri Apr 21 12:39:21 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:46:08 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Jan 6 11:02:53 UTC 2023 - Dirk Müller + +- update to 5.0.1: + * Make wheels no longer universal. + * Backwards incompatible changes + * Drop support for Python 2.7, 3.5, 3.6. + * Drop modules which do not seem to be Python compatible: + + ``zope.testing.loghandler`` + + ``zope.testing.server`` + * Drop doctest option ``IGNORE_EXCEPTION_MODULE_IN_PYTHON2``. + * Remove functions: + + ``zope.testing.renormalizing.strip_dottedname_from_traceback`` + + ``zope.testing.renormalizing.is_dotted_name`` + * Add support for Python 3.11. + +------------------------------------------------------------------- +Tue Oct 11 17:32:07 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 4.10 + * Show deprecation warnings when importing modules which are not ported to Python 3. + * Improve test coverage. + * Port zope.testing.formparser to Python 3. + * Add support for Python 3.10. + +------------------------------------------------------------------- +Tue Oct 5 09:48:25 UTC 2021 - pgajdos@suse.com + +- version update to 4.9 + 4.9 (2021-01-08) + ---------------- + - Make ``setupstack.txt`` test work again if the current directory is empty. + 4.8 (2021-01-04) + ---------------- + - Add support for Python 3.8 and 3.9. + - Drop support for Python 3.3 and 3.4. + - Extend IGNORE_EXCEPTION_MODULE_IN_PYTHON2 to cover also exceptions without + arguments (thus without a colon on the last line of the traceback output). + +------------------------------------------------------------------- +Tue Oct 5 09:42:28 UTC 2021 - pgajdos@suse.com + +- %check: use %pyunittest rpm macro + +------------------------------------------------------------------- +Mon Oct 14 14:51:47 UTC 2019 - Matej Cepl + +- Replace %fdupes -s with plain %fdupes; hardlinks are better. + +------------------------------------------------------------------- +Fri Apr 5 14:44:29 UTC 2019 - Marketa Calabkova + +- update to version 4.7 + * Added support for Python 3.7. + * Remove dependencies on zope.interface and zope.exceptions. + * Remove use of 2to3 for outdated versions of PyPy3, letting us + build universal wheels. + +------------------------------------------------------------------- +Tue Dec 4 12:56:32 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Jun 23 11:17:45 UTC 2017 - aloisio@gmx.com + +- Update to 4.6.1 + * Add support for Python 3.6. + 4.6.0: + * Introduce option flag ``IGNORE_EXCEPTION_MODULE_IN_PYTHON2`` + to normalize exception class names in traceback output. + In Python 3 they are displayed as the full dotted name. + In Python 2 they are displayed as "just" the class name. + When running doctests in Python 3, the option flag will + not have any effect, however when running the same test in + Python 2, the segments in the full dotted name leading up to + the class name are stripped away from the "expected" string. + * Drop support for Python 2.6 and 3.2. + * Add support for Python 3.5. + * Cleaned up useless 2to3 conversion. + 4.5.0: + * Added meta data for test case methods created with + ``zope.testing.doctestcase``. + * Reasonable values for ``__name__``, making sure that + ``__name__`` starts with ``test``. + * For ``doctestfile`` methods, provide ``filename`` and + ``filepath`` attributes. + The meta data us useful, for example, for selecting tests + with the nose attribute mechanism. + * Added ``doctestcase.doctestfiles`` + * Define multiple doctest files at once. + * Automatically assign test class members. So rather than:: + class MYTests(unittest.TestCase): + ... + test_foo = doctestcase.doctestfile('foo.txt') + You can use:: + @doctestcase.doctestfiles('foo.txt', 'bar.txt', ...) + class MYTests(unittest.TestCase): + ... + 4.4.0: + * Added ``zope.testing.setupstack.mock`` as a convenience + function for setting up mocks in tests. (The Python + ``mock`` package must be in the path for this to work. The + excellent ``mock`` package isn't a dependency of + ``zope.testing``.) + * Added the base class ``zope.testing.setupstack.TestCase`` to + make it much easier to use ``zope.testing.setupstack`` in + ``unittest`` test cases. + 4.3.0: + * Added support for creating doctests as methods of + ``unittest.TestCase`` classes so that they can found + automatically by test runners, like *nose* that ignore test + suites. + 4.2.0: + * **Actually** remove long-deprecated ``zope.testing.doctest`` + (announced as removed in 4.0.0) and + ``zope.testing.doctestunit``. + * Add support for PyPy and PyPy3. + +- Converted to single-spec + +------------------------------------------------------------------- +Fri May 15 13:38:51 UTC 2015 - benoit.monin@gmx.fr + +- update to version 4.1.3: + * Added support for Python 3.4. + * Updated boostrap.py to version 2.2. +- switch the source archive to tar.gz (zip not available) +- remove unzip from BuildRequires +- reenable the tests for all suse versions + +------------------------------------------------------------------- +Fri Nov 1 10:08:16 UTC 2013 - p.drouand@gmail.com + +- Disable tests; fix build for Factory + +------------------------------------------------------------------- +Thu Oct 24 11:18:01 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Fri Mar 15 13:58:11 UTC 2013 - speilicke@suse.com + +- Initial version + diff --git a/python-zope.testing.spec b/python-zope.testing.spec new file mode 100644 index 0000000..ea74b9d --- /dev/null +++ b/python-zope.testing.spec @@ -0,0 +1,108 @@ +# +# spec file for package python-zope.testing +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-zope.testing +Version: 6.0 +Release: 0 +Summary: Zope testing helpers +License: ZPL-2.1 +URL: https://pypi.python.org/pypi/zope.testing +Source: https://files.pythonhosted.org/packages/source/z/zope.testing/zope_testing-%{version}.tar.gz +# PATCH-FIX-OPENSUSE https://github.com/zopefoundation/zope.testing/issues/56 doctestcase test fails on Python 3.14 +Patch0: py314.patch +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-setuptools +BuildArch: noarch +%python_subpackages + +%description +This package provides a number of testing frameworks. + +cleanup + Provides a mixin class for cleaning up after tests that + make global changes. + +formparser + An HTML parser that extracts form information. + + **Python 2 only** + + This is intended to support functional tests that need to extract + information from HTML forms returned by the publisher. + + See formparser.txt. + +loggingsupport + Support for testing logging code + + If you want to test that your code generates proper log output, you + can create and install a handler that collects output. + +loghandler + Logging handler for tests that check logging output. + +module + Lets a doctest pretend to be a Python module. + + See module.txt. + +renormalizing + Regular expression pattern normalizing output checker. + Useful for doctests. + +server + Provides a simple HTTP server compatible with the zope.app.testing + functional testing API. Lets you interactively play with the system + under test. Helpful in debugging functional doctest failures. + + **Python 2 only** + +setupstack + A simple framework for automating doctest set-up and tear-down. + See setupstack.txt. + +wait + A small utility for dealing with timing non-determinism + See wait.txt. + +%prep +%autosetup -p1 -n zope_testing-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest -v zope.testing.tests.test_suite + +%files %{python_files} +%license LICENSE.txt +%doc COPYRIGHT.txt README.rst +%dir %{python_sitelib}/zope +%{python_sitelib}/zope/testing +%{python_sitelib}/zope[_.]testing-%{version}.dist-info + +%changelog diff --git a/zope_testing-5.1.tar.gz b/zope_testing-5.1.tar.gz new file mode 100644 index 0000000..ab38745 --- /dev/null +++ b/zope_testing-5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7135ebaaec3d38796e491a9adb127a3651aa0e3b20128de6c778451fa11acc47 +size 42344 diff --git a/zope_testing-6.0.tar.gz b/zope_testing-6.0.tar.gz new file mode 100644 index 0000000..8bcd524 --- /dev/null +++ b/zope_testing-6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b34133a8f4a7135f3732fa5ba31d9968e9b9029881157d2a24493356d7fd54a +size 42462