[blivet:master+? 0/9] More work on blivet.size
Anne Mulhern
amulhern at redhat.com
Thu Oct 23 20:35:59 UTC 2014
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Thursday, October 23, 2014 4:05:43 PM
> Subject: Re: [blivet:master+? 0/9] More work on blivet.size
>
> On 10/23/2014 12:57 PM, mulhern wrote:
> > Fixes bugs of varying importance and simplifies a bit.
> >
> > Removes a change that was intended to make sort of ambiguous specs, like
> > "8 M", which sort of could be "8 MiB" or "8 MB" be interpreted as "8 MiB".
> > This is sort of a good idea, because we like to prefer binary, but
> > problematic
> > because the change broke a lot of stuff and was inconsistent within size,
> > convertTo() interpreting "M" as "MB". This is why I went back to previous,
> > where "M" is interpreted as "MB". To do it properly would require a bit of
> > thought, as _makeSpecs() believe that "M" is a specifier for "MB" and not
> > for
> > "MiB".
>
> We need to find a way to retain the current behavior ("X" -> "XiB").
> Assuming decimal makes no sense at all, really. It sounds like we also
> need to fix convertTo to do the same.
>
> I haven't read the patches yet, just wanted to speak up about the above.
>
> David
>
Things are easy if we choose not to interpret anything as decimal units.
I would be just fine w/ that...if it would work for all.
We already don't even pretend to consider attempting to display values
(via humanReadable()) with decimal units.
> >
> > Made convertTo() handle translated specs. The reasoning behind this is that
> > it was easy and convertTo() was treating some values as if they were
> > translated and others as if they were not. So adding a switch for
> > translation,
> > and making it consistent within that seems fine. Making it only handle
> > English specs would be very easy, too, however.
> >
> > mulhern (9):
> > Use b"", not u"", for _EMPTY_PREFIX.
> > Translate less eagerly in Size.humanReadable()
> > Make _lowerASCII() python 3 compatible and add a method header.
> > Change _makeSpecs() so that it translates for the empty string.
> > Add new method getSpecifiers().
> > Rewrite _parseSpec()
> > Rewrite convertTo().
> > Remove now useless imports, constants, functions.
> > Add a number of new tests.
> >
> > blivet/size.py | 195
> > ++++++++++++++++++++++++++++++-----------------------
> > tests/size_test.py | 127 ++++++++++++++++++++++++++++++----
> > 2 files changed, 222 insertions(+), 100 deletions(-)
> >
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list