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?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin.stu.neva.ru!news.astraweb.com!border2.a.newsrouter.astraweb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'argument': 0.05; 'class,': 0.07; 'override': 0.09; 'subject:version': 0.09; 'though...': 0.09; 'cc:addr:python-list': 0.11; '(other': 0.16; 'assumptions': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'sub-class': 0.16; 'subject:SSL': 0.16; 'workings': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'pass': 0.26; 'subject:/': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'minor': 0.31; 'class': 0.32; 'regular': 0.32; 'skip:_ 10': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'library.': 0.36; 'done': 0.36; 'method': 0.36; 'subject:?': 0.36; 'being': 0.38; 'fact': 0.38; 'little': 0.38; 'use.': 0.39; 'either': 0.39; "you're": 0.61; 'feeling': 0.68; 'edwards': 0.91; 'favour': 0.91; 'to:none': 0.92; 'serious': 0.97
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=NpXCE8lyEo+0qm6W2BAY3rQammCA98wQo4hgMb9z3b8=; b=ohRAI66OA/4B6XafT0xCoooi6LrlPBm6q6ufzcqiUHVBI6j4xEDaP8UcC/dCcrmb0u NbsAImRJkjBgvAD7PEP6XovWwycHxVzyejVAAASJqef7rByTqvA0ujXNLPGwb0ZRG6J9 VunWnD5Ha+clzN/JGgwozNr23CDcr28m6ar4YEqvwt1RtFl1UDTi9aaVFbRKuxL6zSzy RNKC/i4o/qAkvx0ymFb8Wvun/h6Nj0hLiSL/x6+qlXO1FHtjT1w/oK1FisF8O3GZuhgz 617VYKqX0CwNqJXAnCFbIuDydWj/ZrfasvJwecEDCh/18weNTYv8Wjp9Ez7yIsFZosw2 lu2w==
MIME-Version 1.0
X-Received by 10.66.181.70 with SMTP id du6mr16076009pac.23.1397094923422; Wed, 09 Apr 2014 18:55:23 -0700 (PDT)
In-Reply-To <li4cvi$g2p$1@reader1.panix.com>
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 Thu, 10 Apr 2014 11:55:23 +1000
Subject Re: imaplib: how to specify SSL/TLS protocol version?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9105.1397094927.18130.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1397094927 news.xs4all.nl 2909 [2001:888:2000:d::a6]:37717
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69998

Show key headers only | 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