[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.11

Nathan R. Yergler nathan@yergler.net
Tue, 25 Mar 2003 15:50:17 -0500


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv29972/security

Modified Files:
	checker.py 
Log Message:
timedelta, date, time, datetime objects made rocks after verifying with Tim that they are immutable.


=== Zope3/src/zope/security/checker.py 1.10 => 1.11 ===
--- Zope3/src/zope/security/checker.py:1.10	Wed Mar 12 05:11:15 2003
+++ Zope3/src/zope/security/checker.py	Tue Mar 25 15:50:16 2003
@@ -368,6 +368,10 @@
     str: NoProxy,
     unicode: NoProxy,
     type(True): NoProxy, # Boolean, if available :)
+    datetime.timedelta: NoProxy,
+    datetime.datetime: NoProxy,
+    datetime.date: NoProxy,
+    datetime.time: NoProxy,
 }
 
 class _Sequence(object):
@@ -399,31 +403,6 @@
     type(iter(())): _iteratorChecker, # different in Python 2.3.
     type(iter(_Sequence())): NamesChecker(['next']),
     type(Interface): _interfaceChecker,
-    datetime.timedelta: NamesChecker(['__str__', '__add__', '__radd__',
-                                      '__sub__', '__rsub__', '__neg__',
-                                      '__pos__', '__abs__', '__mul__',
-                                      '__rmul__', '__div__', '__floordiv__',
-                                      '__cmp__', 'days', 'seconds',
-                                      'microseconds']),
-    datetime.date: NamesChecker(['__str__', 'year', 'month', 'day',
-                                 'timetuple', 'toordinal', '__cmp__',
-                                 '__hash__', 'ctime', 'strftime', '__add__',
-                                 '__radd__', '__sub__', '__rsub__', 'weekday',
-                                 'isoweekday', 'isocalendar', 'isoformat',
-                                 'min', 'max', 'resolution']),
-    datetime.datetime: NamesChecker([
-      '__str__', 'year', 'month', 'day', 'hour', 'minute',
-      'second', 'microsecond', 'tzinfo', 'timetuple', 'utctimetuple',
-      'toordinal', '__cmp__', '__hash__', 'ctime', 'strftime',
-      '__add__', '__radd__', '__sub__', '__rsub__', 'weekday',
-      'isoweekday', 'isocalendar', 'isoformat', 'min', 'max',
-      'resolution', 'utcoffset', 'tzname', 'dst', 'date', 'time',
-      'timetz'
-      ]),
-    datetime.time: NamesChecker(['hour', 'minute', 'second', 'microsecond',
-                                 '__cmp__', '__hash__', '__str__', 'isoformat',
-                                 'strftime', 'min', 'max', 'resolution',
-                                 'tzinfo', 'utcoffset', 'tzname', 'dst'])
 }