Changes between and of Initial VersionVersion 3Ticket #3802

04/27/09 03:12:56 (13 years ago)

There's a valid problem here, that's both a documentation and specification problem: twisted.internet.serialport's documentation is unclear as to what is required of the reactor parameter to SerialPort, and it differs between platforms. addEvent is not specified on any reactor interface.

To close this ticket I would say that we need an addEvent method that provides an error message that explains what itamar just did in response to this ticket. There may also be a need for a separate ticket for an interface that explains the semantics of addEvent; ideally this could be added to e.g. the IOCP reactor as well.


  • Ticket #3802

    • Property Status changed from new to reopened
    • Property Summary changed from SerialPort Outdated to win32 SerialPort requires a reactor that provides "addEvent" method, but doesn't have a good error message if it gets a different one
    • Property Priority changed from normal to low
    • Property Milestone changed from Twisted-8.2+1 to
    • Property Keywords serial win32 added; Serial Win32 removed
  • Ticket #3802 – Description

    initial v3  
    1 Hello, i am trying to use the SerialPort but it seems to be outdated:
    3   File "C:\Python24\Lib\site-packages\twisted\internet\", line 56, in __init__
     1SerialPort raises the following exception on Windows if it is used with the default reactor:
     3  File "twisted\internet\", line 56, in __init__
    44    self.reactor.addEvent(self._overlappedRead.hEvent, self, 'serialReadEvent')
    55AttributeError: 'SelectReactor' object has no attribute 'addEvent'
     7It should say something more helpful when given a `SelectReactor`, explaining that `win32eventreactor` is required for serial port support on Windows.