zope.configuration extensions to filter out unwanted configuration
******************************************************************
.. contents::
CHANGES
*******
1.2.0 (2017-04-17)
------------------
- Added ``MANIFEST.in``.
- Using Python's ``doctest`` module instead of depreacted
``zope.testing.doctest``.
1.1 (2009-02-26)
----------------
- Move the ``exclude`` directive into the original ``zope.configuration``
package.
So, this package is currently contains only a backward-compatibility
import for ``exclude`` directive and is not useful anymore. However
it's intended to contain miscellaneous extensions to the configuration
framework and may contain more in future, so we are not marking is
as deprecated for now.
1.0 (2007-09-29)
----------------
Initial release.
Detailed Documentation
**********************
Configuration Extensions for Filtering or Inhibiting Configuration
==================================================================
The zc.configuration package used to provide the ``exclude`` directive
for inhibiting configuration. It was included in the zope.configuration
and this package currently provides a backward-compatibility imports
and tests that ensure that it will work for people who are already
using zc.configuration and not the newer zope.configuration.
This package may contain more configuration extensions in future, but
currently, it's not useful anymore as the only feature it provided,
the ``exclude`` directive was merged into the original
``zope.configuration`` package.
First, let's look at an example. The zc.configuration.demo package
has a ZCML configuration that includes some other configuration files.
We'll set a log handler so we can see what's going on:
>>> import logging, sys
>>> logger = logging.getLogger('config')
>>> oldlevel = logger.level
>>> logger.setLevel(logging.DEBUG)
>>> handler = logging.StreamHandler(sys.stdout)
>>> logger.addHandler(handler)
Now, we'll include the zc.configuration.demo config:
>>> from zope.configuration import xmlconfig
>>> _ = xmlconfig.string('<include package="zc.configuration.demo" />')
include /zc.configuration/src/zc/configuration/demo/configure.zcml
include /zc.configuration/src/zc/configuration/demo/sub/configure.zcml
include /zc.configuration/src/zc/configuration/demo/spam.zcml
Each run of the configuration machinery runs with fresh state, so
rerunning gives the same thing:
>>> _ = xmlconfig.string('<include package="zc.configuration.demo" />')
include /zc.configuration/src/zc/configuration/demo/configure.zcml
include /zc.configuration/src/zc/configuration/demo/sub/configure.zcml
include /zc.configuration/src/zc/configuration/demo/spam.zcml
Now, we'll load the zc.configuration meta.zcml and use the exclude
directive to exclude the two files included by the configuration file
in zc.configuration.demo:
>>> _ = xmlconfig.string(
... '''
... <configure xmlns="http://namespaces.zope.org/zope">
... <include package="zc.configuration" file="meta.zcml" />
... <exclude package="zc.configuration.demo.sub" />
... <exclude package="zc.configuration.demo" file="spam.zcml" />
... <include package="zc.configuration.demo" />
... </configure>
... ''')
include /zc.configuration/src/zc/configuration/meta.zcml
include /zc.configuration/src/zc/configuration/demo/configure.zcml
.. cleanup
>>> logger.setLevel(oldlevel)
>>> logger.removeHandler(handler)
Download
********
Metadata
Release files for zc.configuration 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zc.configuration-1.2.0.tar.gz | 7.1 kB | Without provenance | Details |
Release files / zc.configuration-1.2.0.tar.gz
| Download URL | zc.configuration-1.2.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd22cf843e7ed8c7abbaa0e3b3b2adb30659bd3825d0d2a068356aafbe6654e4
|
|
BLAKE2b-256 checksum How to use checksums |
e859131a99e203ee4654a5474788ed8df7804d055079df9ab6d6e98172fa1d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for zc.configuration 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.