diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-16 20:50:28 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-16 20:50:28 -0500 |
| commit | 34f44d844ffe75738046a154202a6faf4d5dfc38 (patch) | |
| tree | ae8b0e351ba3a0c92bedcea80913f39c757250bb | |
| parent | b68aadc3867a95a6376bb2157cc93210eb62a104 (diff) | |
| download | pyramid-34f44d844ffe75738046a154202a6faf4d5dfc38.tar.gz pyramid-34f44d844ffe75738046a154202a6faf4d5dfc38.tar.bz2 pyramid-34f44d844ffe75738046a154202a6faf4d5dfc38.zip | |
- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and
``pyramid.zcml.file_configure``.
- The ``pyramid.testing.zcml_configure`` API has been removed. It had been
advertised as removed since 1.2a1, but hadn't actually been.
| -rw-r--r-- | CHANGES.txt | 9 | ||||
| -rw-r--r-- | TODO.txt | 7 | ||||
| -rw-r--r-- | pyramid/testing.py | 3 | ||||
| -rw-r--r-- | pyramid/tests/test_zcml.py | 4 | ||||
| -rw-r--r-- | pyramid/zcml.py | 12 |
5 files changed, 25 insertions, 10 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index d132b4e71..28637c1a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,15 @@ Bug Fixes ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``, ``render_template``, and ``render_template_to_response``. +- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and + ``pyramid.zcml.file_configure``. + +Backwards Incompatibilities +--------------------------- + +- The ``pyramid.testing.zcml_configure`` API has been removed. It had been + advertised as removed since 1.2a1, but hadn't actually been. + Deprecations ------------ @@ -118,11 +118,4 @@ Configurator.add_translation_dirs: not passed any context but a message, can't credibly be removed. -- Add deprecation warnings for: - - - settings.get_settings - - - zcml.zcml_configure - - - zcml.file_configure diff --git a/pyramid/testing.py b/pyramid/testing.py index 84ab77935..4bc4728c0 100644 --- a/pyramid/testing.py +++ b/pyramid/testing.py @@ -20,9 +20,6 @@ from pyramid.security import Everyone from pyramid.security import has_permission from pyramid.threadlocal import get_current_registry from pyramid.threadlocal import manager -from pyramid.zcml import zcml_configure # API - -zcml_configure # prevent pyflakes from complaining _marker = object() diff --git a/pyramid/tests/test_zcml.py b/pyramid/tests/test_zcml.py index f4a6e81b6..905a53287 100644 --- a/pyramid/tests/test_zcml.py +++ b/pyramid/tests/test_zcml.py @@ -803,6 +803,8 @@ class TestZCMLConfigure(unittest.TestCase): return zcml_configure(path, package) def setUp(self): + from zope.deprecation import __show__ + __show__.off() testing.setUp() self.tempdir = None import sys @@ -822,6 +824,8 @@ class TestZCMLConfigure(unittest.TestCase): self.tempdir = tempdir def tearDown(self): + from zope.deprecation import __show__ + __show__.on() testing.tearDown() import sys import shutil diff --git a/pyramid/zcml.py b/pyramid/zcml.py index a2fdec314..3104ebac0 100644 --- a/pyramid/zcml.py +++ b/pyramid/zcml.py @@ -6,6 +6,8 @@ from zope.configuration.fields import GlobalInterface from zope.configuration.fields import GlobalObject from zope.configuration.fields import Tokens +from zope.deprecation import deprecated + from zope.interface import Interface from zope.interface import implementedBy from zope.interface import providedBy @@ -937,6 +939,16 @@ def zcml_configure(name, package): file_configure = zcml_configure # backwards compat (>0.8.1) +deprecated( + 'zcml_configure', + '(pyramid.zcml.zcml_configure is deprecated as of Pyramid 1.0. Use' + '``pyramid.configuration.Configurator.load_zcml`` instead.) ') + +deprecated( + 'file_configure', + '(pyramid.zcml.file_configure is deprecated as of Pyramid 1.0. Use' + '``pyramid.configuration.Configurator.load_zcml`` instead.) ') + def _rolledUpFactory(factories): def factory(ob): for f in factories: |
