Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o, python@g.o
Subject: [gentoo-python] Re: [PATCHES] Cleaning python_foreach_impl() up and introduce a parallel variant
Date: Sun, 24 Feb 2013 01:45:31
Message-Id: 512970B6.1090605@gentoo.org
In Reply to: [gentoo-python] [PATCHES] Cleaning python_foreach_impl() up and introduce a parallel variant by "Michał Górny"
1 On 02/21/2013 05:07 PM, Michał Górny wrote:
2 > Hello,
3 >
4 > I'm sending a batch of patches (git-kind of replies to this mail).
5 > The patches do the following:
6 >
7 >
8 > 1) clean up failure handling in python_foreach_impl().
9 >
10 > Currently, python_foreach_impl supposedly dies if one of the functions
11 > returns failure. This is quite unnecessary since most of the functions
12 > called there are supposed to be fatal themselves, and may be a bit
13 > confusing.
14 >
15 > The idea is that:
16 >
17 > python_foreach_impl foo
18 >
19 > should be as close to:
20 >
21 > for x in ...; do foo; done
22 >
23 > as possible. The implicit '|| die' doesn't really look helpful since it
24 > may hurt people with small unimportant conditionals at the end of their
25 > functions, and may cause a few others to actually rely
26 > on python_foreach_impl handling failures for them.
27 >
28 > Therefore, the function is not fatal anymore. Instead, it just returns
29 > 0 for complete success or status of first failure. In any case,
30 > the thingie called should 'die' on itself.
31 >
32 >
33 > 2) introduce a parallel variant of python_foreach_impl().
34 >
35 > Based on the code from distutils-r1. For that reason and compatibility,
36 > the variable controlling no of jobs is still being called
37 > 'DISTUTILS_JOBS'.
38 >
39 > The new function is also used in distutils-r1, with the two last
40 > patches doing pre-merge cleanup and actually using it.
41 >
42 >
43 > 3) move split log handling into python*_foreach_impl().
44 >
45 > With the parallel build feature no longer being distutils-specific,
46 > the split logs shall be accessible outside of it. Therefore, I have
47 > moved their support completely to python*_foreach_impl() functions.
48 >
49 >
50
51 I don't have any problems with this as a whole.
52
53 I trust you will do some testing before moving it to the tree; if you
54 want some help with that, I can pitch in.

Attachments

File name MIME type
signature.asc application/pgp-signature