Ticket #1878 (closed defect: wontfix)

Opened 4 years ago

Last modified 22 months ago

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

Reported by: misc@… Owned by: thijs
Priority: normal Milestone:
Component: web Keywords:
Cc: thijs, exarkun Branch:
Author: Launchpad Bug:

Description (last modified by exarkun) (diff)

~ $ 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 Download (393 bytes) - added by misc@… 4 years ago.
patch that fix the issue
monitor-1878.patch Download (489 bytes) - added by collab 2 years ago.
Patch against r24190

Change History

Changed 4 years ago by misc@…

patch that fix the issue

follow-up: ↓ 3   Changed 4 years ago by exarkun

  • description modified (diff)

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

  Changed 4 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 2 years ago by collab

Patch against r24190

in reply to: ↑ 1   Changed 2 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 Download.

  Changed 2 years ago by collab

  • keywords review added
  • owner jknight deleted

Putting this patch up for review.

follow-up: ↓ 7   Changed 2 years ago by exarkun

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

  Changed 2 years ago by exarkun

  • owner set to collab

in reply to: ↑ 5   Changed 2 years ago 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..

  Changed 2 years ago by thijs

  • owner changed from collab to thijs
  • cc thijs added; collab removed
  • status changed from assigned to new

  Changed 22 months ago by exarkun

  • cc exarkun added

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

  Changed 22 months ago by exarkun

  • status changed from new to closed
  • resolution set to wontfix

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

Note: See TracTickets for help on using tickets.