15
0

Accepting request 1218884 from devel:languages:python

- 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

  * Drop support for Python 2.6 and 3.2 and add support for
  * BaseLoader is now an abstract class that cannot be
  * Allow nan, inf and -inf values for floats in configurations.
  * Scripts zconfig (for schema validation) and
  * A new ZConfig.sphinx Sphinx extension facilitates
    automatically documenting ZConfig components using their
    description and examples in Sphinx documentation. See
  * Simplify internal schema processing of max and min
  * Almost all uses of type as a parameter name have been
    replaced with type_ to avoid shadowing a builtin. These were
  * Add ability to do variable substitution from environment

OBS-URL: https://build.opensuse.org/request/show/1218884
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ZConfig?expand=0&rev=12
This commit is contained in:
2024-10-29 13:35:34 +00:00
committed by Git OBS Bridge
6 changed files with 61 additions and 56 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f8d642fba6ba98d08631be2c1f71ad1957c051fef4aa3d3fb9f1e08dc61d0156
size 126072

34
py313.patch Normal file
View File

@@ -0,0 +1,34 @@
From 7d4cbabc5f450ac4d9e228d79778c21805136b2c Mon Sep 17 00:00:00 2001
From: dieter <dieter.maurer@online.de>
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"])

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 28 22:21:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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 <steven.kowalik@suse.com>
@@ -62,31 +70,31 @@ Mon Mar 4 12:24:46 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
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
* 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
* BaseLoader is now an abstract class that cannot be
instantiated.
* Allow nan, inf and -inf values for floats in configurations.
* Allow nan, inf and -inf values for floats in configurations.
See https://github.com/zopefoundation/ZConfig/issues/16.
* Scripts zconfig (for schema validation) and
* 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
* 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
* 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
* 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 werent 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
* Add ability to do variable substitution from environment
variables using $() syntax.
- Converted to single-spec

View File

@@ -18,14 +18,14 @@
%{?sle15_python_module_pythons}
Name: python-ZConfig
Version: 4.0
Version: 4.1
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
# PATCH-FIX-UPSTREAM gh#zopefoundation/ZConfig#91
Patch0: support-python-312.patch
Source: https://files.pythonhosted.org/packages/source/Z/ZConfig/zconfig-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: gh#zopefoundation/ZConfig#97
Patch1: py313.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module manuel}
@@ -64,7 +64,7 @@ Requires: %{name} = %{version}
This package contains documentation files for %{name}.
%prep
%autosetup -p1 -n ZConfig-%{version}
%autosetup -p1 -n zconfig-%{version}
rm -rf ZConfig.egg-info
rm docs/make.bat
# test works only in git repo

View File

@@ -1,37 +0,0 @@
From f5af2333db607f612f21ab0d4efd35b5cc72199b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
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)

3
zconfig-4.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6a79dda157f3698c8768d2cedc263216e8af240d3cf9d09a02a64291114eb20
size 146996