Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69998

Re: imaplib: how to specify SSL/TLS protocol version?

References <li49ik$f94$1@reader1.panix.com> <li4a1v$kdo$1@reader1.panix.com> <mailman.9095.1397075591.18130.python-list@python.org> <li4c4l$721$1@reader1.panix.com> <li4cvi$g2p$1@reader1.panix.com>
Date 2014-04-10 11:55 +1000
Subject Re: imaplib: how to specify SSL/TLS protocol version?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.9105.1397094927.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Apr 10, 2014 at 7:10 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> I left out a relevent fact: I'm not the one calling IMAP4_<whatever>.
>
> That's being done by the imapclient library.  There's no way to pass
> imapclient a custom class to use.  It's hard-waired to call either
> imaplib.IMAP4_stream(), imaplib.IMAP4(), or imaplib.IMAP4_SSL().  I
> could create an IMAP4_TLS1 class, but I would then have to sub-class
> imapclient.IMAPClient and override its _create_IMAP4() method to make
> it call my IMAP4_TLS1() class instead of calling imaplib.IMAP4_SSL().
>
> Monkey-patching imaplib seems a little better since it it doesn't
> depend on assumptions about the internal workings of imapclient (other
> than the fact that it uses imaplib.IMAP4_SSL).

That's an argument in favour of a minor case of serious
monkey-patching. Although if you do feel dirty, try to hold on to that
feeling because that is the proper reaction to being told that you're
monkey-patching.

ChrisA
okay, now I feel like a moron... not just a regular moron, though...

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:12 +0000
  Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:20 +0000
    Re: imaplib: how to specify SSL/TLS protocol version? Tim Chase <python.list@tim.thechases.com> - 2014-04-09 15:33 -0500
      Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:55 +0000
        Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 21:10 +0000
          Re: imaplib: how to specify SSL/TLS protocol version? Chris Angelico <rosuav@gmail.com> - 2014-04-10 11:55 +1000
  Re: imaplib: how to specify SSL/TLS protocol version? Tim Chase <python.list@tim.thechases.com> - 2014-04-09 15:26 -0500
  Re: imaplib: how to specify SSL/TLS protocol version? Antoine Pitrou <solipsis@pitrou.net> - 2014-04-10 19:57 +0000

csiph-web