Opened 16 years ago

Closed 13 years ago

#1878 defect closed wontfix (wontfix)

twisted.web.monitor traceback, AttributeError: class IChangeNotified has no attribute '__class__'

Reported by: misc@… Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: Thijs Triemstra, Jean-Paul Calderone Branch:
Author:

Description (last modified by Jean-Paul Calderone)

~ $ python /usr/share/doc/python-twisted-web-0.6.0/examples/webmon.py http://sisay.ephaone.org/~misc/tmp/tmp.rss
Traceback (most recent call last):
  File "/usr/share/doc/python-twisted-web-0.6.0/examples/webmon.py", line 6, in ?
    from twisted.web import monitor
  File "/usr/lib64/python2.4/site-packages/twisted/web/monitor.py", line 14, in ?
    class BaseChangeNotified:
  File "/usr/lib64/python2.4/site-packages/zope/interface/advice.py", line 132, in advise
    return callback(newClass)
  File "/usr/lib64/python2.4/site-packages/zope/interface/declarations.py", line 550, in _implements_advice
    classImplements(cls, *interfaces)
  File "/usr/lib64/python2.4/site-packages/zope/interface/declarations.py", line 527, in classImplements
    spec.declared += tuple(_normalizeargs(interfaces))
  File "/usr/lib64/python2.4/site-packages/zope/interface/declarations.py", line 1345, in _normalizeargs
    _normalizeargs(v, output)
  File "/usr/lib64/python2.4/site-packages/zope/interface/declarations.py", line 1340, in _normalizeargs
    cls = sequence.__class__
AttributeError: class IChangeNotified has no attribute '__class__'

It seems IChangeNotified need to inherit from components.Interface, i will attach a patch.

Attachments (2)

twisted.monitor.fix1878.patch (393 bytes) - added by misc@… 16 years ago.
patch that fix the issue
monitor-1878.patch (489 bytes) - added by collab 14 years ago.
Patch against r24190

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by misc@…

patch that fix the issue

comment:1 Changed 16 years ago by Jean-Paul Calderone

Description: modified (diff)

Actually this code looks stupid and has no tests. I think it should be deleted.

comment:2 Changed 16 years ago by jknight

From what I can see, it has two examples but no documentation or tests at all: ./doc/web/examples/tkwebmon.py ./doc/web/examples/webmon.py

I'm not really sure why that's pat of twisted.web at all, either. And it looks like it's probably been broken since August 2004 without anybody noticing so I think deleting it is probably not such a bad plan.

Changed 14 years ago by collab

Attachment: monitor-1878.patch added

Patch against r24190

comment:3 in reply to:  1 Changed 14 years ago by collab

Cc: collab added

Replying to exarkun:

Actually this code looks stupid and has no tests. I think it should be deleted.

As long as the monitor module is still distributed in Twisted releases it would be probably not hurt to fix these imports, especially when there's 2 examples using it and it's a really simple fix. I attached an updated patch.

comment:4 Changed 14 years ago by collab

Keywords: review added
Owner: jknight deleted

Putting this patch up for review.

comment:5 Changed 14 years ago by Jean-Paul Calderone

Keywords: review removed

Hmm. I should have deleted it two years ago. :)

Any interest in writing tests for this code, collab? I could see how it might be useful, but it needs docs and tests. Also, I think the interface is probably adding minimal value here. Deleting it and adding docstrings to BaseChangeNotified and its methods would simplify it and make it possible to use.

comment:6 Changed 14 years ago by Jean-Paul Calderone

Owner: set to collab

comment:7 in reply to:  5 Changed 14 years ago by collab

Status: newassigned

Replying to exarkun:

Deleting it and adding docstrings to BaseChangeNotified and its methods would simplify it and make it possible to use.

I could give that a try..

comment:8 Changed 14 years ago by Thijs Triemstra

Cc: Thijs Triemstra added; collab removed
Owner: changed from collab to Thijs Triemstra
Status: assignednew

comment:9 Changed 13 years ago by Jean-Paul Calderone

Cc: Jean-Paul Calderone added

I deleted this module in the #2763 branch. Assuming that change is accepted, when that branch is merged, this ticket will be resolved.

comment:10 Changed 13 years ago by Jean-Paul Calderone

Resolution: wontfix
Status: newclosed

I merged that branch and it deleted twisted.web.monitor, so yea, nothing to fix here anymore.

comment:11 Changed 11 years ago by <automation>

Owner: Thijs Triemstra deleted
Note: See TracTickets for help on using tickets.