Hello community, here is the log from the commit of package python-ZConfig for openSUSE:Factory checked in at 2019-08-06 15:08:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ZConfig (Old) and /work/SRC/openSUSE:Factory/.python-ZConfig.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ZConfig" Tue Aug 6 15:08:45 2019 rev:6 rq:719651 version:3.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ZConfig/python-ZConfig.changes 2019-03-05 12:23:01.688883400 +0100 +++ /work/SRC/openSUSE:Factory/.python-ZConfig.new.4126/python-ZConfig.changes 2019-08-06 15:08:46.827832128 +0200 @@ -1,0 +2,8 @@ +Mon Jul 29 14:07:11 UTC 2019 - pgaj...@suse.com + +- version update to 3.5.0 + * Add support for documenting schema files contained in packages to + the Sphinx extension. See `issue 59 + <https://github.com/zopefoundation/ZConfig/issues/59>`_. + +------------------------------------------------------------------- Old: ---- ZConfig-3.4.0.tar.gz New: ---- ZConfig-3.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ZConfig.spec ++++++ --- /var/tmp/diff_new_pack.bOuWrg/_old 2019-08-06 15:08:47.391831710 +0200 +++ /var/tmp/diff_new_pack.bOuWrg/_new 2019-08-06 15:08:47.399831704 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-ZConfig -Version: 3.4.0 +Version: 3.5.0 Release: 0 Summary: Structured Configuration Library License: ZPL-2.1 @@ -32,6 +32,7 @@ BuildRequires: %{python_module zope.testrunner} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-setuptools Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -79,7 +80,7 @@ %check export LANG=en_US.UTF8 -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} zope-testrunner-%{$python_bin_suffix} --test-path=. +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} zope-testrunner-%{$python_bin_suffix} -v --test-path=. %post %python_install_alternative zconfig zconfig_schema2html ++++++ ZConfig-3.4.0.tar.gz -> ZConfig-3.5.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/.travis.yml new/ZConfig-3.5.0/.travis.yml --- old/ZConfig-3.4.0/.travis.yml 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/.travis.yml 2019-06-24 12:55:22.000000000 +0200 @@ -1,17 +1,15 @@ language: python sudo: false +dist: xenial python: - 2.7 - 3.4 - 3.5 - 3.6 + - 3.7 - pypy - pypy3 -matrix: - include: - - python: "3.7" - dist: xenial - sudo: true + install: - pip install -U pip setuptools - pip install -U coverage coveralls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/CHANGES.rst new/ZConfig-3.5.0/CHANGES.rst --- old/ZConfig-3.4.0/CHANGES.rst 2019-01-02 17:17:36.000000000 +0100 +++ new/ZConfig-3.5.0/CHANGES.rst 2019-06-24 12:55:22.000000000 +0200 @@ -1,9 +1,16 @@ -========================== -Change History for ZConfig -========================== +============================ + Change History for ZConfig +============================ + +3.5.0 (2019-06-24) +================== + +- Add support for documenting schema files contained in packages to + the Sphinx extension. See `issue 59 + <https://github.com/zopefoundation/ZConfig/issues/59>`_. 3.4.0 (2019-01-02) ------------------- +================== Many changes have been made in the support for logging configurations: @@ -48,7 +55,7 @@ 3.3.0 (2018-10-04) ------------------- +================== - Drop support for Python 3.3. @@ -66,7 +73,7 @@ <https://github.com/zopefoundation/ZConfig/issues/37>`_. 3.2.0 (2017-06-22) ------------------- +================== - Drop support for Python 2.6 and 3.2 and add support for Python 3.6. @@ -99,31 +106,31 @@ https://github.com/zopefoundation/ZConfig/issues/17 3.1.0 (2015-10-17) ------------------- +================== - Add ability to do variable substitution from environment variables using $() syntax. 3.0.4 (2014-03-20) ------------------- +================== - Added Python 3.4 support. 3.0.3 (2013-03-02) ------------------- +================== - Added Python 3.2 support. 3.0.2 (2013-02-14) ------------------- +================== - Fixed ResourceWarning in BaseLoader.openResource(). 3.0.1 (2013-02-13) ------------------- +================== - Removed an accidentally left `pdb` statement from the code. @@ -131,7 +138,7 @@ 3.0.0 (2013-02-13) ------------------- +================== - Added Python 3.3 support. @@ -139,34 +146,34 @@ 2.9.3 (2012-06-25) ------------------- +================== - Fixed: port values of 0 weren't allowed. Port 0 is used to request an ephemeral port. 2.9.2 (2012-02-11) ------------------- +================== - Adjust test classes to avoid base classes being considered separate test cases by (at least) the "nose" test runner. 2.9.1 (2012-02-11) ------------------- +================== - Make FileHandler.reopen thread safe. 2.9.0 (2011-03-22) ------------------- +================== - Allow identical redefinition of ``%define`` names. - Added support for IPv6 addresses. 2.8.0 (2010-04-13) ------------------- +================== - Fix relative path recognition. https://bugs.launchpad.net/zconfig/+bug/405687 @@ -175,7 +182,7 @@ 2.7.1 (2009-06-13) ------------------- +================== - Improved documentation @@ -183,7 +190,7 @@ 2.7.0 (2009-06-11) ------------------- +================== - Added a convenience function, ``ZConfig.configureLoggers(text)`` for configuring loggers. @@ -194,7 +201,7 @@ 2.6.1 (2008-12-05) ------------------- +================== - Fixed support for schema descriptions that override descriptions from a base schema. If multiple base schema provide descriptions but the derived schema @@ -207,7 +214,7 @@ 2.6.0 (2008-09-03) ------------------- +================== - Added support for file rotation by time by specifying when and interval, rather than max-size, for log files. @@ -216,7 +223,7 @@ 2.5.1 (2007-12-24) ------------------- +================== - Made it possible to run unit tests via 'python setup.py test' (requires setuptools on sys.path). @@ -225,7 +232,7 @@ 2.5 (2007-08-31) ------------------------- +================ *A note on the version number:* @@ -262,14 +269,14 @@ 2.3.1 (2005-08-21) ------------------- +================== - Isolated some of the case-normalization code so it will at least be easier to override. This remains non-trivial. 2.3 (2005-05-18) ----------------- +================ - Added "inet-binding-address" and "inet-connection-address" to the set of standard datatypes. These are similar to the "inet-address" @@ -284,7 +291,7 @@ 2.2 (2004-04-21) ----------------- +================ - More documentation has been written. @@ -312,7 +319,7 @@ 2.1 (2004-04-12) ----------------- +================ - Removed compatibility with Python 2.1 and 2.2. @@ -348,7 +355,7 @@ 2.0 (2003-10-27) ----------------- +================ - Configurations can import additional schema components using a new "%import" directive; this can be used to integrate 3rd-party @@ -365,6 +372,6 @@ 1.0 (2003-03-25) ----------------- +================ - Initial release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/PKG-INFO new/ZConfig-3.5.0/PKG-INFO --- old/ZConfig-3.4.0/PKG-INFO 2019-01-02 17:20:52.000000000 +0100 +++ new/ZConfig-3.5.0/PKG-INFO 2019-06-24 12:55:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ZConfig -Version: 3.4.0 +Version: 3.5.0 Summary: Structured Configuration Library Home-page: https://github.com/zopefoundation/ZConfig/ Author: Fred L. Drake, Jr. @@ -124,12 +124,19 @@ `Python Packaging User Guide <https://packaging.python.org/>`__. - ========================== - Change History for ZConfig - ========================== + ============================ + Change History for ZConfig + ============================ + + 3.5.0 (2019-06-24) + ================== + + - Add support for documenting schema files contained in packages to + the Sphinx extension. See `issue 59 + <https://github.com/zopefoundation/ZConfig/issues/59>`_. 3.4.0 (2019-01-02) - ------------------ + ================== Many changes have been made in the support for logging configurations: @@ -174,7 +181,7 @@ 3.3.0 (2018-10-04) - ------------------ + ================== - Drop support for Python 3.3. @@ -192,7 +199,7 @@ <https://github.com/zopefoundation/ZConfig/issues/37>`_. 3.2.0 (2017-06-22) - ------------------ + ================== - Drop support for Python 2.6 and 3.2 and add support for Python 3.6. @@ -225,31 +232,31 @@ https://github.com/zopefoundation/ZConfig/issues/17 3.1.0 (2015-10-17) - ------------------ + ================== - Add ability to do variable substitution from environment variables using $() syntax. 3.0.4 (2014-03-20) - ------------------ + ================== - Added Python 3.4 support. 3.0.3 (2013-03-02) - ------------------ + ================== - Added Python 3.2 support. 3.0.2 (2013-02-14) - ------------------ + ================== - Fixed ResourceWarning in BaseLoader.openResource(). 3.0.1 (2013-02-13) - ------------------ + ================== - Removed an accidentally left `pdb` statement from the code. @@ -257,7 +264,7 @@ 3.0.0 (2013-02-13) - ------------------ + ================== - Added Python 3.3 support. @@ -265,34 +272,34 @@ 2.9.3 (2012-06-25) - ------------------ + ================== - Fixed: port values of 0 weren't allowed. Port 0 is used to request an ephemeral port. 2.9.2 (2012-02-11) - ------------------ + ================== - Adjust test classes to avoid base classes being considered separate test cases by (at least) the "nose" test runner. 2.9.1 (2012-02-11) - ------------------ + ================== - Make FileHandler.reopen thread safe. 2.9.0 (2011-03-22) - ------------------ + ================== - Allow identical redefinition of ``%define`` names. - Added support for IPv6 addresses. 2.8.0 (2010-04-13) - ------------------ + ================== - Fix relative path recognition. https://bugs.launchpad.net/zconfig/+bug/405687 @@ -301,7 +308,7 @@ 2.7.1 (2009-06-13) - ------------------ + ================== - Improved documentation @@ -309,7 +316,7 @@ 2.7.0 (2009-06-11) - ------------------ + ================== - Added a convenience function, ``ZConfig.configureLoggers(text)`` for configuring loggers. @@ -320,7 +327,7 @@ 2.6.1 (2008-12-05) - ------------------ + ================== - Fixed support for schema descriptions that override descriptions from a base schema. If multiple base schema provide descriptions but the derived schema @@ -333,7 +340,7 @@ 2.6.0 (2008-09-03) - ------------------ + ================== - Added support for file rotation by time by specifying when and interval, rather than max-size, for log files. @@ -342,7 +349,7 @@ 2.5.1 (2007-12-24) - ------------------ + ================== - Made it possible to run unit tests via 'python setup.py test' (requires setuptools on sys.path). @@ -351,7 +358,7 @@ 2.5 (2007-08-31) - ------------------------ + ================ *A note on the version number:* @@ -388,14 +395,14 @@ 2.3.1 (2005-08-21) - ------------------ + ================== - Isolated some of the case-normalization code so it will at least be easier to override. This remains non-trivial. 2.3 (2005-05-18) - ---------------- + ================ - Added "inet-binding-address" and "inet-connection-address" to the set of standard datatypes. These are similar to the "inet-address" @@ -410,7 +417,7 @@ 2.2 (2004-04-21) - ---------------- + ================ - More documentation has been written. @@ -438,7 +445,7 @@ 2.1 (2004-04-12) - ---------------- + ================ - Removed compatibility with Python 2.1 and 2.2. @@ -474,7 +481,7 @@ 2.0 (2003-10-27) - ---------------- + ================ - Configurations can import additional schema components using a new "%import" directive; this can be used to integrate 3rd-party @@ -491,7 +498,7 @@ 1.0 (2003-03-25) - ---------------- + ================ - Initial release. @@ -514,5 +521,5 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development -Provides-Extra: test Provides-Extra: docs +Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/__init__.py new/ZConfig-3.5.0/ZConfig/__init__.py --- old/ZConfig-3.4.0/ZConfig/__init__.py 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/__init__.py 2019-06-24 12:55:22.000000000 +0200 @@ -115,6 +115,13 @@ _ParseError.__init__(self, msg, url, lineno, colno) +class UnknownDocumentTypeError(SchemaError): + """ + Raised when the root element of the document being parsed is + unexpected. + """ + + class SchemaResourceError(SchemaError): """Raised when there's an error locating a resource required by the schema. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/_schema_utils.py new/ZConfig-3.5.0/ZConfig/_schema_utils.py --- old/ZConfig-3.4.0/ZConfig/_schema_utils.py 2018-12-12 21:47:51.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/_schema_utils.py 2019-06-24 12:55:22.000000000 +0200 @@ -308,15 +308,31 @@ del TypeVisitor -def load_schema(schema, package, package_file): +def load_schema(schema, package=None): + """ + Load the *schema* and return the schema object. + + By default, *schema* is interpreted as a path on disk to a schema + file. + + If *package* is set to a non-empty string, then *package* must + name a Python package, and the file in *schema* will be loaded + from that package. The *schema* can either refer to a component + definition (e.g., ``components.xml``) or to a schema. + """ + if not package: + # A schema file schema_reader = argparse.FileType('r')(schema) - else: + return ZConfig.loader.loadSchemaFile(schema_reader) + + try: + # A component in a package schema_template = ( "<schema><import package='%s' file='%s' /></schema>" - % (schema, package_file or 'component.xml')) + % (package, schema)) from ZConfig._compat import TextIO - schema_reader = TextIO(schema_template) - - schema = ZConfig.loader.loadSchemaFile(schema_reader) - return schema + return ZConfig.loader.loadSchemaFile(TextIO(schema_template)) + except ZConfig.UnknownDocumentTypeError: + # Ok, not parseable as a component. Try a simple schema. + return ZConfig.loader.loadSchema('package:%s:%s' % (package, schema)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/components/logger/logger.xml new/ZConfig-3.5.0/ZConfig/components/logger/logger.xml --- old/ZConfig-3.4.0/ZConfig/components/logger/logger.xml 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/components/logger/logger.xml 2019-06-24 12:55:22.000000000 +0200 @@ -29,7 +29,7 @@ <description> The dotted name of the logger. This give it a location in the logging hierarchy. Most applications provide a specific set - of subsystem names for which logging is meaning; consult the + of subsystem names for which logging is meaningful; consult the application documentation for the set of names that are actually interesting for the application. </description> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/loader.py new/ZConfig-3.5.0/ZConfig/loader.py --- old/ZConfig-3.4.0/ZConfig/loader.py 2018-12-12 22:30:13.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/loader.py 2019-06-24 12:55:22.000000000 +0200 @@ -153,11 +153,8 @@ actual load, and returns whatever that method returns. """ url = self.normalizeURL(url) - r = self.openResource(url) - try: + with self.openResource(url) as r: return self.loadResource(r) - finally: - r.close() def loadFile(self, file, url=None): """Load from an open file object, *file*. @@ -172,11 +169,8 @@ """ if not url: url = _url_from_file(file) - r = self.createResource(file, url) - try: + with self.createResource(file, url) as r: return self.loadResource(r) - finally: - r.close() # utilities @@ -446,20 +440,14 @@ url = self._loader.schemaComponentSource(pkgname, '') if schema.hasComponent(url): return - resource = self.openResource(url) schema.addComponent(url) - try: + with self.openResource(url) as resource: ZConfig.schema.parseComponent(resource, self._loader, schema) - finally: - resource.close() def includeConfiguration(self, section, url, defines): url = self.normalizeURL(url) - r = self.openResource(url) - try: + with self.openResource(url) as r: self._parse_resource(section, r, defines) - finally: - r.close() # internal helper @@ -507,7 +495,8 @@ store the constructor arguments. These objects also have a :meth:`close` method which will call :meth:`~file.close` on *file*, then set the :attr:`file` attribute to ``None`` and the - :attr:`closed` attribute to ``True``. + :attr:`closed` attribute to ``True``. Using this object as a + context manager also closes the file. All other attributes are delegated to *file*. """ @@ -526,3 +515,9 @@ def __getattr__(self, name): return getattr(self.file, name) + + def __enter__(self): + return self + + def __exit__(self, t, v, tb): + self.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/schema.py new/ZConfig-3.5.0/ZConfig/schema.py --- old/ZConfig-3.4.0/ZConfig/schema.py 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/schema.py 2019-06-24 12:55:22.000000000 +0200 @@ -96,7 +96,8 @@ self.error("%s elements may not be nested in %s elements" % (_srepr(name), _srepr(parent))) elif name != self._top_level: - self.error("Unknown document type " + name) + self.error("Unknown document type " + name, + ZConfig.UnknownDocumentTypeError) self._elem_stack.append(name) @@ -321,12 +322,9 @@ self.loadComponent(src) def loadComponent(self, src): - r = self._loader.openResource(src) parser = ComponentParser(self._loader, src, self._schema) - try: + with self._loader.openResource(src) as r: xml.sax.parse(r.file, parser) - finally: - r.close() def end_import(self): pass @@ -468,8 +466,10 @@ e.url = self._locator.getSystemId() return e - def error(self, message): - raise_with_same_tb(self.initerror(ZConfig.SchemaError(message))) + def error(self, message, kind=None): + # Can't do this as a default value because of import order + kind = kind or ZConfig.SchemaError + raise_with_same_tb(self.initerror(kind(message))) class SchemaParser(BaseParser): @@ -542,11 +542,8 @@ def extendSchema(self, src): parser = SchemaParser(self._loader, src, self) - r = self._loader.openResource(src) - try: + with self._loader.openResource(src) as r: xml.sax.parse(r.file, parser) - finally: - r.close() def end_schema(self): del self._stack[-1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/schema2html.py new/ZConfig-3.5.0/ZConfig/schema2html.py --- old/ZConfig-3.4.0/ZConfig/schema2html.py 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/schema2html.py 2019-06-24 12:55:22.000000000 +0200 @@ -144,7 +144,10 @@ out = args.out or sys.stdout - schema = load_schema(args.schema, args.package, args.package_file) + if args.package: + schema = load_schema(args.package_file, args.schema) + else: + schema = load_schema(args.schema) printer_factory = HtmlSchemaPrinter if hasattr(args, 'format') and args.format == 'xml': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/sphinx.py new/ZConfig-3.5.0/ZConfig/sphinx.py --- old/ZConfig-3.4.0/ZConfig/sphinx.py 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/sphinx.py 2019-06-24 12:55:22.000000000 +0200 @@ -149,7 +149,7 @@ class SchemaToRstDirective(Directive): required_arguments = 1 - optional_arguments = 2 + optional_arguments = 0 option_spec = { 'file': str, 'members': str, @@ -157,8 +157,10 @@ } def run(self): - schema = load_schema(self.arguments[0], - True, self.options.get('file')) + schema = load_schema( + self.options.get('file', 'component.xml'), + self.arguments[0], + ) members = () if 'members' in self.options: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/tests/sphinx_test_schema.xml new/ZConfig-3.5.0/ZConfig/tests/sphinx_test_schema.xml --- old/ZConfig-3.4.0/ZConfig/tests/sphinx_test_schema.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/tests/sphinx_test_schema.xml 2019-06-24 12:55:22.000000000 +0200 @@ -0,0 +1,26 @@ +<schema> + + <!-- + This is for testing the support of schemas in our Sphinx + extension. + --> + + + <description> + This describes the schema. + </description> + + + <import package="ZConfig.components.logger" file="abstract.xml"/> + <import package="ZConfig.components.logger" file="base-logger.xml"/> + + <sectiontype name="eventlog" + datatype="ZConfig.components.logger.logger.EventLogFactory" + extends="ZConfig.logger.base-logger" + implements="ZConfig.logger.log"> + <description> + Configuration for the root logger. + </description> + </sectiontype> + +</schema> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/tests/test_loader.py new/ZConfig-3.5.0/ZConfig/tests/test_loader.py --- old/ZConfig-3.4.0/ZConfig/tests/test_loader.py 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/tests/test_loader.py 2019-06-24 12:55:22.000000000 +0200 @@ -38,8 +38,8 @@ # Files are decoded using utf-8 on open loader = ZConfig.loader.SchemaLoader() url = ZConfig.url.urljoin(CONFIG_BASE, "non-ascii.txt") - stream = loader.openResource(url) - val = stream.read() + with loader.openResource(url) as stream: + val = stream.read() self.assertEqual( val, u'# -*-coding: utf-8; mode: conf-*-\n' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig/tests/test_schema2html.py new/ZConfig-3.5.0/ZConfig/tests/test_schema2html.py --- old/ZConfig-3.4.0/ZConfig/tests/test_schema2html.py 2018-12-29 17:52:53.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig/tests/test_schema2html.py 2019-06-24 12:55:22.000000000 +0200 @@ -197,6 +197,20 @@ self.assertNotIn("SyslogHandlerFactory", doc_text) self.assertNotIn("FileHandlerFactory", doc_text) + def test_parse_package_schema(self): + text = """ + Document + ======== + .. zconfig:: ZConfig.tests + :file: sphinx_test_schema.xml + """ + document = self._parse(text) + doc_text = document.astext() + + # Check that it produced output + self.assertIn("EventLogFactory", doc_text) + self.assertIn("<eventlog>", doc_text) + def test_description_dedent(self): text = """No leading whitespace on this line. But this line has whitespace. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig.egg-info/PKG-INFO new/ZConfig-3.5.0/ZConfig.egg-info/PKG-INFO --- old/ZConfig-3.4.0/ZConfig.egg-info/PKG-INFO 2019-01-02 17:20:52.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig.egg-info/PKG-INFO 2019-06-24 12:55:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ZConfig -Version: 3.4.0 +Version: 3.5.0 Summary: Structured Configuration Library Home-page: https://github.com/zopefoundation/ZConfig/ Author: Fred L. Drake, Jr. @@ -124,12 +124,19 @@ `Python Packaging User Guide <https://packaging.python.org/>`__. - ========================== - Change History for ZConfig - ========================== + ============================ + Change History for ZConfig + ============================ + + 3.5.0 (2019-06-24) + ================== + + - Add support for documenting schema files contained in packages to + the Sphinx extension. See `issue 59 + <https://github.com/zopefoundation/ZConfig/issues/59>`_. 3.4.0 (2019-01-02) - ------------------ + ================== Many changes have been made in the support for logging configurations: @@ -174,7 +181,7 @@ 3.3.0 (2018-10-04) - ------------------ + ================== - Drop support for Python 3.3. @@ -192,7 +199,7 @@ <https://github.com/zopefoundation/ZConfig/issues/37>`_. 3.2.0 (2017-06-22) - ------------------ + ================== - Drop support for Python 2.6 and 3.2 and add support for Python 3.6. @@ -225,31 +232,31 @@ https://github.com/zopefoundation/ZConfig/issues/17 3.1.0 (2015-10-17) - ------------------ + ================== - Add ability to do variable substitution from environment variables using $() syntax. 3.0.4 (2014-03-20) - ------------------ + ================== - Added Python 3.4 support. 3.0.3 (2013-03-02) - ------------------ + ================== - Added Python 3.2 support. 3.0.2 (2013-02-14) - ------------------ + ================== - Fixed ResourceWarning in BaseLoader.openResource(). 3.0.1 (2013-02-13) - ------------------ + ================== - Removed an accidentally left `pdb` statement from the code. @@ -257,7 +264,7 @@ 3.0.0 (2013-02-13) - ------------------ + ================== - Added Python 3.3 support. @@ -265,34 +272,34 @@ 2.9.3 (2012-06-25) - ------------------ + ================== - Fixed: port values of 0 weren't allowed. Port 0 is used to request an ephemeral port. 2.9.2 (2012-02-11) - ------------------ + ================== - Adjust test classes to avoid base classes being considered separate test cases by (at least) the "nose" test runner. 2.9.1 (2012-02-11) - ------------------ + ================== - Make FileHandler.reopen thread safe. 2.9.0 (2011-03-22) - ------------------ + ================== - Allow identical redefinition of ``%define`` names. - Added support for IPv6 addresses. 2.8.0 (2010-04-13) - ------------------ + ================== - Fix relative path recognition. https://bugs.launchpad.net/zconfig/+bug/405687 @@ -301,7 +308,7 @@ 2.7.1 (2009-06-13) - ------------------ + ================== - Improved documentation @@ -309,7 +316,7 @@ 2.7.0 (2009-06-11) - ------------------ + ================== - Added a convenience function, ``ZConfig.configureLoggers(text)`` for configuring loggers. @@ -320,7 +327,7 @@ 2.6.1 (2008-12-05) - ------------------ + ================== - Fixed support for schema descriptions that override descriptions from a base schema. If multiple base schema provide descriptions but the derived schema @@ -333,7 +340,7 @@ 2.6.0 (2008-09-03) - ------------------ + ================== - Added support for file rotation by time by specifying when and interval, rather than max-size, for log files. @@ -342,7 +349,7 @@ 2.5.1 (2007-12-24) - ------------------ + ================== - Made it possible to run unit tests via 'python setup.py test' (requires setuptools on sys.path). @@ -351,7 +358,7 @@ 2.5 (2007-08-31) - ------------------------ + ================ *A note on the version number:* @@ -388,14 +395,14 @@ 2.3.1 (2005-08-21) - ------------------ + ================== - Isolated some of the case-normalization code so it will at least be easier to override. This remains non-trivial. 2.3 (2005-05-18) - ---------------- + ================ - Added "inet-binding-address" and "inet-connection-address" to the set of standard datatypes. These are similar to the "inet-address" @@ -410,7 +417,7 @@ 2.2 (2004-04-21) - ---------------- + ================ - More documentation has been written. @@ -438,7 +445,7 @@ 2.1 (2004-04-12) - ---------------- + ================ - Removed compatibility with Python 2.1 and 2.2. @@ -474,7 +481,7 @@ 2.0 (2003-10-27) - ---------------- + ================ - Configurations can import additional schema components using a new "%import" directive; this can be used to integrate 3rd-party @@ -491,7 +498,7 @@ 1.0 (2003-03-25) - ---------------- + ================ - Initial release. @@ -514,5 +521,5 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development -Provides-Extra: test Provides-Extra: docs +Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/ZConfig.egg-info/SOURCES.txt new/ZConfig-3.5.0/ZConfig.egg-info/SOURCES.txt --- old/ZConfig-3.4.0/ZConfig.egg-info/SOURCES.txt 2019-01-02 17:20:52.000000000 +0100 +++ new/ZConfig-3.5.0/ZConfig.egg-info/SOURCES.txt 2019-06-24 12:55:23.000000000 +0200 @@ -63,6 +63,7 @@ ZConfig/tests/bad-component.xml ZConfig/tests/bad-component2.xml ZConfig/tests/foosample.zip +ZConfig/tests/sphinx_test_schema.xml ZConfig/tests/support.py ZConfig/tests/test_cfgimports.py ZConfig/tests/test_cmdline.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/doc/documenting-components.rst new/ZConfig-3.5.0/doc/documenting-components.rst --- old/ZConfig-3.4.0/doc/documenting-components.rst 2018-11-30 16:16:38.000000000 +0100 +++ new/ZConfig-3.5.0/doc/documenting-components.rst 2019-06-24 12:55:22.000000000 +0200 @@ -5,10 +5,10 @@ Documenting Components ======================== -ZConfig includes a docutils directive for documenting components that -you create. This directive can function as a Sphinx extension if you -include ``ZConfig.sphinx`` in the ``extensions`` value of your Sphinx -configuration: +ZConfig includes a docutils directive for documenting components and +schemas that you create. This directive can function as a Sphinx +extension if you include ``ZConfig.sphinx`` in the ``extensions`` +value of your Sphinx configuration: .. code-block:: python @@ -24,11 +24,12 @@ .. versionadded:: 3.2.0 - Document the components found in the Python package *package-name*. + Document the components or schema found in the Python package *package-name*. By default, the contents of ``component.xml`` will be documented. You can specify the ``:file:`` option to choose a different file - from that package. + from that package. This file can refer to a schema or component + definition. Each component will have its name, type, and default value documented. The description of the component will be rendered as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ZConfig-3.4.0/setup.py new/ZConfig-3.5.0/setup.py --- old/ZConfig-3.4.0/setup.py 2019-01-02 17:15:29.000000000 +0100 +++ new/ZConfig-3.5.0/setup.py 2019-06-24 12:55:22.000000000 +0200 @@ -19,7 +19,7 @@ options = dict( name="ZConfig", - version='3.4.0', + version='3.5.0', author="Fred L. Drake, Jr.", author_email="f...@fdrake.net", maintainer="Zope Foundation and Contributors",