[Python-Dev] SSL 1.7
Bill Janssen
janssen at parc.com
Sat Oct 13 04:07:32 CEST 2007
I've now got a large complex long-lived threaded server asyncore-based
(Medusa) multi-client server program running on OS X with Python 2.3.5
and the "older-Python" SSL module. I had to make a number of changes
to the code; primarily fixing the way that certain "socket" methods
are called on the SSLSocket, and in the C code, allowing for changes
to the socket blocking attribute that are made out-of-band from use of
the SSL context.
I'll fold that back into the trunk next week, and produce a patch for
the 3K branch after that.
Meanwhile, I've updated the PyPI package to SSL 1.7.
Paul, this also fixes (I hope :-) the setup.py bug you mentioned in
1.6.
Chris, you might want to try this one with Twisted; I believe it will
work OK.
One thing to watch out for: ssl.SSLError can't inherit from
socket.error, as it does in 2.6+, so if you are catching exceptions,
you need to trap them like:
except ssl.SSLError, x:
...
except socket.error, x:
...
which idiom will continue to work for 2.6 and later.
Bill
More information about the Python-Dev
mailing list