Ticket #1878 (new defect )

Opened 2 years ago

Last modified 2 months ago

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

Reported by: misc@mandriva.org Assigned to: thijs
Type: defect Priority: normal
Milestone: Component: web
Keywords: Cc: thijs
Branch: Author:
Launchpad Bug:

Description (last modified by exarkun)

~ $ 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

twisted.monitor.fix1878.patch (393 bytes) - added by misc@mandriva.org 2 years ago.
patch that fix the issue
monitor-1878.patch (489 bytes) - added by collab 2 months ago.
Patch against r24190

Change History

  2006-06-29 19:03:04+00:00 changed by misc@mandriva.org

  • attachment twisted.monitor.fix1878.patch added

patch that fix the issue

follow-up: ↓ 3   2006-06-29 19:09:00+00:00 changed by exarkun

  • description deleted

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

  2006-06-30 03:13:50+00:00 changed 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.

  2008-07-01 02:44:57+00:00 changed by collab

  • attachment monitor-1878.patch added

Patch against r24190

in reply to: ↑ 1   2008-07-01 02:47:56+00:00 changed by collab

  • cc set to collab
  • branch deleted
  • author deleted

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.

  2008-07-01 15:40:14+00:00 changed by collab

  • keywords set to review
  • owner deleted

Putting this patch up for review.

follow-up: ↓ 7   2008-07-01 22:28:36+00:00 changed by exarkun

  • keywords deleted

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.

  2008-07-01 22:29:04+00:00 changed by exarkun

  • owner set to collab

in reply to: ↑ 5   2008-07-04 01:36:12+00:00 changed by collab

  • status changed from new to assigned

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..

  2008-07-09 17:09:15+00:00 changed by thijs

  • cc changed from collab to thijs
  • owner changed from collab to thijs
  • status changed from assigned to new
Note: See TracTickets for help on using tickets.