Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F25FC431FD0 for ; Thu, 29 Sep 2011 00:45:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.09 X-Spam-Level: X-Spam-Status: No, score=-0.09 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hyXmDRIBxpcr for ; Thu, 29 Sep 2011 00:45:44 -0700 (PDT) Received: from homiemail-a18.g.dreamhost.com (caiajhbdcahe.dreamhost.com [208.97.132.74]) by olra.theworths.org (Postfix) with ESMTP id 410AC431FB6 for ; Thu, 29 Sep 2011 00:45:44 -0700 (PDT) Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 807E9250079; Thu, 29 Sep 2011 00:45:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:cc:subject :in-reply-to:references:date:message-id:mime-version: content-type; q=dns; s=sspaeth.de; b=avYIMh0PiipaeVmtvUEN4YBbzdh GqtvfqYuAUWwkoXc/w/fBJrgrS8cG0YwbFsdxORGvxE0pGvqzN64PlHnMn8nj0Rg j+atBGMTYEYvr9G4UBaXIkA93YJ6okQQG9sXuTfMX+enWcDDFEsC1l/juHuQIOPR HssOO1jI3BDvyVPA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version: content-type; s=sspaeth.de; bh=OrVQHs1GQZBipZSf3NSI+VnuLsQ=; b=M 5XfYXC0o/dmIiI5gwn48M0ek6E635QLtEW4in3FzCRXZyeCr3+PwjWUmLtCATKYd z64ikFKY8JH/aR616j/MXiwxEk0wrntx6DpzcDAcbQKGfwAnJ099SwFYF+X2qV5j MAc4EjwL5WETAOVurPvs6TldQe4sHIIBoziyCLiWkw= Received: from spaetzbook.sspaeth.de (unknown [84.55.203.213]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: fax@sspaeth.de) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 8996D250075; Thu, 29 Sep 2011 00:45:41 -0700 (PDT) Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation); Thu, 29 Sep 2011 09:45:38 +0200 From: Sebastian Spaeth To: Justus Winter <4winter@informatik.uni-hamburg.de>, notmuch@notmuchmail.org Subject: Re: [PATCH 1/9] python: add a .gitignore file and refine the toplevel one In-Reply-To: <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de> References: <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de> User-Agent: Notmuch/0.7-19-gee4579a (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Thu, 29 Sep 2011 09:45:38 +0200 Message-ID: <871uuzlrkt.fsf@SSpaeth.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2011 07:45:45 -0000 --=-=-= On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote: #1) APPLIED #2) APPLIED #3) reorder the arguments of NotmuchError.__init__(): NOT APPLIED The python tutorial gives an example of custom TransitionError with three arguments, a custom message as the third. In addition, a STATUS value is always expected to be given, while the additional explanatory msg is optional, so STATUS makes for a more logical 1st parameter IMHO. Even if it were the case, it makes for lots of code churn, longer code (status=foo) to all Exceptions, and existing third party code would be broken. Overall, I think there is more potential for trouble than cleanup. #4) APPLIED status is always expected to be existing, but bullet proofing never hurts, so this patch makes sense. #5) APPLIED Modified the patches to apply again, as some changes had been made. #7) NOT APPLIED, INPUT SOUGHT :) I do see the value of more fine grained exceptions, but I am not sure, we need this level of fine-grainedness. It would also make things more tricky (the API is still actively evolving, and e.g. 4 days ago, a new error status was added), so users of the bindings would now have + NotmuchError, + OutOfMemoryError, + ReadOnlyDatabaseError, + XapianError, + FileError, + FileNotEmailError, + DuplicateMessageIdError, + NullPointerError, + TagTooLongError, + UnbalancedFreezeThawError, + UnbalancedAtomicError, + NotInitializedError to check where e.g. Xapian could also hide an Out of Memory. Do people really want to catch, say UnbalancedAtomic errors specifically, rather than testing whether an operation succeeded, and check the status code if not? I could see the case for NotInitializedError, as that is a bit specific to the python bindings and users might want to catch it separately. Also, not all "status" are an error, e.g. DuplicateMessageId denotes success rather than failure, it just communicates a status. What do people (&user of the bindings) think would make sense here? I am not opposed, but want more discussion and input before such a change is made. #8) Not merged, as it depends on #7 #9) APPLIED Thanks for the patches, most of them are quite nice. For 7&8, I'd like to hear more opinions. Sebastian --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6EIiIACgkQVYX1jMgnoGIiFACggHuxiQ3uCVGkk9zJxvit1nHn KJoAn3GD4FLcUFMW6+00yr3+iMYCQmnW =b+jk -----END PGP SIGNATURE----- --=-=-=--