passing a string into zope.interface.implements causes infinite recursion

Bug #113672 reported by Martijn Faassen
2
Affects Status Importance Assigned to Milestone
Tahoe-LAFS
New
Unknown
Zope 3
Won't Fix
Low
Unassigned
zope.interface
Won't Fix
Low
Unassigned

Bug Description

We know you're not supposed to pass a stirng into zope.interface.implements, but try the following:

>>> from zope.interface import implements
>>> class Foo(object):
... implements('foo')

the prompt will hang for a while. Then we get this error:

  File "/home/faassen/buildout/grok-eggs/eggs/tmpxXgh8b/zope.interface-3.4.0a1-py2.4-linux-i686.egg/zope/interface/declarations.py", line 1370, in _normalizeargs
  File "/home/faassen/buildout/grok-eggs/eggs/tmpxXgh8b/zope.interface-3.4.0a1-py2.4-linux-i686.egg/zope/interface/declarations.py", line 1370, in _normalizeargs
  File "/home/faassen/buildout/grok-eggs/eggs/tmpxXgh8b/zope.interface-3.4.0a1-py2.4-linux-i686.egg/zope/interface/declarations.py", line 1366, in _normalizeargs
RuntimeError: maximum recursion depth exceeded in cmp

Perhaps something can be done to prevent this infinite recursion. Not urgent, but would be nice as this is rather surprising.

Changed in zope3:
importance: Undecided → Low
status: New → Confirmed
summary: - passing a string into zope.interface.implements
+ passing a string into zope.interface.implements causes infinite
+ recursion
Changed in tahoe-lafs:
status: Unknown → New
Tres Seaver (tseaver)
Changed in zope.interface:
status: New → Confirmed
importance: Undecided → Low
Changed in zope3:
status: Confirmed → Won't Fix
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.interface:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.