When running irclib on python 2.6 with ssl=True I get the following warning :
irclib.py:435: DeprecationWarning: socket.ssl() is deprecated. Use ssl.wrap_socket() instead.
self.ssl = socket.ssl(self.socket)
I accordingly changed socket.ssl(self.socket) to ssl.wrap_socket(self.socket)
However doing this caused an error:
AttributeError: 'bool' object has no attribute 'wrap_socket'
I figured it was because of the parameter variable ssl (boolean) which is used in the connect() function. I renamed the parameter to usessl and then everything was working as it should. I pastebined the code at
with modified lines highlighted. Only problem I am concerned with is that doing this fixes the deprecation problem, but in turn breaks compatibility with existing SSL enabled applications using irclib unless they do a minor edit of their code (basically using parameter usessl instead of ssl), so you will have to either keep using the deprecated function, or warn people updating of this, or find a better way of achieving this (I didn't bother searching much, all I wanted was my app to work).
Anonymous
try renaming the ssl module.
something like:
import ssl as ssl_module
.....
ssl_module.wrap_socket(....
Thanks! I will fix this shortly.
Thanks to you, Jeff.
.peter
This is no longer an issue.