commit acbcecb47ea58027a337e66e49daf4c494bae4147a83881737be82396dc3253b Author: Nico Krapp Date: Tue Jan 21 12:14:37 2025 +0000 - Update to 4.2 * Drop support for Python 3.7, 3.8. * Add support for Python 3.13. - Drop py313.patch, merged upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZConfig?expand=0&rev=25 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/ZConfig-4.0.tar.gz b/ZConfig-4.0.tar.gz new file mode 100644 index 0000000..c45b4f9 --- /dev/null +++ b/ZConfig-4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8d642fba6ba98d08631be2c1f71ad1957c051fef4aa3d3fb9f1e08dc61d0156 +size 126072 diff --git a/py313.patch b/py313.patch new file mode 100644 index 0000000..523317e --- /dev/null +++ b/py313.patch @@ -0,0 +1,34 @@ +From 7d4cbabc5f450ac4d9e228d79778c21805136b2c Mon Sep 17 00:00:00 2001 +From: dieter +Date: Sat, 18 May 2024 07:12:53 +0200 +Subject: [PATCH] Fix test failure for Python3.13b1 + +--- + CHANGES.rst | 3 +++ + .../components/logger/tests/test_logger.py | 15 +++++++++++++-- + 2 files changed, 16 insertions(+), 2 deletions(-) + +--- a/src/ZConfig/components/logger/tests/test_logger.py ++++ b/src/ZConfig/components/logger/tests/test_logger.py +@@ -699,8 +699,19 @@ def test_filehandler_reopen_thread_safety(self): + h = self.handler_factory(fn) + + calls = [] +- h.acquire = lambda: calls.append("acquire") +- h.release = lambda: calls.append("release") ++ ++ class _LockMockup: ++ def acquire(*args, **kw): ++ calls.append("acquire") ++ ++ __enter__ = acquire ++ ++ def release(*args, **kw): ++ calls.append("release") ++ ++ __exit__ = release ++ ++ h.lock = _LockMockup() + + h.reopen() + self.assertEqual(calls, ["acquire", "release"]) diff --git a/python-ZConfig.changes b/python-ZConfig.changes new file mode 100644 index 0000000..b1f2d91 --- /dev/null +++ b/python-ZConfig.changes @@ -0,0 +1,126 @@ +------------------------------------------------------------------- +Tue Jan 21 12:02:37 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 4.2 + * Drop support for Python 3.7, 3.8. + * Add support for Python 3.13. +- Drop py313.patch, merged upstream + +------------------------------------------------------------------- +Mon Oct 28 22:21:11 UTC 2024 - Dirk Müller + +- update to 4.1: + * Add support for Python 3.12. +- drop support-python-312.patch (upstream) +- add py313.patch: fix test failures with 3.13 + +------------------------------------------------------------------- +Mon Mar 25 01:42:28 UTC 2024 - Steve Kowalik + +- Don't use rm -f in %prep, it hides failures. +- Switch to autosetup and pyproject macros. +- Correct path used for running the testsuite. +- Add patch support-python-312.patch: + * Do not a monkey patch for assertRaisesRegexp, it is not required. + +------------------------------------------------------------------- +Sun Jan 21 10:36:47 UTC 2024 - Dirk Müller + +- update to 4.0: + * Drop support for Python 2.7, 3.5, 3.6. + +------------------------------------------------------------------- +Mon Feb 20 07:30:20 UTC 2023 - Daniel Garcia + +- Update to 3.6.1: + * Add support for Python 3.11. + * Drop support for Python 3.4. + +------------------------------------------------------------------- +Sun Jul 11 19:18:44 UTC 2021 - Jason Craig + +- Update to 3.6.0 + * Added support for Python 3.8, 3.9 and 3.10. This primarily + involves avoiding the new-in-3.8 validation of the format + string when using the ‘safe-template’ format style, since + that’s not supported in the Python standard library. + * Added ZConfig.pygments module containing a lexer compatible + with the pygments library. Made discoverable via an entry + point; use zconfig as the highlight language for code-block + directives in Sphinx documents. +- Drop patch python-38-support.patch that was integrated upstream. + +------------------------------------------------------------------- +Mon Nov 25 01:54:32 UTC 2019 - Steve Kowalik + +- Add python-38-support.patch to support Python 3.8 + +------------------------------------------------------------------- +Mon Jul 29 14:07:11 UTC 2019 - pgajdos@suse.com + +- version update to 3.5.0 + * Add support for documenting schema files contained in packages to + the Sphinx extension. See `issue 59 + `_. + +------------------------------------------------------------------- +Mon Mar 4 12:24:46 UTC 2019 - Tomáš Chvátal + +- Update to 3.4.0: + * Many changes have been made in the support for logging configurations + * Drop support for Python 3.3. + * Add support for Python 3.7. + * Drop support for 'python setup.py test'. See issue 38. + * Add support for example in section and multisection, and include those examples in generated documentation. See https://github.com/zopefoundation/ZConfig/pull/5. + * Fix configuration loaders to decode byte data using UTF-8 instead of the default encoding (usually ASCII). See issue 37. + +------------------------------------------------------------------- +Fri Jun 23 13:35:29 UTC 2017 - aloisio@gmx.com + +- Update to 3.2.0 + * Drop support for Python 2.6 and 3.2 and add support for + Python 3.6. + * Run tests with pypy and pypy3 as well. + * Host docs at https://zconfig.readthedocs.io + * BaseLoader is now an abstract class that cannot be + instantiated. + * Allow nan, inf and -inf values for floats in configurations. + See https://github.com/zopefoundation/ZConfig/issues/16. + * Scripts zconfig (for schema validation) and + zconfig_schema2html are ported to Python 3. + * A new ZConfig.sphinx Sphinx extension facilitates + automatically documenting ZConfig components using their + description and examples in Sphinx documentation. See + https://github.com/zopefoundation/ZConfig/pull/25. + * Simplify internal schema processing of max and min + occurrence values. See + https://github.com/zopefoundation/ZConfig/issues/15. + * Almost all uses of type as a parameter name have been + replaced with type_ to avoid shadowing a builtin. These were + typically not public APIs and weren’t expected to be called + with keyword arguments so there should not be any + user-visible changes. + See https://github.com/zopefoundation/ZConfig/issues/17 + 3.1.0: + * Add ability to do variable substitution from environment + variables using $() syntax. + +- Converted to single-spec + +------------------------------------------------------------------- +Wed Apr 16 17:00:09 UTC 2014 - p.drouand@gmail.com + +- Update to version 3.0.4 + + Added Python 3.4 support +- Implement update-alternatives + +------------------------------------------------------------------- +Thu Sep 26 10:48:47 UTC 2013 - toddrme2178@gmail.com + +- Fix source URL + +------------------------------------------------------------------- +Sat Aug 3 19:44:19 UTC 2013 - hpj@urpla.net + +- version 3.0.3: initial build + diff --git a/python-ZConfig.spec b/python-ZConfig.spec new file mode 100644 index 0000000..d84ff9b --- /dev/null +++ b/python-ZConfig.spec @@ -0,0 +1,101 @@ +# +# spec file for package python-ZConfig +# +# Copyright (c) 2025 SUSE LLC +# +# 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-ZConfig +Version: 4.2 +Release: 0 +Summary: Structured Configuration Library +License: ZPL-2.1 +URL: https://github.com/zopefoundation/ZConfig +Source: https://files.pythonhosted.org/packages/source/Z/ZConfig/zconfig-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module manuel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: %{python_module zope.testrunner} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +ZConfig is a configuration library intended for general use. It supports a +hierarchical schema-driven configuration model that allows a schema to specify +data conversion routines written in Python. ZConfig's model is very different +from the model supported by the ConfigParser module found in Python's standard +library, and is more suitable to configuration-intensive applications. + +ZConfig schema are written in an XML-based language and are able to "import" +schema components provided by Python packages. Since components are able to +bind to conversion functions provided by Python code in the package (or +elsewhere), configuration objects can be arbitrarily complex, with values that +have been verified against arbitrary constraints. This makes it easy for +applications to separate configuration support from configuration loading even +with configuration data being defined and consumed by a wide range of separate +packages. + +%package doc +Summary: Structured Configuration Library +Requires: %{name} = %{version} + +%description doc +This package contains documentation files for %{name}. + +%prep +%autosetup -p1 -n zconfig-%{version} +rm -rf ZConfig.egg-info +rm docs/make.bat +# test works only in git repo +rm src/ZConfig/tests/test_readme.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/zconfig +%python_clone -a %{buildroot}%{_bindir}/zconfig_schema2html + +%check +export LANG=en_US.UTF8 +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} zope-testrunner-%{$python_bin_suffix} -v --test-path=src + +%post +%python_install_alternative zconfig zconfig_schema2html + +%postun +%python_uninstall_alternative zconfig + +%files %{python_files} +%license LICENSE.txt +%doc CHANGES.rst COPYRIGHT.txt PKG-INFO README.rst +%python_alternative %{_bindir}/zconfig +%python_alternative %{_bindir}/zconfig_schema2html +%{python_sitelib}/ZConfig +%{python_sitelib}/ZConfig-%{version}.dist-info + +%files %{python_files doc} +%doc docs/ + +%changelog diff --git a/support-python-312.patch b/support-python-312.patch new file mode 100644 index 0000000..e192bb9 --- /dev/null +++ b/support-python-312.patch @@ -0,0 +1,37 @@ +From f5af2333db607f612f21ab0d4efd35b5cc72199b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= +Date: Tue, 6 Jun 2023 08:52:08 +0200 +Subject: [PATCH] Fix tests for Python 3.12 + +In the tests, remove the assertRaisesRegexp method, deprecated since +Python 3.2, to prevent test failures following the method's removal in +Python 3.12. +--- + src/ZConfig/tests/support.py | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/ZConfig/tests/support.py b/src/ZConfig/tests/support.py +index 959f2b9..559c015 100644 +--- a/src/ZConfig/tests/support.py ++++ b/src/ZConfig/tests/support.py +@@ -17,7 +17,6 @@ + import contextlib + import os + import sys +-import unittest + from io import StringIO + from urllib.request import pathname2url + +@@ -79,12 +78,6 @@ def f2(self): + class TestHelper: + """Utility methods which can be used with the schema support.""" + +- # Not derived from unittest.TestCase; some test runners seem to +- # think that means this class contains tests. +- +- assertRaisesRegex = getattr(unittest.TestCase, 'assertRaisesRegex', +- unittest.TestCase.assertRaisesRegexp) +- + def load_both(self, schema_url, conf_url): + schema = self.load_schema(schema_url) + conf = self.load_config(schema, conf_url) diff --git a/zconfig-4.1.tar.gz b/zconfig-4.1.tar.gz new file mode 100644 index 0000000..b24ed1b --- /dev/null +++ b/zconfig-4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6a79dda157f3698c8768d2cedc263216e8af240d3cf9d09a02a64291114eb20 +size 146996 diff --git a/zconfig-4.2.tar.gz b/zconfig-4.2.tar.gz new file mode 100644 index 0000000..122eafa --- /dev/null +++ b/zconfig-4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0e4b5277c4cee8060ce335a578ac458f82c240ae96b16659200dbc4d98bfcce +size 127198