[Zope-dev] zcml layer argument removed zope.component 4.0?

johannes raggam raggam-nl at adm.at
Wed Nov 21 10:46:37 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,

Why was the 'layer' ZCML argument removed in zope.component 4.0?
Until now, I didn't recognize that it was "long deprecated".

Here ist the CHANGES.txt entry from pypi:
http://pypi.python.org/pypi/zope.component
"""
Removed the long-deprecated layer argument to the
zope.component.zcml.view and zope.component.zcml.resource ZCML directives.
"""

Looking at zope.component.zcml.py in 3.12.1, it says:
"""
The 'layer' argument of the 'view' directive has been deprecated.  Use
the 'type' argument instead. If you have an existing 'type' argument
IBrowserRequest, replace it with the 'layer' argument (the layer
subclasses IBrowserRequest). which subclasses BrowserRequest.
"""

The statement, that we should use the 'type' argument instead should
go into zope.component - otherwise, this helpful info is lost, since
it's removed in 4.0.

Looking at zope.component.zcml, the 'type' argument seems to define an
Interface type. So, can it be used just like the 'layer' argument?

Plone and lots of it's addons make heavy use of the 'layer' argument
in view and resource definitions.

Best,
Johannes Raggam

- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: office at programmatic.pro
web:  http://programmatic.pro
      http://bluedynamics.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCssQ0ACgkQW4mNMQxDgAcgIQCfcI1XDEZe4TuE4CouNXHZ+6of
7vAAnRK7RKxkoctsslym82PEMttet+LK
=6pX8
-----END PGP SIGNATURE-----


More information about the Zope-Dev mailing list