From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 975971387B1 for ; Mon, 20 Jan 2014 03:26:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6544AE0BC1; Mon, 20 Jan 2014 03:26:48 +0000 (UTC) Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by pigeon.gentoo.org (Postfix) with ESMTP id 478CEE0BA3 for ; Mon, 20 Jan 2014 03:26:47 +0000 (UTC) Received: from omta06.westchester.pa.mail.comcast.net ([76.96.62.51]) by qmta09.westchester.pa.mail.comcast.net with comcast id G3MX1n00116LCl0593Smgr; Mon, 20 Jan 2014 03:26:46 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta06.westchester.pa.mail.comcast.net with comcast id G3Sl1n00K152l3L3S3SmE5; Mon, 20 Jan 2014 03:26:46 +0000 Received: from mjolnir.tremily.us (unknown [192.168.0.141]) by odin.tremily.us (Postfix) with ESMTPS id 4487AF081DD; Sun, 19 Jan 2014 19:26:44 -0800 (PST) Received: (nullmailer pid 15748 invoked by uid 1000); Mon, 20 Jan 2014 03:26:14 -0000 From: "W. Trevor King" To: gentoo-portage-dev@lists.gentoo.org Cc: Rafael Goncalves Martins , "W. Trevor King" Subject: [gentoo-portage-dev] [PATCH v3 0/4] Initial fetch() refactoring Date: Sun, 19 Jan 2014 19:26:06 -0800 Message-Id: X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1 In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1390188406; bh=ISajTx99z4McKUPLrpsdUxuHIEsC/IY9c8RtUlxJLvE=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-Id; b=fafC+u2G1+0VUbPu8TafA4Ozu8YKxnPtIWUvuKSFvLn1Hy08rOX3aRPzol+v1sYHu A9aRoSfCQZjAjA5Edsa6VnOIOgThSxF2IHkoohe1mJ1fKP5ODhQaH4m1w/0hnl806m gb+phGqwucjaZ4lRQz2yPSTRMOGVL19uVofawvlJkzilryym9ds3OkyoeBNaN+aHy6 EOQlGPf8nq9znnMMTEbVEcuPp428x6b4XdvaM3P68fNaBFLwhPOsygR5kEq0xvCTvf xBmrB7JRjGslYCevbPZ0R2ZdbF0I6fwCI8zg1+KVqeWDhpaU63IuTUaCAPsqTR3MG9 nKUGWoQ9zI9NQ== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 355a2899-b0f7-40e3-a026-5947ef8499d5 X-Archives-Hash: 8fcb033784acc73371740c579a8f1341 Changes since v2: * Use """""" for one-line docstrings. * Terminate docstring summaries with periods. * Mention 'netloc' in _expand_mirror docstring. * Uppercase URI in docstrings. * Add a 'key' variable to cut down on setting-name noise. * Remove parens and line extensions (\) from % formatting. * Use 'expanded_uris' instead of 'uris' for _expand_mirror return value. * Additional line wrapping to stay under 80 chars. * New test_fetch.py test suite for the helper functions. * New patch #4 that refactors _get_fetch_resume_size. Not changed since v2: * Default arguments for _get_uris [1], but I've added an explicit defense in my commit message. * Use of settings in _get_uris [2], but I've added an explicit defense in my commit message. * Streamlining settings extraction [2], which I'm kicking down the road. I think Portage should just use ConfigParser for settings, but that is clearly outside the scope of this series. Cheers, Trevor [1]: http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4002/focus=4041 [2]: http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4002/focus=4042 W. Trevor King (4): pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries pym/portage/package/ebuild/fetch.py: Factor out _get_fetch_resume_size pym/portage/package/ebuild/fetch.py: Factor out _get_uris pym/portage/package/ebuild/fetch.py: Flatten conditionals in _get_fetch_resume_size pym/portage/package/ebuild/fetch.py | 318 ++++++++++++++++++++------------- pym/portage/tests/ebuild/test_fetch.py | 203 +++++++++++++++++++++ 2 files changed, 392 insertions(+), 129 deletions(-) create mode 100644 pym/portage/tests/ebuild/test_fetch.py -- 1.8.5.2.8.g0f6c0d1