wrapmodule is defined simply as:
|
module.socket.socket = socksocket |
However, that will affect not just the socket function as it is visible from the module, but from everywhele else as well. Therefore, e.g. socks.wrapmodule(smtplib) will affect the entire application.