Author brandon-rhodes
Recipients asvetlov, brandon-rhodes, giampaolo.rodola, jcea, kristjan.jonsson, pitrou
Date 2013-06-11.23:22:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370992934.65.0.777899181668.issue16487@psf.upfronthosting.co.za>
In-reply-to
Content
Kristján, your patch is a wonderful idea—I am about to commit production code that will have to create tens of thousands of temporary files during operation, one file each time SSL is started up on a socket, which could be avoided if something like this patch were applied. I had always assumed that it was simply a limitation of the underlying SSL library! An interface that takes a filename like this, instead of a live file-like object, seems so un-Pythonic that I assumed the only reason for it was a limitation in OpenSSL. Thank you very much for looking under the covers and discovering that this was not the case!

I do, though, feel a slight twinge when we add Even More Parameters to a Standard Library routine but in such a way that it cannot be used with an existing parameter — as here in your patch, where we gain a parameter like `certdata` that cannot be (should not be?) used at the same time as `certfile`. It seems redundant to have two names for the same parameter to the underlying library, and makes it look like the routine needs more information than it really does.

Since my own instinct was to think, ten minutes ago, "Maybe I can pass a StringIO, since it says it wants a fine!", I am very much in support of the idea of keeping only the existing parameters, but making them accept both strings (which, for compatibility, would continue to be interpreted as filenames) and file-like objects as arguments. I think this would have a great deal of symmetry with how other parts of the Standard Library work, while keeping this patch's central value of making it possible for those of us with cert-heavy code to avoid the creation of thousands of files a minute.

Again, thank you VERY much for discovering that OpenSSL can do this, and I will try to provide whatever encouragement I can as you try to shepherd this past the other committers.
History
Date User Action Args
2013-06-11 23:22:14brandon-rhodessetrecipients: + brandon-rhodes, jcea, pitrou, kristjan.jonsson, giampaolo.rodola, asvetlov
2013-06-11 23:22:14brandon-rhodessetmessageid: <1370992934.65.0.777899181668.issue16487@psf.upfronthosting.co.za>
2013-06-11 23:22:14brandon-rhodeslinkissue16487 messages
2013-06-11 23:22:14brandon-rhodescreate