ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-checkins
zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/App/class_init.py Merged c105405 from 2.12 branch
by Hanno Schlichting other posts by this author
Oct 31 2009 4:04AM messages near this date
[Zope-Checkins] SVN: Zope/branches/2.10/ backport support for testing against storages other than `DemoStorage` (r80357:80358) from Zope 2.11 | [Zope-Checkins] SVN: Zope/branches/2.12/ LP #411732: Silence security declaration warnings for context and request on views protected by an interface.
Log message for revision 105406:
  Merged c105405 from 2.12 branch
  

Changed:
  U   Zope/trunk/src/App/class_init.py

-=-
Modified: Zope/trunk/src/App/class_init.py
===================================================================
--- Zope/trunk/src/App/class_init.py	2009-10-31 11:03:24 UTC (rev 105405)
+++ Zope/trunk/src/App/class_init.py	2009-10-31 11:04:38 UTC (rev 105406)
@@ -77,7 +77,10 @@
                 pr = PermissionRole(pname)
             for mname in mnames:
                 setattr(self, mname+'__roles__', pr)
-                if mname and not hasattr(self, mname):
+                if (mname and mname not in ('context', 'request') and
+                    not hasattr(self, mname)):
+                    # don't complain about context or request, as they are
+                    # frequently not available as class attributes
                     logging.getLogger("Init").warning(
                         "Class %s.%s has a security declaration for "
                         "nonexistent method %r", self.__module__,

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@[...].org
https://mail.zope.org/mailman/listinfo/zope-checkins

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved