Permalink
Browse files

Merge msiedlarek:with-context-fix

  • Loading branch information...
2 parents 94162be + 2594a0d commit a5b4fc2cf3b9bf4723226c78ddccf9cb5cd6e923 @chrisrossi chrisrossi committed Mar 1, 2013
Showing with 8 additions and 3 deletions.
  1. +4 −0 CHANGES.txt
  2. +3 −3 pyramid_layout/zcml.py
  3. +1 −0 setup.py
View
4 CHANGES.txt
@@ -7,6 +7,10 @@ pyramid_layout changelog
- Added configure.zcml file to top-level package for easier inclusion in client
ZCML configurations.
+- Switched from `Configurator.with_context` method, which was removed from
+ Pyramid in 1.3 release, to `pyramid_zcml.with_context`. This change
+ introduces new dependency - pyramid_zcml.
+
0.7 (2012-02-06)
----------------
View
6 pyramid_layout/zcml.py
@@ -1,4 +1,4 @@
-from pyramid.config import Configurator
+from pyramid_zcml import with_context
from zope.configuration.fields import GlobalObject
from zope.interface import Interface
@@ -37,7 +37,7 @@ class IPanelDirective(Interface):
def panel(config_context, context=None, panel=None, name="", attr=None,
renderer=None):
- config = Configurator.with_context(config_context)
+ config = with_context(config_context)
config.add_panel(
context=context, panel=panel, name=name,
attr=attr, renderer=renderer)
@@ -73,7 +73,7 @@ class ILayoutDirective(Interface):
def layout(config_context, context=None, layout=None, name="", containment=None,
template=None):
- config = Configurator.with_context(config_context)
+ config = with_context(config_context)
config.add_layout(
context=context, layout=layout, name=name, containment=containment,
template=template)
View
1 setup.py
@@ -28,6 +28,7 @@
install_requires = [
'pyramid>=1.3.3', # requires mako fix
+ 'pyramid_zcml>=0.9.2', # requires `with_context()`
]
tests_require = install_requires + ['coverage', 'nose', 'mock',
'webtest']

0 comments on commit a5b4fc2

Please sign in to comment.