[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/ Backported
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Aug 12 12:09:51 EDT 2004
Log message for revision 27056:
Backported
r26454 | srichter | 2004-07-13 12:28:46 -0400 (Tue, 13 Jul 2004) | 2
lines
r26455 | srichter | 2004-07-13 12:32:34 -0400 (Tue, 13 Jul 2004) | 3
lines
r26456 | srichter | 2004-07-13 12:33:41 -0400 (Tue, 13 Jul 2004) | 3
lines
r26457 | srichter | 2004-07-13 12:34:28 -0400 (Tue, 13 Jul 2004) | 2
lines
r26458 | srichter | 2004-07-13 12:37:35 -0400 (Tue, 13 Jul 2004) | 2
lines
r26459 | srichter | 2004-07-13 12:39:48 -0400 (Tue, 13 Jul 2004) | 2
lines
r26460 | srichter | 2004-07-13 12:40:26 -0400 (Tue, 13 Jul 2004) | 4
lines
r26461 | srichter | 2004-07-13 12:41:08 -0400 (Tue, 13 Jul 2004) | 2
lines
r26462 | srichter | 2004-07-13 12:44:02 -0400 (Tue, 13 Jul 2004) | 2
lines
r26463 | srichter | 2004-07-13 12:46:02 -0400 (Tue, 13 Jul 2004) | 2
lines
r26464 | srichter | 2004-07-13 12:48:13 -0400 (Tue, 13 Jul 2004) | 2
lines
r26465 | srichter | 2004-07-13 12:48:44 -0400 (Tue, 13 Jul 2004) | 4
lines
r26466 | srichter | 2004-07-13 12:49:20 -0400 (Tue, 13 Jul 2004) | 2
lines
r26467 | srichter | 2004-07-13 12:49:41 -0400 (Tue, 13 Jul 2004) | 2
lines
r26468 | srichter | 2004-07-13 12:51:32 -0400 (Tue, 13 Jul 2004) | 2
lines
r26469 | srichter | 2004-07-13 12:52:22 -0400 (Tue, 13 Jul 2004) | 2
lines
r26470 | srichter | 2004-07-13 12:53:32 -0400 (Tue, 13 Jul 2004) | 2
lines
r26471 | srichter | 2004-07-13 12:55:23 -0400 (Tue, 13 Jul 2004) | 2
lines
r26472 | srichter | 2004-07-13 12:56:24 -0400 (Tue, 13 Jul 2004) | 2
lines
r26473 | srichter | 2004-07-13 12:56:45 -0400 (Tue, 13 Jul 2004) | 2
lines
r26474 | srichter | 2004-07-13 12:57:36 -0400 (Tue, 13 Jul 2004) | 2
lines
r26475 | srichter | 2004-07-13 12:57:58 -0400 (Tue, 13 Jul 2004) | 2
lines
r26476 | srichter | 2004-07-13 12:59:11 -0400 (Tue, 13 Jul 2004) | 2
lines
r26477 | srichter | 2004-07-13 13:00:04 -0400 (Tue, 13 Jul 2004) | 4
lines
r26478 | srichter | 2004-07-13 13:00:36 -0400 (Tue, 13 Jul 2004) | 2
lines
r26479 | srichter | 2004-07-13 13:01:19 -0400 (Tue, 13 Jul 2004) | 2
lines
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/documenttemplate/dt_var.py
U Zope3/branches/ZopeX3-3.0/src/zope/exceptions/exceptionformatter.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/format.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/__init__.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/locales.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/locales/__init__.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_formats.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/__init__.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/adapter.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/declarations.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/interface.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/interfaces.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_advice.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_element.py
U Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_odd_declarations.py
U Zope3/branches/ZopeX3-3.0/src/zope/publisher/base.py
U Zope3/branches/ZopeX3-3.0/src/zope/publisher/browser.py
U Zope3/branches/ZopeX3-3.0/src/zope/publisher/http.py
U Zope3/branches/ZopeX3-3.0/src/zope/publisher/interfaces/http.py
U Zope3/branches/ZopeX3-3.0/src/zope/publisher/tests/test_browserresponse.py
U Zope3/branches/ZopeX3-3.0/src/zope/schema/_field.py
U Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_listfield.py
U Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_setfield.py
U Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_vocabulary.py
U Zope3/branches/ZopeX3-3.0/src/zope/security/proxy.py
U Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py
U Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_proxy.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/server.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_demofs.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_publisher.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/http/tests/test_commonaccesslogger.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/interfaces/ftp.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/linereceiver/lineserverchannel.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/logger/sysloglogger.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/maxsockets.py
U Zope3/branches/ZopeX3-3.0/src/zope/server/trigger.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/dummyengine.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/setpath.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/talgenerator.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/talgettext.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/markbench.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/run.py
U Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/test_talinterpreter.py
U Zope3/branches/ZopeX3-3.0/src/zope/tales/expressions.py
U Zope3/branches/ZopeX3-3.0/src/zope/tales/tales.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/documenttemplate/dt_var.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/documenttemplate/dt_var.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/documenttemplate/dt_var.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -395,7 +395,7 @@
'whole-dollars': whole_dollars,
'dollars-and-cents': dollars_and_cents,
'collection-length': len_format,
- # XXX: Gone for now
+ # TODO: Gone for now
# 'structured-text': structured_text,
# The rest are depricated:
Modified: Zope3/branches/ZopeX3-3.0/src/zope/exceptions/exceptionformatter.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/exceptions/exceptionformatter.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/exceptions/exceptionformatter.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -53,8 +53,8 @@
if revision is not None:
try:
revision = str(revision).strip()
- # XXX bare except without a comment explaining it.
- except:
+ except (ValueError, AttributeError):
+ # Just in case revisions cannot be converted to strings.
revision = '???'
return revision
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/format.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/format.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/format.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -377,7 +377,7 @@
if bin_pattern[PADDING4] is not None and post_padding > 0:
text += bin_pattern[PADDING4]*post_padding
- # XXX: Need to make sure unicode is everywhere
+ # TODO: Need to make sure unicode is everywhere
return unicode(text)
@@ -479,7 +479,7 @@
It also depends on the locale of course."""
return {
('a', 1): r'(%s|%s)' %(calendar.am, calendar.pm),
- # XXX: works for gregorian only right now
+ # TODO: works for gregorian only right now
('G', 1): r'(%s|%s)' %(calendar.eras[1][1], calendar.eras[2][1]),
('y', 2): r'([0-9]{2})',
('y', 4): r'([0-9]{4})',
@@ -570,7 +570,8 @@
('s', 2): "%.2i" %dt.second,
('S', 1): str(dt.microsecond),
('S', 2): "%.6i" %dt.microsecond,
- # XXX not yet implemented
+ # TODO: Implement the following symbols. This requires the handling of
+ # timezones.
('F', 1): str(2),
('F', 2): "%.2i" %(2),
('W', 1): str(2),
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/__init__.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/__init__.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -239,7 +239,7 @@
of user prefered languages
"""
- # XXX I'd like for there to be a symmetric interface method, one in
+ # TODO: I'd like for there to be a symmetric interface method, one in
# which an adapter is gotten for both the first arg and the second
# arg. I.e. getLanguage(obj, env)
# But this isn't a good match for the ITranslationService.translate()
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/locales.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/locales.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/interfaces/locales.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -391,8 +391,9 @@
description=u"This is a ILocaleTimeZone object."))
def getFormatter(category, length=None, name=None, calendar=u'gregorian'):
- """Get the ... XXX"""
+ """Get a date/time formatter."""
+
class ILocaleCurrency(Interface):
"""Defines a particular currency."""
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/locales/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/locales/__init__.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/locales/__init__.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -345,7 +345,7 @@
"""See zope.i18n.interfaces.ILocaleCalendar"""
day = datetime.weekday()
time = datetime.time()
- # XXX: todo
+ # TODO: Implement this method
return False
def getFirstWeekDayName(self):
@@ -604,14 +604,14 @@
pieces = filter(None,
(id.language, id.script, id.territory, id.variant))
id_string = '_'.join(pieces)
- # XXX: What about keys??? Where do I get this info from?
+ # TODO: What about keys??? Where do I get this info from?
pieces = [key+'='+type for key, type in ()]
if pieces:
id_string += '@' + ','.join(pieces)
return id_string
def getInheritedSelf(self):
- """See XXX...
+ """See zope.i18n.interfaces.locales.ILocaleInheritance
This is the really interesting method that looks up the next (more
general) Locale object. This is used in case this locale object does
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_formats.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_formats.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_formats.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -229,14 +229,14 @@
datetime.datetime(2003, 01, 02, 21, 48, 01))
# German long
- # XXX The parser does not support timezones yet.
+ # TODO: The parser does not support timezones yet.
self.assertEqual(self.format.parse(
'2. Januar 2003 21:48:01 +100',
'd. MMMM yyyy HH:mm:ss z'),
datetime.datetime(2003, 01, 02, 21, 48, 01))
# German full
- # XXX The parser does not support timezones yet.
+ # TODO: The parser does not support timezones yet.
self.assertEqual(self.format.parse(
'Donnerstag, 2. Januar 2003 21:48 Uhr +100',
"EEEE, d. MMMM yyyy H:mm' Uhr 'z"),
@@ -271,14 +271,14 @@
'02.01.2003 21:48:01')
# German long
- # XXX The parser does not support timezones yet.
+ # TODO: The parser does not support timezones yet.
self.assertEqual(self.format.format(
datetime.datetime(2003, 01, 02, 21, 48, 01),
'd. MMMM yyyy HH:mm:ss z'),
'2. Januar 2003 21:48:01 +000')
# German full
- # XXX The parser does not support timezones yet.
+ # TODO: The parser does not support timezones yet.
self.assertEqual(self.format.format(
datetime.datetime(2003, 01, 02, 21, 48),
"EEEE, d. MMMM yyyy H:mm' Uhr 'z"),
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/__init__.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/__init__.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -15,12 +15,10 @@
This package implements the Python "scarecrow" proposal.
-The package exports two names, 'Interface' and 'Attribute' directly.
-Interface is used to create an interface with a class statement, as
-in:
+The package exports two objects, `Interface` and `Attribute` directly. It also
+exports several helper methods. Interface is used to create an interface with
+a class statement, as in:
-
-
class IMyInterface(Interface):
'''Interface documentation
'''
@@ -32,41 +30,24 @@
# Note that there is no self argument
To find out what you can do with interfaces, see the interface
-interface, IInterface in the IInterface module.
+interface, `IInterface` in the `interfaces` module.
The package has several public modules:
- XXX This docstring needs to be updated after the Grand Renaming.
+ o `declarations` provides utilities to declare interfaces on objects. It
+ also provides a wide range of helpful utilities that aid in managing
+ declared interfaces. Most of its public names are however imported here.
- o Attribute has the implementation for interface attributes
- for people who want to build interfaces by hand.
- (Maybe someone should cry YAGNI for this. ;)
+ o `document` has a utility for documenting an interface as structured text.
- o Document has a utility for documenting an interface as structured text.
+ o `exceptions` has the interface-defined exceptions
- o Exceptions has the interface-defined exceptions
+ o `interfaces` contains a list of all public interfaces for this package.
- o IAttribute defines the attribute descriptor interface.
+ o `verify` has utilities for verifying implementations of interfaces.
- o IElement defined the base interface for IAttribute, IInterface,
- and IMethod.
-
- o IInterface defines the interface interface
-
- o IMethod defined the method interface.
-
- o Implements has various utilities for examining interface assertions.
-
- o Method has the implementation for interface methods. See above.
-
- o Verify has utilities for verifying (sort of) interfaces.
-
See the module doc strings for more information.
-There is also a script, pyskel.py in the package that can be used to
-create interface skeletons. Run it without arguments to get documentation.
-
-Revision information:
$Id$
"""
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/adapter.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/adapter.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/adapter.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -610,7 +610,7 @@
for key, value in adapters.iteritems():
- # XXX Backward compatability
+ # TODO: Backward compatability
# Don't need to handle 3-tuples some day
try:
(subscription, with, name, target) = key
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/declarations.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/declarations.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/declarations.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -391,7 +391,7 @@
# Return it.
return spec
- # XXX need old style __implements__ compatibility?
+ # TODO: need old style __implements__ compatibility?
# Hm, there's an __implemented__, but it's not a spec. Must be
# an old-style declaration. Just compute a spec for it
return Declaration(*_normalizeargs((spec, )))
@@ -404,7 +404,7 @@
if spec is not None:
return spec
- # XXX need old style __implements__ comptability?
+ # TODO: need old style __implements__ comptability?
if spec is not None:
# old-style __implemented__ = foo declaration
spec = (spec, ) # tuplefy, as it might be just an int
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/interface.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/interface.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/interface.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -755,22 +755,21 @@
# __eq__, which is really fast.
"""Make interfaces sortable
- It would ne nice if:
+ TODO: It would ne nice if:
More specific interfaces should sort before less specific ones.
Otherwise, sort on name and module.
But this is too complicated, and we're going to punt on it
- for now. XXX
+ for now.
- XXX For now, sort on interface and module name.
+ For now, sort on interface and module name.
None is treated as a pseudo interface that implies the loosest
contact possible, no contract. For that reason, all interfaces
sort before None.
"""
-
if o1 == o2:
return 0
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/interfaces.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/interfaces.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/interfaces.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -52,10 +52,29 @@
class IMethod(IAttribute):
"""Method attributes
"""
- # XXX What the heck should methods provide? Grrrr
+ def getSignatureInfo():
+ """Returns the signature information.
+
+ This method returns a dictionary with the following keys:
+
+ o `positional` - All positional arguments.
+
+ o `required` - A list of all required arguments.
+
+ o `optional` - A list of all optional arguments.
+
+ o `varargs' - The name of the varargs argument.
+
+ o `kwargs` - The name of the kwargs argument.
+ """
+
def getSignatureString():
"""Return a signature string suitable for inclusion in documentation.
+
+ This method returns the function signature string. For example, if you
+ have `func(a, b, c=1, d='f')`, then the signature string is `(a, b,
+ c=1, d='f')`.
"""
class ISpecification(Interface):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_advice.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_advice.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_advice.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -173,23 +173,5 @@
def test_suite():
return TestSuite([makeSuite(t,'check') for t in TestClasses])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+if __name__ == '__main__':
+ unittest.main(defaultTest=test_suite)
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_element.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_element.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_element.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -11,10 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""XXX short summary goes here.
+"""Test Element meta-class.
-XXX longer description goes here.
-
$Id$
"""
@@ -43,4 +41,4 @@
if __name__ == '__main__':
- unittest.main()
+ unittest.main(defaultTest=test_suite)
Modified: Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_odd_declarations.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_odd_declarations.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/interface/tests/test_odd_declarations.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -36,9 +36,9 @@
class B(Odd): __implemented__ = I2
-# XXX We are going to need more magic to make classProvides work with odd
-# classes. This will work in the next iteration. For now, we'll use
-# a different mechanism.
+# TODO: We are going to need more magic to make classProvides work with odd
+# classes. This will work in the next iteration. For now, we'll use
+# a different mechanism.
# from zope.interface import classProvides
Modified: Zope3/branches/ZopeX3-3.0/src/zope/publisher/base.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/publisher/base.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/publisher/base.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -305,7 +305,7 @@
if body is None:
s = self._body_instream
if s is None:
- return None # XXX what should be returned here?
+ return None # TODO: what should be returned here?
p = s.tell()
s.seek(0)
body = s.read()
Modified: Zope3/branches/ZopeX3-3.0/src/zope/publisher/browser.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/publisher/browser.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/publisher/browser.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -710,10 +710,10 @@
base += '/'
location = base + location
- # XXX: HTTP redirects must provide an absolute location, see
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
- # So, what if location is relative and base is unknown? Uncomment
- # the following and you'll see that it actually happens.
+ # TODO: HTTP redirects must provide an absolute location, see
+ # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
+ # So, what if location is relative and base is unknown? Uncomment
+ # the following and you'll see that it actually happens.
#
# if isRelative(str(location)):
# raise AssertionError('Cannot determine absolute location')
Modified: Zope3/branches/ZopeX3-3.0/src/zope/publisher/http.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/publisher/http.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/publisher/http.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -853,7 +853,8 @@
cookie = '%s; Secure' % cookie
cookie_list.append(cookie)
- # XXX: Should really check size of cookies here!
+ # TODO: Should really check size of cookies here!
+ # Why?
return cookie_list
Modified: Zope3/branches/ZopeX3-3.0/src/zope/publisher/interfaces/http.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/publisher/interfaces/http.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/publisher/interfaces/http.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -208,7 +208,7 @@
class IHTTPCredentials(Interface):
- # XXX Eventially this will be a different method
+ # TODO: Eventially this will be a different method
def _authUserPW():
"""Return (login, password) if there are basic credentials;
return None if there aren't."""
Modified: Zope3/branches/ZopeX3-3.0/src/zope/publisher/tests/test_browserresponse.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/publisher/tests/test_browserresponse.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/publisher/tests/test_browserresponse.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -13,8 +13,6 @@
##############################################################################
"""Browser response tests
-XXX longer description goes here.
-
$Id$
"""
@@ -23,7 +21,7 @@
from StringIO import StringIO
from zope.interface.verify import verifyObject
-# XXX Waaa need more tests
+# TODO: Waaa need more tests
class TestBrowserResponse(TestCase):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/schema/_field.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/schema/_field.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/schema/_field.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -130,7 +130,7 @@
implements(IBytesLine)
def constraint(self, value):
- # XXX we should probably use a more general definition of newlines
+ # TODO: we should probably use a more general definition of newlines
return '\n' not in value
Modified: Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_listfield.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_listfield.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_listfield.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -90,7 +90,7 @@
self.assertRaises(WrongContainedType, field.validate, [3.14159,] )
def testCorrectValueType(self):
- # allow value_type of None (XXX)
+ # TODO: We should not allow for a None valeu type.
List(value_type=None)
# do not allow arbitrary value types
Modified: Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_setfield.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_setfield.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_setfield.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -99,7 +99,7 @@
field.validate, sets.Set((3.14159,)))
def testCorrectValueType(self):
- # allow value_type of None (XXX)
+ # TODO: We should not allow for a None valeu type.
Set(value_type=None)
# do not allow arbitrary value types
Modified: Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_vocabulary.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_vocabulary.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/schema/tests/test_vocabulary.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -55,7 +55,7 @@
r = vocabulary.getVocabularyRegistry()
self.assert_(interfaces.IVocabularyRegistry.providedBy(r))
- # XXX still need to test the default implementation
+ # TODO: still need to test the default implementation
class SampleTerm:
pass
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/proxy.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/proxy.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/proxy.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -32,7 +32,7 @@
trusted and the proxy can always be recreated by calling the
proxy factory and getting back a proxy with the same checker.
- XXX More thought needs to be given to assuring this contract.
+ TODO: More thought needs to be given to assuring this contract.
"""
if ((type(object) is Proxy) and
isinstance(getChecker(object), TrustedCheckerBase)
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -315,7 +315,7 @@
self.assertRaises(Forbidden, checker.check_setattr, inst, 'a')
self.assertRaises(Forbidden, checker.check_setattr, inst, 'z')
- # XXX write a test to see that
+ # TODO: write a test to see that
# Checker.check/check_setattr handle permission
# values that evaluate to False
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_proxy.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_proxy.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_proxy.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -286,7 +286,7 @@
self.shouldFail(lambda x, y: eval(expr), x, y)
def test_inplace(self):
- # XXX should test all inplace operators...
+ # TODO: should test all inplace operators...
P = self.c.proxy
pa = P(1)
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/server.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/server.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/server.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -359,7 +359,7 @@
port = int(info[4])*256 + int(info[5])
# how many data connections at a time?
# I'm assuming one for now...
- # XXX: we should (optionally) verify that the
+ # TODO: we should (optionally) verify that the
# ip number belongs to the client. [wu-ftpd does this?]
self.client_addr = (ip, port)
self.reply('SUCCESS_200', 'PORT')
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_demofs.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_demofs.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_demofs.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -11,13 +11,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""XXX short summary goes here.
+"""Test the Demo Filesystem implementation.
-XXX longer description goes here.
-
$Id$
"""
-
import demofs
from unittest import TestCase, TestSuite, main, makeSuite
from fstests import FileSystemTests
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_publisher.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_publisher.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/ftp/tests/test_publisher.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -11,13 +11,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""XXX short summary goes here.
+"""Test the FTP publisher.
-XXX longer description goes here.
-
$Id$
"""
-
import demofs
from unittest import TestCase, TestSuite, main, makeSuite
from fstests import FileSystemTests
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/http/tests/test_commonaccesslogger.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/http/tests/test_commonaccesslogger.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/http/tests/test_commonaccesslogger.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -34,10 +34,10 @@
self.assert_(logger.output.logger.name, 'accesslog')
self.assert_(logger.output.logger.level, logging.INFO)
- # XXX please add unit tests for other methods as well:
- # compute_timezone_for_log
- # log_date_string
- # log
+ # TODO: please add unit tests for other methods as well:
+ # compute_timezone_for_log
+ # log_date_string
+ # log
def test_suite():
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/interfaces/ftp.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/interfaces/ftp.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/interfaces/ftp.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -9,14 +9,10 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
-"""XXX short summary goes here.
+"""FTP server specific interfaces.
-XXX longer description goes here.
-
$Id$
"""
-__metaclass__ = type
-
from zope.interface import Interface
class IFTPCommandHandler(Interface):
@@ -179,15 +175,15 @@
# '!' requires write access
#
not_implemented_commands = {
- 'acct': 'specify account (ignored)',
- 'allo': 'allocate storage (vacuously)',
- 'site': 'non-standard commands (see next section)',
- 'stou': 'store a file with a unique name', #!
- 'xcup': 'change to parent of current working directory (deprecated)',
- 'xcwd': 'change working directory (deprecated)',
- 'xmkd': 'make a directory (deprecated)', #!
- 'xpwd': 'print the current working directory (deprecated)',
- 'xrmd': 'remove a directory (deprecated)', #!
+ 'acct': 'specify account (ignored)',
+ 'allo': 'allocate storage (vacuously)',
+ 'site': 'non-standard commands (see next section)',
+ 'stou': 'store a file with a unique name', #!
+ 'xcup': 'change to parent of current working directory (deprecated)',
+ 'xcwd': 'change working directory (deprecated)',
+ 'xmkd': 'make a directory (deprecated)', #!
+ 'xpwd': 'print the current working directory (deprecated)',
+ 'xrmd': 'remove a directory (deprecated)', #!
}
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/linereceiver/lineserverchannel.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/linereceiver/lineserverchannel.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/linereceiver/lineserverchannel.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -100,7 +100,7 @@
if flush:
self.flush(0)
- # XXX: Some logging should go on here.
+ # TODO: Some logging should go on here.
def exception(self):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/logger/sysloglogger.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/logger/sysloglogger.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/logger/sysloglogger.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -28,10 +28,10 @@
appropriate for FTP or HTTP logs, but not for dumping stderr
to.
- XXX: a simple safety wrapper that will ensure that the line
+ TODO: a simple safety wrapper that will ensure that the line
sent to syslog is reasonable.
- XXX: async version of syslog_client: now, log entries use
+ TODO: async version of syslog_client: now, log entries use
blocking send()
"""
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/maxsockets.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/maxsockets.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/maxsockets.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -10,7 +10,7 @@
# 4) max we can connect
def max_server_sockets():
- # XXX This should be a configuration value as it takes a long time to
+ # TODO: This should be a configuration value as it takes a long time to
# compute on Mac OSX
return 100
sl = []
@@ -29,7 +29,7 @@
return num
def max_client_sockets():
- # XXX This should be a configuration value as it takes a long time to
+ # TODO: This should be a configuration value as it takes a long time to
# compute on Mac OSX
return 100
# make a server socket
@@ -53,7 +53,7 @@
return num
def max_select_sockets():
- # XXX This should be a configuration value as it takes a long time to
+ # TODO: This should be a configuration value as it takes a long time to
# compute on Mac OSX
return 100
sl = []
Modified: Zope3/branches/ZopeX3-3.0/src/zope/server/trigger.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/server/trigger.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/server/trigger.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -117,7 +117,7 @@
else:
- # XXX Should define a base class that has the common methods and
+ # TODO: Should define a base class that has the common methods and
# then put the platform-specific in a subclass named trigger.
# win32-safe version
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/dummyengine.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/dummyengine.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/dummyengine.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -144,11 +144,11 @@
return text
def evaluateStructure(self, expr):
- # XXX Should return None or a DOM tree
+ # TODO Should return None or a DOM tree
return self.evaluate(expr)
def evaluateSequence(self, expr):
- # XXX Should return a sequence
+ # TODO: Should return a sequence
return self.evaluate(expr)
def evaluateMacro(self, macroName):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/setpath.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/setpath.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/setpath.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -11,15 +11,14 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
-Read a module search path from .path file.
+"""Read a module search path from .path file.
If .path file isn't found in the directory of the setpath.py module, then try
to import ZODB. If that succeeds, we assume the path is already set up
correctly. If that import fails, an IOError is raised.
"""
-# XXX Why does this want to find ZODB ???
+# TODO: Why does this want to find ZODB ???
import os
import sys
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/talgenerator.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/talgenerator.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/talgenerator.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -557,7 +557,7 @@
# Hack to include preceding whitespace in the loop program
repeatWhitespace = self.unEmitNewlineWhitespace()
if position != (None, None):
- # XXX at some point we should insist on a non-trivial position
+ # TODO: at some point we should insist on a non-trivial position
self.emit("setPosition", position)
if self.inMacroUse:
if fillSlot:
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/talgettext.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/talgettext.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/talgettext.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -70,16 +70,16 @@
class POTALInterpreter(TALInterpreter):
def translate(self, msgid, default, i18ndict=None, obj=None):
- # XXX is this right?
+ # If no i18n dict exists yet, create one.
if i18ndict is None:
i18ndict = {}
if obj:
i18ndict.update(obj)
- # XXX Mmmh, it seems that sometimes the msgid is None; is that really
+ # Mmmh, it seems that sometimes the msgid is None; is that really
# possible?
if msgid is None:
return None
- # XXX We need to pass in one of context or target_language
+ # TODO: We need to pass in one of context or target_language
return self.engine.translate(msgid, self.i18nContext.domain, i18ndict,
position=self.position, default=default)
@@ -104,8 +104,8 @@
return True # dummy
def translate(self, msgid, domain=None, mapping=None, default=None,
- # XXX position is not part of the ITALExpressionEngine
- # interface
+ # Position is not part of the ITALExpressionEngine
+ # interface
position=None):
# Make the message is a MessageID object, if the default differs
@@ -191,7 +191,7 @@
# Skip empty lines
if not l.strip():
continue
- # XXX: Does this always follow Python escape semantics?
+ # TODO: Does this always follow Python escape semantics?
l = eval(l)
if section == ID:
msgid += l
@@ -293,7 +293,7 @@
'version': __version__}
msgids = catalog.keys()
- # XXX: You should not sort by msgid, but by filename and position. (SR)
+ # TODO: You should not sort by msgid, but by filename and position. (SR)
msgids.sort()
for msgid in msgids:
positions = engine.catalog[msgid]
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/markbench.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/markbench.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/markbench.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -154,7 +154,7 @@
rc = os.spawnl(os.P_WAIT, sys.executable,
sys.executable, "test.py", "zope.tal.tests")
if rc > 0:
- # XXX Failing tests don't cause test.py to report an
+ # TODO: Failing tests don't cause test.py to report an
# error; not sure why. ;-(
sys.exit(rc)
elif rc < 0:
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/run.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/run.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/run.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -12,8 +12,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Run all tests."""
+"""Run all tests.
+$Id: $
+"""
import sys
import unittest
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/test_talinterpreter.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/test_talinterpreter.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tal/tests/test_talinterpreter.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -377,7 +377,7 @@
suite.addTest(unittest.makeSuite(ScriptTestCase))
suite.addTest(unittest.makeSuite(I18NCornerTestCase))
- # XXX: Deactivated test, since we have not found a solution for this and
+ # TODO: Deactivated test, since we have not found a solution for this and
# it is a deep and undocumented HTML parser issue.
# Fred is looking into this.
#suite.addTest(unittest.makeSuite(MacroFunkyErrorTest))
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tales/expressions.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tales/expressions.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tales/expressions.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -135,7 +135,7 @@
ob = self._traverser(ob, val, econtext)
elif callable(element):
ob = element(ob)
- # XXX: Once we have n-ary adapters, use them.
+ # TODO: Once we have n-ary adapters, use them.
if ITALESFunctionNamespace.providedBy(ob):
ob.setEngine(econtext)
else:
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tales/tales.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tales/tales.py 2004-08-12 15:58:34 UTC (rev 27055)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tales/tales.py 2004-08-12 16:09:51 UTC (rev 27056)
@@ -715,7 +715,7 @@
evaluateStructure = evaluate
def evaluateMacro(self, expr):
- # XXX Should return None or a macro definition
+ # TODO: Should return None or a macro definition
return self.evaluate(expr)
evaluateMacro = evaluate
More information about the Zope3-Checkins
mailing list