[Checkins] SVN: zc.configuration/trunk/ The exclude directive was moved to zope.configuration. Leave only backward compatibility imports
Dan Korostelev
nadako at gmail.com
Thu Feb 26 08:43:36 EST 2009
Log message for revision 97298:
The exclude directive was moved to zope.configuration. Leave only backward compatibility imports
and tests here.
Changed:
U zc.configuration/trunk/CHANGES.txt
U zc.configuration/trunk/buildout.cfg
U zc.configuration/trunk/setup.py
U zc.configuration/trunk/src/zc/configuration/README.txt
U zc.configuration/trunk/src/zc/configuration/meta.zcml
U zc.configuration/trunk/src/zc/configuration/zcml.py
-=-
Modified: zc.configuration/trunk/CHANGES.txt
===================================================================
--- zc.configuration/trunk/CHANGES.txt 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/CHANGES.txt 2009-02-26 13:43:36 UTC (rev 97298)
@@ -2,6 +2,18 @@
Changes
*******
+1.1
+===
+
+- 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
===
Modified: zc.configuration/trunk/buildout.cfg
===================================================================
--- zc.configuration/trunk/buildout.cfg 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/buildout.cfg 2009-02-26 13:43:36 UTC (rev 97298)
@@ -1,5 +1,5 @@
[buildout]
-develop = .
+develop = . ../zope.configuration
parts = test
[test]
Modified: zc.configuration/trunk/setup.py
===================================================================
--- zc.configuration/trunk/setup.py 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/setup.py 2009-02-26 13:43:36 UTC (rev 97298)
@@ -24,7 +24,7 @@
name = "zc.configuration",
description = "Extensions to zope.configuration",
long_description = long_description,
- version = "1.0",
+ version = "1.1dev",
license = "ZPL 1.1",
packages = find_packages('src'),
include_package_data = True,
@@ -34,6 +34,6 @@
install_requires = [
'setuptools',
'zope.testing',
- 'zope.configuration',
+ 'zope.configuration>=3.5.0dev',
],
)
Modified: zc.configuration/trunk/src/zc/configuration/README.txt
===================================================================
--- zc.configuration/trunk/src/zc/configuration/README.txt 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/src/zc/configuration/README.txt 2009-02-26 13:43:36 UTC (rev 97298)
@@ -1,14 +1,18 @@
Configuration Extensions for Filtering or Inhibiting Configuration
==================================================================
-The zc.configuration package provides some configuration directives
-for inhibiting configuration. The first of these is the exclude
-directive. It is used to exclude processing of configuration
-files. It is useful when including a configuration that includes some
-other configuration that you don't want. It must be used before
-including the files to be excluded.
+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.
-First, let's look at an example. The zope.configuration.demo package
+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:
Modified: zc.configuration/trunk/src/zc/configuration/meta.zcml
===================================================================
--- zc.configuration/trunk/src/zc/configuration/meta.zcml 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/src/zc/configuration/meta.zcml 2009-02-26 13:43:36 UTC (rev 97298)
@@ -1,10 +1,8 @@
<configure xmlns="http://namespaces.zope.org/meta">
- <directive
- namespace="http://namespaces.zope.org/zope"
- name="exclude"
- schema="zope.configuration.xmlconfig.IInclude"
- handler=".zcml.exclude"
- />
+ <!--
+ the "exclude" directive definition used to be here but
+ was moved into the zope.configuration's standard directives.
+ -->
</configure>
Modified: zc.configuration/trunk/src/zc/configuration/zcml.py
===================================================================
--- zc.configuration/trunk/src/zc/configuration/zcml.py 2009-02-26 13:25:10 UTC (rev 97297)
+++ zc.configuration/trunk/src/zc/configuration/zcml.py 2009-02-26 13:43:36 UTC (rev 97298)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2009 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -11,39 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-import glob
-import zope.interface
-import zope.configuration.config
-import zope.schema
-
-def exclude(_context, file=None, package=None, files=None):
- """Exclude a zcml file
- """
-
- if files:
- if file:
- raise ValueError("Must specify only one of file or files")
- elif not file:
- file = 'configure.zcml'
-
-
- context = zope.configuration.config.GroupingContextDecorator(_context)
- if package is not None:
- context.package = package
- context.basepath = None
-
- if files:
- paths = glob.glob(context.path(files))
- paths = zip([path.lower() for path in paths], paths)
- paths.sort()
- paths = [path for (l, path) in paths]
- else:
- paths = [context.path(file)]
-
- for path in paths:
- # processFile returns a boolean indicating if the file has been
- # processed or not, it *also* marks the file as having been processed,
- # here the side effect is used to keep the given file from being
- # processed in the future
- context.processFile(path)
+# BBB: The exclude direcive was moved to zope.configuration.
+from zope.configuration.xmlconfig import exclude
More information about the Checkins
mailing list