From: "W. Trevor King" <wking@tremily.us>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] Re: [PATCH] Fix autoresume file paths to only be configured once.
Date: Tue, 4 Mar 2014 22:27:44 -0800 [thread overview]
Message-ID: <20140305062744.GF25297@odin.tremily.us> (raw)
In-Reply-To: <20140304210703.1fae17d0.dolsen@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2788 bytes --]
On Tue, Mar 04, 2014 at 09:07:03PM -0800, Brian Dolbec wrote:
> The unfortunate part is that a bunch of these changes will be
> replaced by other code later in the patch series.
I don't think there are any critical fixes here. If it's easier to
drop this cleanup and just jump straight to the final version, that's
fine with me too.
> > On Sun, Mar 02, 2014 at 03:05:35PM -0800, Brian Dolbec wrote:
> > > Use: pjoin as a shorter alias to os.path.join()
> >
> > I think the saved characters are not worth the mental overhead of
> > an additional layer of indirection.
> > …
>
> pjoin is something from snakeoil too, depending on the python
> version being run, it does some optimization changes if I remember
> correctly. But yes, it is a minor change.
I don't see anything in the their docs claiming optimizations [1], but
they do have a C implementation [2], so there must be something they
don't like about os.path.join. I doubt any optimizations would matter
to us, since Python-side path joins are going to be a miniscule part
of any catalyst run.
> > +1. My personal preference is for:
> >
> > '.autoresume-{}-{}-{}'.format(
> > self.settings['target'],
> > self.settings['subarch'],
> > self.settings['version_stamp'])))
> >
> > but whatever ;).
>
> I never think of the new .format method. My brain is used to %s, so
> is stuck there.
I don't think it really matters.
> To be honest, I never thought about that during these changes, I was
> just doing what was needed to fix some old issues I had fixed
> differently in 3.0, but were going to be awhile.
Which issues? Just assigning the paths to new variables? I'm fine
with this commit doing that, regardless of style, and will happily
submit any PEP 8 cleanups I think we need after master has finished
swallowing 3.0 ;).
> The autoresume stuff is later replaced with a self contained class.
> I was never sure if I should submit it, but it did fix a couple
> small issues. I can go either way with this one.
Pulling it out into a class sounds good to me, but if it's easier to
land this first (after fixing the exists() typo) and submit the
class-based autoresume later, I'm fine with that. I wanted to point
out possible style changes, but none of that needs to be settled by
this particular patch. I think the removal of duplicate path
calculations is a step in the right direction.
Cheers,
Trevor
[1]: http://docs.snakeoil.googlecode.com/git/api/snakeoil.osutils.html#snakeoil.osutils.pjoin
[2]: https://code.google.com/p/snakeoil/source/browse/src/posix.c#127
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-03-05 6:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 23:05 [gentoo-catalyst] [PATCH] Fix autoresume file paths to only be configured once Brian Dolbec
2014-03-05 4:35 ` [gentoo-catalyst] " W. Trevor King
2014-03-05 5:07 ` Brian Dolbec
2014-03-05 6:27 ` W. Trevor King [this message]
2014-03-23 0:19 ` Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140305062744.GF25297@odin.tremily.us \
--to=wking@tremily.us \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox