Opened 8 years ago

Closed 8 years ago

#5595 defect closed fixed (fixed)

doc/words/examples/minchat.py has incorrect import path

Reported by: ashfall Owned by: Thijs Triemstra
Priority: normal Milestone:
Component: words Keywords:
Cc: ralphm Branch:
Author:

Description

basechat, baseaccount and ircsupport are being imported from twisted.im, which does not exist. Need to correct module-path.

Attachments (2)

5595-path-fix.patch (696 bytes) - added by ashfall 8 years ago.
Fixed the import line. Combined multiple import statements. Added instruction to run the script.
5595-topfile.patch (296 bytes) - added by ashfall 8 years ago.
Added topfile

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by DefaultCC Plugin

Cc: ralphm added

Changed 8 years ago by ashfall

Attachment: 5595-path-fix.patch added

Fixed the import line. Combined multiple import statements. Added instruction to run the script.

Changed 8 years ago by ashfall

Attachment: 5595-topfile.patch added

Added topfile

comment:2 Changed 8 years ago by ashfall

Keywords: review added
Owner: ashfall deleted

comment:3 Changed 8 years ago by Thijs Triemstra

Owner: set to Thijs Triemstra
Status: newassigned

comment:4 Changed 8 years ago by Thijs Triemstra

Keywords: review removed

Thanks for your patch. I will apply 5595-path-fix.patch with some coding standard fixes (docstrings on 3 lines). The news file can also simply be an empty .misc file, only major additions to [source:trunk/doc] need a .doc file.

While testing I also noticed this error, but I'll open a new ticket for that:

Traceback (most recent call last):
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/internet/tcp.py", line 203, in doRead
    rval = self.protocol.dataReceived(data)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/words/protocols/irc.py", line 2413, in dataReceived
    basic.LineReceiver.dataReceived(self, data.replace('\r', ''))
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/protocols/basic.py", line 564, in dataReceived
    why = self.lineReceived(line)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/words/protocols/irc.py", line 2421, in lineReceived
    self.handleCommand(command, prefix, params)
--- <exception caught here> ---
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/words/protocols/irc.py", line 2465, in handleCommand
    method(prefix, params)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/words/protocols/irc.py", line 2052, in irc_RPL_ISUPPORT
    self.supported.parse(args)
exceptions.AttributeError: IRCProto instance has no attribute 'supported'

Same for the broken reference in the UserWarning:

$ python doc/words/examples/minchat.py 
/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future.

comment:5 Changed 8 years ago by Thijs Triemstra

Resolution: fixed
Status: assignedclosed

(In [34057]) Apply 5595-path-fix.patch: Correct module imports in the Words minchat example.

Author: ashfall Reviewer: thijs Fixes: #5595

Note: See TracTickets for help on using tickets.