meejah / txtorcon

Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/
MIT License
250 stars 72 forks source link

Import `Twisted[tls]` and `automat` #209

Closed felipedau closed 7 years ago

felipedau commented 7 years ago

Hello @meejah! Today I tried to install a newer version of txtorcon (from the cloned repo with pip install -e) and I had the following issue:

    File "test.py", line 3, in <module>
        import txtorcon  
    File "/home/user/Desktop/txtorcon/txtorcon/__init__.py", line 16, in <module>
        from txtorcon.controller import connect
    File "/home/user/Desktop/txtorcon/txtorcon/controller.py", line 33, in <module>
        from txtorcon.endpoints import TorClientEndpoint
    File "/home/user/Desktop/txtorcon/txtorcon/endpoints.py", line 14, in <module>
        from txtorcon.socks import TorSocksEndpoint
    File "/home/user/Desktop/txtorcon/txtorcon/socks.py", line 18, in <module>
        from twisted.protocols import tls
    File "/home/user/Desktop/env/local/lib/python2.7/site-packages/twisted/protocols/tls.py", line 41, in <module>
        from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
ImportError: No module named OpenSSL.SSL
    File "test.py", line 3, in <module>
        import txtorcon  
    File "/home/user/Desktop/txtorcon/txtorcon/__init__.py", line 16, in <module>
        from txtorcon.controller import connect
    File "/home/user/Desktop/txtorcon/txtorcon/controller.py", line 33, in <module>
        from txtorcon.endpoints import TorClientEndpoint
    File "/home/user/Desktop/txtorcon/txtorcon/endpoints.py", line 14, in <module>
        from txtorcon.socks import TorSocksEndpoint
    File "/home/user/Desktop/txtorcon/txtorcon/socks.py", line 22, in <module>
        import automat
ImportError: No module named automat

I took a look at the requirements from release-1.x: Twisted[tls] and automat are used. I updated requirements.txt and it worked. Maybe the file from 1.x should've been merged as well?

Thanks!

meejah commented 7 years ago

Yes, you're Almost Certainly right.

Thanks for the patch!

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.885% when pulling 93820078bf03b11e1a05cbf2cca0d888ef245442 on felipedau:fix/import-tls-automat into c88f0efae0fabb5224ce7abbcbcbe7988adac141 on meejah:master.

felipedau commented 7 years ago

On Fri, Feb 10, 2017 at 04:31:23PM -0800, meejah wrote:

Yes, you're Almost Certainly right.

Thanks for the patch!

No problem :)