Changes between and of Initial VersionVersion 1Ticket #6032


Ignore:
Timestamp:
09/30/2012 01:50:17 PM (2 years ago)
Author:
exarkun
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6032

    • Property Priority changed from high to normal
    • Property Type changed from regression to enhancement
    • Property Summary changed from Either making pywin32 a requirement, or don't have endpoints break when it is missing to make twisted.internet.endpoints importable on Windows when pywin32 is not installed
  • Ticket #6032 – Description

    initial v1  
    1 As of 12.2 importing twisted.internet.endpoints breaks on Windows if pywin32 is not installed: 
    2 http://paste.pound-python.org/show/26270/ 
     1Using Twisted 12.2, `twisted.internet.endpoints` cannot be imported on Windows unless pywin32 is available: 
    32 
    4 This means importing twisted.web.client fails because it uses internet.endpoints. Either pywin32 should be made a requirement or endpoints shouldn't break when its not available. 
     3{{{ 
     4 Traceback (most recent call last): 
     5  File "<string>", line 1, in <module> 
     6  File "twisted\web\client.py", line 21, in <module> 
     7    from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoint 
     8  File "twisted\internet\endpoints.py", line 28, in <module> 
     9    from twisted.internet import stdio 
     10  File "twisted\internet\stdio.py", line 28, in <module> 
     11    from twisted.internet import _win32stdio 
     12  File "twisted\internet\_win32stdio.py", line 7, in <module> 
     13    import win32api 
     14ImportError: No module named win32api 
     15}}} 
    516 
    6 A lot of people use easy_install or pip to install twisted - an issue with adding pywin32 as a requirement is that neither of those tools can install pywin32 automagically, easy_install just fails to find a proper link on the SourceForge page and pip can't install binaries (yet). The latter issue could be fixed by talking to the pywin32 maintainer, because easy_install is able to find most libraries hosted on SourceForge. 
     17As 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. 
     18 
     19This likely requires a Windows version of the no-modules builder to be set up first.