On Sun, 19 Jan 2014 18:43:46 -0800
Alec Warner <anta...@gentoo.org> wrote:

> It is certainly weird (as we discussed on IRC.) I've never seen
> anyone do it in any codebase I liked.

My backlog was limited so I didn't catch that discussion, feel free to
share the log; I've since increased it. There's a lot more talk than my
defaults on IRC (as well as here on the mailing list). :)

On a side note, "I liked" seems a too subjective way to review patches.

> One of the problems is that it isn't immutable, so that earlier
> callers can mess with later callers. That is not possible in vapier's
> proposal, as the attributes are hidden in the function code and are
> not visible to callers.

True, but do you have a better suggestion? (Not the one below)

From a quick lookup Python seems to not really provide a clean
immutable solution here; one option would be to use a frozenset, but
then one has to make classes to put into that (which are still
mutable). That is a misuse for what could just be a dictionary.

> > move it into the class definition.
> > > def getNonSystemArchiveDepends(fetchlist, eapi):
> > >       ...
> > >
> > >       ARCHIVERS = {
> > >               ...
> > >       }
> >
> > That makes it a non-static function variable? This is a regression.
> 
> I guess I am not seeing why it must be a static function variable.
> Can you explain?

Because you would call re.compile for each time that function is
called; while the most recent compiled versions of re.compile are
cached, I still do not see a reason for this variable not to be static.

> For the colon's in dicts thing:
> 
> http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Whitespace

Okay, I will follow those guidelines.

> The @system set in gentoo will ensure these are installed.

You can compare @system against the PMS and you will note that entries
are missing in @system; the @system set only covers the most popular
ones, the rest is left up to the maintainer to add to the ebuild. Thus
this enumerates all of them; as the @system set can change in the
future, we need to make the code future proof hence the @system check.

It is possible for such atom to get removed from @system later.

> understand the wording of PMS (as the dependencies should be
> expressed somewhere) but in general we prefer to do that in @system.
> For the same reason all packages do not depend on glibc, or the
> compiler, or anything else.

Things that are in @system are not complained about by this code:

    if format not in system_set_atoms:

-- 
With kind regards,

Tom Wijsman (TomWij)
Gentoo Developer

E-mail address  : tom...@gentoo.org
GPG Public Key  : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2  ABF0 95B2 1FCD 6D34 E57D

Attachment: signature.asc
Description: PGP signature

Reply via email to