[Justus Winter] Re: [PATCH 1/9] python: add a .gitignore file and refine the toplevel one
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Thu, 29 Sep 2011 16:06:42 +0000 (18:06 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:31 +0000 (09:39 -0800)
ab/b8eb6f1aea7ac9fd054b4f597a32046c9dba61 [new file with mode: 0644]

diff --git a/ab/b8eb6f1aea7ac9fd054b4f597a32046c9dba61 b/ab/b8eb6f1aea7ac9fd054b4f597a32046c9dba61
new file mode 100644 (file)
index 0000000..ec60a4d
--- /dev/null
@@ -0,0 +1,240 @@
+Return-Path: <Sebastian@SSpaeth.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id DE9EA431FD0\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 09:06:47 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id JP2AvSU86yiM for <notmuch@notmuchmail.org>;\r
+       Thu, 29 Sep 2011 09:06:47 -0700 (PDT)\r
+Received: from homiemail-a23.g.dreamhost.com (caiajhbdcaib.dreamhost.com\r
+       [208.97.132.81])\r
+       by olra.theworths.org (Postfix) with ESMTP id 27ABD431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 09:06:47 -0700 (PDT)\r
+Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1])\r
+       by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 42BED4B0091\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 09:06:46 -0700 (PDT)\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:subject\r
+       :date:message-id:mime-version:content-type; q=dns; s=sspaeth.de;\r
+       b=ODT/HFg+ysVXlPeA/yiL+TcTHbqr2o6lnGXaSbVqLOTiGIlAKVU/eKWauX52i\r
+       wwHo8M31fIRGHyAg0L39agpKHx/VKg35rxI7qr4bhezZfAX3HhmFVaEcXQ18iVbY\r
+       1qMzEcoZaW3lXhZzLsmjCpY8MhamKv98SOoEqHwwCWuZtA=\r
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to\r
+       :subject:date:message-id:mime-version:content-type; s=sspaeth.de\r
+       ; bh=dwhRoTeTwswrlh48kIj4pKxEOMk=; b=A4SJPwzwByqYI8CKhQQh0qDnAC7\r
+       rvON6u1pYgi1bDFetml1l7kBgt7AZjP2C2g4Hp/o1SsXr5xje+VpmlF0aLopbRpR\r
+       NippLLUUpFS/OUrY9Nu0SHQyBlDYtxfyJTMKbHQHmoMYHEbgiBG6xDCefNneJuQf\r
+       4VkilMKSmplUq+0A=\r
+Received: from spaetzbook.sspaeth.de (unknown [84.55.203.213])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       (Authenticated sender: fax@sspaeth.de)\r
+       by homiemail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 74C5A4B008F\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 09:06:44 -0700 (PDT)\r
+Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation);\r
+       Thu, 29 Sep 2011 18:06:42 +0200\r
+From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+To: Notmuch developer list <notmuch@notmuchmail.org>\r
+Subject: [Justus Winter] Re: [PATCH 1/9] python: add a .gitignore file and\r
+       refine the toplevel one\r
+User-Agent: Notmuch/0.7-19-gee4579a (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 29 Sep 2011 18:06:42 +0200\r
+Message-ID: <87r52z49kd.fsf@SSpaeth.de>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/mixed; boundary="=-=-="\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 29 Sep 2011 16:06:48 -0000\r
+\r
+--=-=-=\r
+\r
+Here goes Justus's reply which he accidentally sent to me only.\r
+\r
+\r
+--=-=-=\r
+Content-Type: message/rfc822\r
+Content-Disposition: inline\r
+\r
+Return-Path: <teythoon@jade-hamburg.de>\r
+X-Original-To: Sebastian@SSpaeth.de\r
+Delivered-To: sebastian--sspaeth.de@homiemail-mx7.g.dreamhost.com\r
+Received: from diehard.dreamhost.com (caiajhbdcaib.dreamhost.com\r
+ [208.97.132.81])      by homiemail-mx7.g.dreamhost.com (Postfix) with ESMTP id\r
+ B9CF2CF6CD    for <Sebastian@SSpaeth.de>; Thu, 29 Sep 2011 03:37:59 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by diehard.dreamhost.com (Postfix) with ESMTP id B5BEF17BC062\r
+       for <Sebastian@SSpaeth.de>; Thu, 29 Sep 2011 03:37:59 -0700 (PDT)\r
+X-DH-Virus-Scanned: Debian amavisd-new at diehard.dreamhost.com\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.1\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.1 tagged_above=-999 required=3\r
+       tests=[SUBJECT_FUZZY_TION=1.1] autolearn=disabled\r
+Received: from godfather.dreamhost.com ([208.97.132.5])        by localhost\r
+ (diehard.dreamhost.com [208.97.132.157]) (amavisd-new, port 10024)    with ESMTP\r
+ id 0B1H6zbuimbD for <Sebastian@SSpaeth.de>;   Thu, 29 Sep 2011 03:37:59 -0700\r
+ (PDT)\r
+Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])\r
+       by godfather.dreamhost.com (Postfix) with ESMTP id 951FC1B0014\r
+       for <Sebastian@SSpaeth.de>; Thu, 29 Sep 2011 03:37:44 -0700 (PDT)\r
+Received: from mail.jade-hamburg.de (unknown [85.183.11.228])\r
+       (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by mail.cryptobitch.de (Postfix) with ESMTPSA id 6F34F505C8B\r
+       for <Sebastian@SSpaeth.de>; Thu, 29 Sep 2011 12:37:57 +0200 (CEST)\r
+Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
+       id C0CA5DF2A0; Thu, 29 Sep 2011 12:37:56 +0200 (CEST)\r
+Received: from thinkbox.jade-hamburg.de (unknown [85.183.11.228])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       (Authenticated sender: teythoon)\r
+       by mail.jade-hamburg.de (Postfix) with ESMTPSA id B6AB6DF28B\r
+       for <Sebastian@SSpaeth.de>; Thu, 29 Sep 2011 12:37:55 +0200 (CEST)\r
+Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.76)\r
+       (envelope-from <teythoon@thinkbox.jade-hamburg.de>)\r
+       id 1R9E01-0005VB-5e\r
+       for Sebastian@SSpaeth.de; Thu, 29 Sep 2011 12:37:53 +0200\r
+In-Reply-To: <871uuzlrkt.fsf@SSpaeth.de>\r
+References:\r
+ <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
+ <871uuzlrkt.fsf@SSpaeth.de>\r
+Subject: Re: [PATCH 1/9] python: add a .gitignore file and refine the toplevel\r
+ one\r
+To: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+From: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+Date: Thu, 29 Sep 2011 12:37:53 +0200\r
+Message-Id: <E1R9E01-0005VB-5e@thinkbox.jade-hamburg.de>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/mixed; boundary="===-=-="\r
+\r
+--===-=-=\r
+Content-Type: text/plain; charset=utf-8\r
+\r
+\r
+Hey Sebastian,\r
+\r
+Quoting Sebastian Spaeth (2011-09-29 09:45:38)\r
+>On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote:\r
+>\r
+>#1) APPLIED\r
+>#2) APPLIED\r
+>#4) APPLIED\r
+>#5&#6) APPLIED\r
+>#9) APPLIED\r
+>Thanks for the patches, most of them are quite nice. For 7&8, I'd like\r
+>to hear more opinions.\r
+\r
+Thanks :)\r
+\r
+>#3) reorder the arguments of NotmuchError.__init__(): NOT APPLIED\r
+>\r
+>The python tutorial gives an example of custom TransitionError with\r
+>three arguments, a custom message as the third. In addition, a STATUS\r
+>value is always expected to be given, while the additional explanatory\r
+>msg is optional, so STATUS makes for a more logical 1st parameter IMHO.\r
+>Even if it were the case, it makes for lots of code churn, longer code\r
+>(status=foo) to all Exceptions, and existing third party code would be\r
+>broken. Overall, I think there is more potential for trouble than\r
+>cleanup.\r
+\r
+Well, #3 wasn't meant to be used standalone, I just wanted an intermediate\r
+step in the refactoring process.\r
+\r
+To address your concern wrt status being optional: I do consider code\r
+doing 'raise NotmuchError(status=...)' to be wrong, one should raise\r
+a more specific error in the first case.\r
+\r
+>#7) NOT APPLIED, INPUT SOUGHT :)\r
+>I do see the value of more fine grained exceptions, but I am not sure,\r
+>we need this level of fine-grainedness. It would also make things more\r
+>tricky (the API is still actively evolving, and e.g. 4 days ago, a new\r
+>error status was added), so users of the bindings would now have\r
+> +    NotmuchError,\r
+> +    OutOfMemoryError,\r
+> +    ReadOnlyDatabaseError,\r
+> +    XapianError,\r
+> +    FileError,\r
+> +    FileNotEmailError,\r
+> +    DuplicateMessageIdError,\r
+> +    NullPointerError,\r
+> +    TagTooLongError,\r
+> +    UnbalancedFreezeThawError,\r
+> +    UnbalancedAtomicError,\r
+> +    NotInitializedError\r
+>\r
+> [...]\r
+>\r
+>to check where e.g. Xapian could also hide an Out of Memory.\r
+Well, if the underlying API changes, the bindings will have to be\r
+updated as well. What's wrong with that?\r
+\r
+> Do people\r
+>really want to catch, say UnbalancedAtomic errors specifically, rather\r
+>than testing whether an operation succeeded, and check the status code\r
+>if not? I could see the case for NotInitializedError, as that is a bit\r
+>specific to the python bindings and users might want to catch it separately.\r
+\r
+Well, those not interested in the exact nature of the failure can\r
+still except NotmuchError as before. I also added the status code to\r
+each class so that legacy style exception handling won't break.\r
+\r
+(On second thought, we could also provide a .args property that issues\r
+a deprecation warning when used to make the transition  even smoother.)\r
+\r
+>Also, not all "status" are an error, e.g. DuplicateMessageId denotes\r
+>success rather than failure, it just communicates a status.\r
+Hm, I didn't knew that. This feels somewhat strange though.\r
+\r
+If I were to design an API that uses an integer to indicate both\r
+success and error, I'd reserve one bit indicating error so testing\r
+for errors can be easily done by anding with a bitmask.\r
+\r
+Cheers,\r
+Justus\r
+--===-=-=\r
+Content-Type: application/octet-stream\r
+Content-Disposition: attachment; filename=.signature\r
+Content-Transfer-Encoding: base64\r
+\r
+bG92ZSB1IGFsb3QgQCxACgo=\r
+--===-=-=--\r
+\r
+--=-=-=\r
+Content-Type: multipart/signed; boundary="===-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+\r
+--===-=-=\r
+\r
+\r
+--===-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEUEARECAAYFAk6El5IACgkQVYX1jMgnoGJFygCY/edvrzAuYWYK0cuZBtacEtHX\r
+LQCgha7pei3FoAc7FxAR0Uf3iiu8/U0=\r
+=xsCn\r
+-----END PGP SIGNATURE-----\r
+--===-=-=--\r
+\r
+--=-=-=--\r