[issue17181] SSLContext.set_servername_callback should be able to set argument

2021-10-21 Thread Christian Heimes
Christian Heimes added the comment: As Antoine said, you can use a partial function, closure, or an instance method as a callable. Besides nobody else has requested an additional argument in the past eight years. I see this as a strong indication that an argument is not required.

[issue17181] SSLContext.set_servername_callback should be able to set argument

2021-10-21 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17181] SSLContext.set_servername_callback should be able to set argument

2013-02-11 Thread Daniel Black
New submission from Daniel Black: I think my original implementation of the SNI callback to see a original sslcontext was wrong. It would be much more useful for the SSLContext.set_servername_callback to take a callable and an object as an argument. This would allow constructs like the

[issue17181] SSLContext.set_servername_callback should be able to set argument

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: This would allow constructs like the following where self can be used within the callback. Example: def cb_sni(ssl_sock, server_name, self): self.sniname = server_name self.context.set_servername_callback(cb_sni, self) The

[issue17181] SSLContext.set_servername_callback should be able to set argument

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: (functools.partial is another solution to the problem) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17181 ___