Opened 4 years ago

Last modified 4 years ago

#9354 enhancement new

Twisted requires pyOpenSSL>=16.2.0

Reported by: mark williams Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


Twisted claims to require pyOpenSSL>=16.0.0, but he tests fail with the following traceback on pyOpenSSL 16.0.0 and 16.1.0:

$ trial twisted.test.test_sslverify
Unhandled Error
Traceback (most recent call last):
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/", line 478, in postOptions
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/", line 388, in postOptions
    self['reporter'] = self._loadReporterByName(self['reporter'])
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/", line 375, in _loadReporterByName
    for p in plugin.getPlugins(itrial.IReporter):
  File "/testenv/lib/python2.7/site-packages/twisted/", line 213, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/testenv/lib/python2.7/site-packages/twisted/", line 171, in getCache
    provider = pluginModule.load()
  File "/testenv/lib/python2.7/site-packages/twisted/python/", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(
  File "/testenv/lib/python2.7/site-packages/twisted/python/", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/testenv/lib/python2.7/site-packages/twisted/python/", line 247, in _importAndCheckStack
    return __import__(importName)
  File "/testenv/lib/python2.7/site-packages/twisted/plugins/", line 6, in <module>
    from twisted.internet.endpoints import (
  File "/testenv/lib/python2.7/site-packages/twisted/internet/", line 58, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory
  File "/testenv/lib/python2.7/site-packages/twisted/protocols/", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "/testenv/lib/python2.7/site-packages/OpenSSL/", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/testenv/lib/python2.7/site-packages/OpenSSL/", line 124, in <module>
exceptions.AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Change History (1)

comment:1 Changed 4 years ago by Jean-Paul Calderone

Does import OpenSSL even work on the system where you tested that 16.0 and 16.1 compatibility? It looks more like a pyOpenSSL/OpenSSL incompatibility than a Twisted/pyOpenSSL incompatibility to me. pyOpenSSL is trying to get a symbol from the OpenSSL cffi interface and it is missing.

Note: See TracTickets for help on using tickets.