public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/zconfig/, dev-python/zconfig/files/
@ 2021-08-21 13:03 Arthur Zamarin
  0 siblings, 0 replies; 2+ messages in thread
From: Arthur Zamarin @ 2021-08-21 13:03 UTC (permalink / raw
  To: gentoo-commits

commit:     657ae90668b15067cb6574f5ab65feed3c2aaee8
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 21 12:52:08 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 21 13:03:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=657ae906

dev-python/zconfig: drop 3.5.0

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/zconfig/Manifest                       |   1 -
 dev-python/zconfig/files/zconfig-3.5.0-py38.patch | 105 ----------------------
 dev-python/zconfig/zconfig-3.5.0.ebuild           |  36 --------
 3 files changed, 142 deletions(-)

diff --git a/dev-python/zconfig/Manifest b/dev-python/zconfig/Manifest
index 4d6e43cc55e..abea87d5c76 100644
--- a/dev-python/zconfig/Manifest
+++ b/dev-python/zconfig/Manifest
@@ -1,2 +1 @@
-DIST ZConfig-3.5.0.tar.gz 127317 BLAKE2B 735d554072d4be4ee0552151a6bd0401e66bc0a7a091d97656a2c95efb13580d264a39e28c11e096ee77f57bc96d684720c22c981f5dbd82ce012d40c94d33ea SHA512 14af4de2adcb7e5404a4fd8e1a1903758c584898fda7c4d2a660616c37023f0e0b5d4acac789a930c2900eb501528899d51c4ea4c4050535cfbaa629e9159558
 DIST ZConfig-3.6.0.tar.gz 134559 BLAKE2B cf24d055a88c552311e5837b0caba143a9d4122caa0319ad31de89177d521ecb3f8fb7f463618f35410cc25169865103ff5957e9484e347ebd7e1b7cacb20b35 SHA512 a5cca99f324007a14f4738be1c9f7424538d8a13f7171fbfa979ce9273b29679eb18b0e905afc96d38abcf042af222e3e86acad6912b9eb8b71b6c8122c47031

diff --git a/dev-python/zconfig/files/zconfig-3.5.0-py38.patch b/dev-python/zconfig/files/zconfig-3.5.0-py38.patch
deleted file mode 100644
index ea5e8db7642..00000000000
--- a/dev-python/zconfig/files/zconfig-3.5.0-py38.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Required for python 3.8+ compatibility
-https://github.com/zopefoundation/ZConfig/pull/70
---- a/ZConfig/components/logger/formatter.py
-+++ b/ZConfig/components/logger/formatter.py
-@@ -248,8 +248,17 @@ def __call__(self):
-             else:
-                 # A formatter class that supports style, but our style is
-                 # non-standard, so we reach under the covers a bit.
-+                #
-+                # Python 3.8 adds a validate option, defaulting to True,
-+                # which cases the format string to be checked.  Since
-+                # safe-template is not a standard style, we want to
-+                # suppress this.
-+                #
-+                kwargs = dict()
-+                if sys.version_info >= (3, 8):
-+                    kwargs['validate'] = False
-                 formatter = self.factory(self.format, self.dateformat,
--                                         style='$')
-+                                         style='$', **kwargs)
-                 assert formatter._style._fmt == self.format
-                 formatter._style = stylist
-         else:
---- a/ZConfig/components/logger/tests/test_formatter.py
-+++ b/ZConfig/components/logger/tests/test_formatter.py
-@@ -25,6 +25,17 @@
- import ZConfig.components.logger.tests.support
- 
- 
-+# In Python 3.8, a KeyError raised by string interpolation is re-written
-+# into a ValueError reporting a reference to an undefined field.  We're
-+# not masking the exception, but we want to check for the right one in
-+# the tests below (without catching anything else).
-+#
-+if sys.version_info >= (3, 8):
-+    MissingFieldError = ValueError
-+else:
-+    MissingFieldError = KeyError
-+
-+
- class LogFormatStyleTestCase(unittest.TestCase):
- 
-     def setUp(self):
-@@ -314,7 +325,10 @@ class CustomFormatterFactoryWithoutStyleParamTestCase(
- class StylelessFormatter(logging.Formatter):
- 
-     def __init__(self, fmt=None, datefmt=None):
--        logging.Formatter.__init__(self, fmt=fmt, datefmt=datefmt)
-+        kwargs = dict()
-+        if sys.version_info >= (3, 8):
-+            kwargs['validate'] = False
-+        logging.Formatter.__init__(self, fmt=fmt, datefmt=datefmt, **kwargs)
- 
- 
- def styleless_formatter(fmt=None, datefmt=None):
-@@ -552,9 +566,9 @@ def test_classic_arbitrary_field_missing(self):
-             arbitrary_fields=True)
- 
-         # The formatter still breaks when it references an undefined field:
--        with self.assertRaises(KeyError) as cm:
-+        with self.assertRaises(MissingFieldError) as cm:
-             formatter.format(self.record)
--        self.assertEqual(str(cm.exception), "'undefined_field'")
-+        self.assertIn("'undefined_field'", str(cm.exception))
- 
-     def test_classic_arbitrary_field_present(self):
-         formatter = self.get_formatter(
-@@ -574,9 +588,9 @@ def test_format_arbitrary_field_missing(self):
-             arbitrary_fields=True)
- 
-         # The formatter still breaks when it references an undefined field:
--        with self.assertRaises(KeyError) as cm:
-+        with self.assertRaises(MissingFieldError) as cm:
-             formatter.format(self.record)
--        self.assertEqual(str(cm.exception), "'undefined_field'")
-+        self.assertIn("'undefined_field'", str(cm.exception))
- 
-     def test_format_arbitrary_field_present(self):
-         formatter = self.get_formatter(
-@@ -596,9 +610,9 @@ def test_template_arbitrary_field_missing(self):
-             arbitrary_fields=True)
- 
-         # The formatter still breaks when it references an undefined field:
--        with self.assertRaises(KeyError) as cm:
-+        with self.assertRaises(MissingFieldError) as cm:
-             formatter.format(self.record)
--        self.assertEqual(str(cm.exception), "'undefined_field'")
-+        self.assertIn("'undefined_field'", str(cm.exception))
- 
-     def test_template_arbitrary_field_present(self):
-         formatter = self.get_formatter(
-
---- a/ZConfig/components/logger/formatter.py
-+++ b/ZConfig/components/logger/formatter.py
-@@ -250,7 +250,7 @@ def __call__(self):
-                 # non-standard, so we reach under the covers a bit.
-                 #
-                 # Python 3.8 adds a validate option, defaulting to True,
--                # which cases the format string to be checked.  Since
-+                # which causes the format string to be checked.  Since
-                 # safe-template is not a standard style, we want to
-                 # suppress this.
-                 #
-
-

diff --git a/dev-python/zconfig/zconfig-3.5.0.ebuild b/dev-python/zconfig/zconfig-3.5.0.ebuild
deleted file mode 100644
index 174067f20aa..00000000000
--- a/dev-python/zconfig/zconfig-3.5.0.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{7..9} )
-inherit distutils-r1
-
-MY_PN="ZConfig"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="A configuration library supporting a hierarchical schema-driven configuration model"
-HOMEPAGE="https://pypi.org/project/ZConfig/"
-S="${WORKDIR}/${MY_P}"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="ZPL"
-SLOT="0"
-KEYWORDS="~amd64"
-
-BDEPEND="
-	test? (
-		dev-python/docutils[${PYTHON_USEDEP}]
-		dev-python/manuel[${PYTHON_USEDEP}]
-		dev-python/zope-exceptions[${PYTHON_USEDEP}]
-		dev-python/zope-interface[${PYTHON_USEDEP}]
-		dev-python/zope-testrunner[${PYTHON_USEDEP}]
-	)"
-
-DOCS=( CHANGES.rst README.rst )
-
-PATCHES=( "${FILESDIR}"/${P}-py38.patch )
-
-distutils_enable_tests nose
-distutils_enable_sphinx doc dev-python/sphinxcontrib-programoutput


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/zconfig/, dev-python/zconfig/files/
@ 2023-10-20 14:49 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2023-10-20 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b56e983bb5e2ac6565938332d27c865dfc75b8e3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 14:49:07 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 14:49:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b56e983b

dev-python/zconfig: Enable py3.12

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/zconfig/files/zconfig-4.0-py312.patch | 37 ++++++++++++++++++++++++
 dev-python/zconfig/zconfig-4.0.ebuild            | 12 ++++++--
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/dev-python/zconfig/files/zconfig-4.0-py312.patch b/dev-python/zconfig/files/zconfig-4.0-py312.patch
new file mode 100644
index 000000000000..6f8c53ed18a0
--- /dev/null
+++ b/dev-python/zconfig/files/zconfig-4.0-py312.patch
@@ -0,0 +1,37 @@
+From 390ce89cfd4bf1a60d8d67ee20106288cbfa0e51 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Fri, 23 Jun 2023 08:10:09 +0200
+Subject: [PATCH] Fix tests for Python 3.12 (#91)
+
+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/dev-python/zconfig/zconfig-4.0.ebuild b/dev-python/zconfig/zconfig-4.0.ebuild
index d015ceef4469..297324eb085e 100644
--- a/dev-python/zconfig/zconfig-4.0.ebuild
+++ b/dev-python/zconfig/zconfig-4.0.ebuild
@@ -6,12 +6,15 @@ EAPI=8
 DISTUTILS_USE_PEP517=setuptools
 PYPI_NO_NORMALIZE=1
 PYPI_PN="ZConfig"
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit distutils-r1 pypi
 
 DESCRIPTION="Configuration library supporting a hierarchical schema-driven model"
-HOMEPAGE="https://pypi.org/project/ZConfig/"
+HOMEPAGE="
+	https://github.com/zopefoundation/ZConfig/
+	https://pypi.org/project/ZConfig/
+"
 
 LICENSE="ZPL"
 SLOT="0"
@@ -32,6 +35,11 @@ distutils_enable_tests unittest
 distutils_enable_sphinx docs \
 	dev-python/sphinxcontrib-programoutput
 
+PATCHES=(
+	# https://github.com/zopefoundation/ZConfig/commit/390ce89cfd4bf1a60d8d67ee20106288cbfa0e51
+	"${FILESDIR}/${P}-py312.patch"
+)
+
 python_test() {
 	eunittest -s src/ZConfig/tests
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-20 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:49 [gentoo-commits] repo/gentoo:master commit in: dev-python/zconfig/, dev-python/zconfig/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-08-21 13:03 Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox