diff options
| author | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-03-01 00:37:58 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-03-01 00:37:58 +0000 |
| commit | 8ddb1a3d1229412a438971f82d37d518a0223726 (patch) | |
| tree | 83438b5ddb9d23a390f1a3fc505303d3d2223bf2 /dev-python/zconfig | |
| parent | 9acab46e1a820daece7b2e631485c157ce2210ad (diff) | |
| download | baldeagleos-repo-21.1.5.tar.gz baldeagleos-repo-21.1.5.tar.xz baldeagleos-repo-21.1.5.zip | |
Adding metadatav21.1.5
Diffstat (limited to 'dev-python/zconfig')
| -rw-r--r-- | dev-python/zconfig/files/zconfig-3.5.0-py38.patch | 105 | ||||
| -rw-r--r-- | dev-python/zconfig/metadata.xml | 32 | ||||
| -rw-r--r-- | dev-python/zconfig/zconfig-3.5.0.ebuild | 17 |
3 files changed, 129 insertions, 25 deletions
diff --git a/dev-python/zconfig/files/zconfig-3.5.0-py38.patch b/dev-python/zconfig/files/zconfig-3.5.0-py38.patch new file mode 100644 index 000000000000..ea5e8db7642b --- /dev/null +++ b/dev-python/zconfig/files/zconfig-3.5.0-py38.patch @@ -0,0 +1,105 @@ +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/metadata.xml b/dev-python/zconfig/metadata.xml index ed502c98fcf9..d7e35f9087b7 100644 --- a/dev-python/zconfig/metadata.xml +++ b/dev-python/zconfig/metadata.xml @@ -1,21 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>lssndrbarbieri@gmail.com</email> - <name>Alessandro Barbieri</name> - </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> - <upstream> - <remote-id type="github">zopefoundation/ZConfig</remote-id> - <remote-id type="pypi">ZConfig</remote-id> - </upstream> - <longdescription lang="en"> + <maintainer type="person"> + <email>lssndrbarbieri@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> 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. </longdescription> -</pkgmetadata> + <upstream> + <remote-id type="github">zopefoundation/ZConfig</remote-id> + <remote-id type="pypi">ZConfig</remote-id> + </upstream> + <origin>gentoo-staging</origin> + <stabilize-allarches/> +</pkgmetadata>
\ No newline at end of file diff --git a/dev-python/zconfig/zconfig-3.5.0.ebuild b/dev-python/zconfig/zconfig-3.5.0.ebuild index 46c541c4d412..996d53b2275e 100644 --- a/dev-python/zconfig/zconfig-3.5.0.ebuild +++ b/dev-python/zconfig/zconfig-3.5.0.ebuild @@ -1,11 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 DISTUTILS_USE_SETUPTOOLS=rdepend PYTHON_COMPAT=( python3_{6,7,8,9,10} ) - inherit distutils-r1 MY_PN="ZConfig" @@ -13,27 +12,25 @@ 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" -RESTRICT="!test? ( test )" -DEPEND=" +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}] - ) -" -RDEPEND="" - -S="${WORKDIR}/${MY_P}" + )" DOCS=( CHANGES.rst README.rst ) +PATCHES=( "${FILESDIR}"/${P}-py38.patch ) + distutils_enable_tests nose distutils_enable_sphinx doc dev-python/sphinxcontrib-programoutput |
