Ticket #6032 enhancement new
make twisted.internet.endpoints importable on Windows when pywin32 is not installed
| Reported by: | tray | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description (last modified by exarkun) (diff)
Using Twisted 12.2, twisted.internet.endpoints cannot be imported on Windows unless pywin32 is available:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "twisted\web\client.py", line 21, in <module>
from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoint
File "twisted\internet\endpoints.py", line 28, in <module>
from twisted.internet import stdio
File "twisted\internet\stdio.py", line 28, in <module>
from twisted.internet import _win32stdio
File "twisted\internet\_win32stdio.py", line 7, in <module>
import win32api
ImportError: No module named win32api
As demonstrated by this traceback, this also affects any module that depends on endpoints. The pywin32 dependency is only necessary for stdio; other endpoints should be usable even if it is not installed.
This likely requires a Windows version of the no-modules builder to be set up first - see < https://bugs.launchpad.net/twisted-buildbot-configuration/+bug/1059240>.
Change History
Note: See
TracTickets for help on using
tickets.
