Hanno Schlichting wrote at 2007-9-8 00:47 +0200: > ... >My suggestion on this would be to make request.locale available in Zope >2.11. It would not be available through any of the other means like >request['locale'] or request.form['locale'] but just as a simple >property on the request itself. > >You would still be able to override it, but the set method for it would >emit a deprecation warning telling you that you should not use this >specific name anymore. > >The only backward incompatible change this would introduce from what I >can tell is that checking for the presence of request.locale would >suddenly give you a true value whereas it would have raised an error >before. Given the unlikelihood of this and the major benefit of being >able to use more unchanged Zope3 code, I personally would find this >acceptable.
The backward incompatibility is a bit bigger: It arises when "locale" is used as a form variable or as a cookie (or used in "Request.set"). Old code can assume that "request.XXXX" and "request['XXXX']" usually returns the same value, at least for 'locale'. This changes when you add "locale" as an attribute. -- Dieter _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )