Discussion:
We should make blivet.size.py a separate package
Anne Mulhern
2015-01-13 17:54:26 UTC
Permalink
Hi all,

It turns out that anaconda uses Size() objects for a number of things that
are only tangentially related to storage. There's a bunch of stuff in
packaging, for instance, which does not seem that nearly related to storage
but which does use Size(). It seems cruel to make anaconda restrict its
usage of this handy Size class to only storage related stuff, but inconsistent,
if it is a storage package, not to.

Clearly, a separate package is the solution and might prove to be generally useful.

Other changes that should be made at the same time are:

1) Disentangle parsing user input from Size() construction. This would change the
interface, so that:

* Size("10 MiB") would have to be changed to Size(10, size.MiB)
* Size("%d KiB" % int(val[i])) would have to be changed to Size(int(val[i]), size.KiB)

Note: All other things being equal, the above changes would result in a speed up of about 4x,
when the argument is changed from a string to a tuple.

* Size(user_input) would have to be changed to Size(parseSpec(user_input))

2) Use int instead of Decimal for underlying representation and use delegation, not extension.
int is unbounded, and appropriate
as Size() stores exact number of bytes. The implementation will still use Decimal within
humanReadable() and convertTo(), where Decimal proves its worth. This would make (1) a bit
easier, for it would be possible to override object.__init__() instead of overriding Decimal.__new__()
which is awkward because of the context parameter which Decimal.__new__ requires.

Benefits to the change would be a 5 to 10x reduction in size of Size() objects and a 10 to 15x
speedup in constructing Size() objects and in arithmetic operations. The only arithmetic operation
I profiled was addition; I'm generalizing here.

There would be no change to the interface, and the changes in the class are actually very simple.

3) Make arithmetic operations more type-sensible.
divmod(Size("3 MiB"), Size("2 MiB"))
(Decimal('1'), Decimal('1048576'))

The semantics of divmod should agree with the, in this situation, correct semantics of mod,
which gives the type of the remainder as a Size.
Size("3 MiB") % Size("2 MiB")
Size('1 MiB')
2 ** Size("3 B")
Decimal('8')
Size("3 MiB") / Size("2 MiB")
Size('1 B')

and so forth.

In theory, our code should not be asking for really nonsensical operations like 2 ** Size("1 MiB"),
and I think it is not.

It can be made configurable how extreme the reaction is to a requested operation that makes no sense.

There are certain operations that are mathematically sensible, but which the implementation
would not, because it could not, support. One such operation is 2 MiB * 2 KiB which yields
4096 KiB^^2. We have no ability to represent that, so it would be better to raise a TypeError when
called upon to calculate it rather than return, as now, Size('4 GiB').
I believe that computations in this category are not ones that we
actually do in Blivet or Anaconda or should expect to. The context in which they could arise is
in, e.g., statistics, where in order to calculate the standard deviation, one has to square
the values. But if we start doing statistics on some MiB's we should not be using Size
class at all, we can use pint, which is good for that, but bad for our regular purposes.

NOTE: Most of the _implementation_ is already done, leaving just packaging and a few places
in anaconda where it will require a little thought to decide if parseSpec is called for.

Please give me your opinions. Maybe we can discuss this in installer meeting.

- mulhern
David Lehman
2015-01-15 15:51:33 UTC
Permalink
Post by Anne Mulhern
Hi all,
It turns out that anaconda uses Size() objects for a number of things that
are only tangentially related to storage. There's a bunch of stuff in
packaging, for instance, which does not seem that nearly related to storage
but which does use Size(). It seems cruel to make anaconda restrict its
usage of this handy Size class to only storage related stuff, but inconsistent,
if it is a storage package, not to.
I don't see this as being cruel or limiting given that anaconda is
already using blivet, but I also don't have any objections if you want
to take on the additional work of maintaining another package for it. I
agree with all of the proposed changes below, noting that none of them
depend upon size being a separate package.

David
Post by Anne Mulhern
Clearly, a separate package is the solution and might prove to be generally useful.
1) Disentangle parsing user input from Size() construction. This would change the
* Size("10 MiB") would have to be changed to Size(10, size.MiB)
* Size("%d KiB" % int(val[i])) would have to be changed to Size(int(val[i]), size.KiB)
Note: All other things being equal, the above changes would result in a speed up of about 4x,
when the argument is changed from a string to a tuple.
* Size(user_input) would have to be changed to Size(parseSpec(user_input))
2) Use int instead of Decimal for underlying representation and use delegation, not extension.
int is unbounded, and appropriate
as Size() stores exact number of bytes. The implementation will still use Decimal within
humanReadable() and convertTo(), where Decimal proves its worth. This would make (1) a bit
easier, for it would be possible to override object.__init__() instead of overriding Decimal.__new__()
which is awkward because of the context parameter which Decimal.__new__ requires.
Benefits to the change would be a 5 to 10x reduction in size of Size() objects and a 10 to 15x
speedup in constructing Size() objects and in arithmetic operations. The only arithmetic operation
I profiled was addition; I'm generalizing here.
There would be no change to the interface, and the changes in the class are actually very simple.
3) Make arithmetic operations more type-sensible.
divmod(Size("3 MiB"), Size("2 MiB"))
(Decimal('1'), Decimal('1048576'))
The semantics of divmod should agree with the, in this situation, correct semantics of mod,
which gives the type of the remainder as a Size.
Size("3 MiB") % Size("2 MiB")
Size('1 MiB')
2 ** Size("3 B")
Decimal('8')
Size("3 MiB") / Size("2 MiB")
Size('1 B')
and so forth.
In theory, our code should not be asking for really nonsensical operations like 2 ** Size("1 MiB"),
and I think it is not.
It can be made configurable how extreme the reaction is to a requested operation that makes no sense.
There are certain operations that are mathematically sensible, but which the implementation
would not, because it could not, support. One such operation is 2 MiB * 2 KiB which yields
4096 KiB^^2. We have no ability to represent that, so it would be better to raise a TypeError when
called upon to calculate it rather than return, as now, Size('4 GiB').
I believe that computations in this category are not ones that we
actually do in Blivet or Anaconda or should expect to. The context in which they could arise is
in, e.g., statistics, where in order to calculate the standard deviation, one has to square
the values. But if we start doing statistics on some MiB's we should not be using Size
class at all, we can use pint, which is good for that, but bad for our regular purposes.
NOTE: Most of the _implementation_ is already done, leaving just packaging and a few places
in anaconda where it will require a little thought to decide if parseSpec is called for.
Please give me your opinions. Maybe we can discuss this in installer meeting.
- mulhern
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Anne Mulhern
2015-02-17 17:45:49 UTC
Permalink
Alas, it is not fully packaged yet, because I know so little about how to do this packaging thing,
or how to know if I've done it right.

The code is here: https://github.com/rhinstaller/bytesize.

The generated docs are here: http://python-bytesize.readthedocs.org/en/latest/.
There is clearly a problem w/ the package documentation somehow going missing.
It doesn't go missing in my private copy.

The changes are as previously outlined below.

This is a call for comments. I'ld like to move fast on the part where
I adapt blivet, blivet-gui, anaconda to use the new library.

- mulhern

----- Original Message -----
Sent: Thursday, January 15, 2015 10:51:33 AM
Subject: Re: We should make blivet.size.py a separate package
Post by Anne Mulhern
Hi all,
It turns out that anaconda uses Size() objects for a number of things that
are only tangentially related to storage. There's a bunch of stuff in
packaging, for instance, which does not seem that nearly related to storage
but which does use Size(). It seems cruel to make anaconda restrict its
usage of this handy Size class to only storage related stuff, but inconsistent,
if it is a storage package, not to.
I don't see this as being cruel or limiting given that anaconda is
already using blivet, but I also don't have any objections if you want
to take on the additional work of maintaining another package for it. I
agree with all of the proposed changes below, noting that none of them
depend upon size being a separate package.
David
Post by Anne Mulhern
Clearly, a separate package is the solution and might prove to be generally useful.
1) Disentangle parsing user input from Size() construction. This would change the
* Size("10 MiB") would have to be changed to Size(10, size.MiB)
* Size("%d KiB" % int(val[i])) would have to be changed to
Size(int(val[i]), size.KiB)
Note: All other things being equal, the above changes would result in a
speed up of about 4x,
when the argument is changed from a string to a tuple.
* Size(user_input) would have to be changed to Size(parseSpec(user_input))
2) Use int instead of Decimal for underlying representation and use
delegation, not extension.
int is unbounded, and appropriate
as Size() stores exact number of bytes. The implementation will still use
Decimal within
humanReadable() and convertTo(), where Decimal proves its worth. This would
make (1) a bit
easier, for it would be possible to override object.__init__() instead of
overriding Decimal.__new__()
which is awkward because of the context parameter which Decimal.__new__ requires.
Benefits to the change would be a 5 to 10x reduction in size of Size()
objects and a 10 to 15x
speedup in constructing Size() objects and in arithmetic operations. The
only arithmetic operation
I profiled was addition; I'm generalizing here.
There would be no change to the interface, and the changes in the class are
actually very simple.
3) Make arithmetic operations more type-sensible.
divmod(Size("3 MiB"), Size("2 MiB"))
(Decimal('1'), Decimal('1048576'))
The semantics of divmod should agree with the, in this situation, correct
semantics of mod,
which gives the type of the remainder as a Size.
Size("3 MiB") % Size("2 MiB")
Size('1 MiB')
2 multiplied by itself 3 bytes times should raise an exception or
2 ** Size("3 B")
Decimal('8')
The number of times 2 MiB can be subtracted from 3 MiB is not 1 bytes
Size("3 MiB") / Size("2 MiB")
Size('1 B')
and so forth.
In theory, our code should not be asking for really nonsensical operations
like 2 ** Size("1 MiB"),
and I think it is not.
It can be made configurable how extreme the reaction is to a requested
operation that makes no sense.
There are certain operations that are mathematically sensible, but which
the implementation
would not, because it could not, support. One such operation is 2 MiB * 2
KiB which yields
4096 KiB^^2. We have no ability to represent that, so it would be better to
raise a TypeError when
called upon to calculate it rather than return, as now, Size('4 GiB').
I believe that computations in this category are not ones that we
actually do in Blivet or Anaconda or should expect to. The context in which
they could arise is
in, e.g., statistics, where in order to calculate the standard deviation,
one has to square
the values. But if we start doing statistics on some MiB's we should not be using Size
class at all, we can use pint, which is good for that, but bad for our
regular purposes.
NOTE: Most of the _implementation_ is already done, leaving just packaging
and a few places
in anaconda where it will require a little thought to decide if parseSpec
is called for.
Please give me your opinions. Maybe we can discuss this in installer meeting.
- mulhern
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Chris Lumens
2015-02-17 18:16:21 UTC
Permalink
Post by Anne Mulhern
Alas, it is not fully packaged yet, because I know so little about how to do this packaging thing,
or how to know if I've done it right.
The code is here: https://github.com/rhinstaller/bytesize.
The generated docs are here: http://python-bytesize.readthedocs.org/en/latest/.
There is clearly a problem w/ the package documentation somehow going missing.
It doesn't go missing in my private copy.
The changes are as previously outlined below.
This is a call for comments. I'ld like to move fast on the part where
I adapt blivet, blivet-gui, anaconda to use the new library.
Do you want me to get this set up in jenkins?

- Chris
Alexander Todorov
2015-02-18 07:53:57 UTC
Permalink
Post by Chris Lumens
Post by Anne Mulhern
Alas, it is not fully packaged yet, because I know so little about how to do this packaging thing,
or how to know if I've done it right.
The code is here: https://github.com/rhinstaller/bytesize.
The generated docs are here: http://python-bytesize.readthedocs.org/en/latest/.
There is clearly a problem w/ the package documentation somehow going missing.
It doesn't go missing in my private copy.
The changes are as previously outlined below.
This is a call for comments. I'ld like to move fast on the part where
I adapt blivet, blivet-gui, anaconda to use the new library.
Do you want me to get this set up in jenkins?
Please do.


--
Alex
Vratislav Podzimek
2015-02-19 10:45:38 UTC
Permalink
Post by Anne Mulhern
Alas, it is not fully packaged yet, because I know so little about how to do this packaging thing,
or how to know if I've done it right.
The code is here: https://github.com/rhinstaller/bytesize.
Maybe a stupid question, but what's the benefit of this over having the
same as a blivet subpackage? I'd completely understand moving it outside
if you e.g. wanted to rewrite the code as GObject code so that it's
usable not only from python. But keeping the code more or less the same
I don't see a benefit of having this as a separate codebase and separate
component (in bugzilla, everywhere).
--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
Anne Mulhern
2015-02-19 13:30:48 UTC
Permalink
The two drawbacks to making it a separate package are:
1) The tasks involved in making a separate package are a big pain.
2) Moving translations is going to be a bit tricky.

But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.

I don't mind if it's usable only from Python. I feel like its
better to assist Python programmers than to enable C programmers,
who probably wouldn't appreciate it's facilities anyway.
It makes use of Python facilities like unbounded ints
and the Decimal class in its implementation. These are not so easy
to come by in C.

- mulhern

----- Original Message -----
Sent: Thursday, February 19, 2015 5:45:38 AM
Subject: Re: Announcing the existance of a separate python-bytesize package to handle the Size functionality of
blivet.
Post by Anne Mulhern
Alas, it is not fully packaged yet, because I know so little about how to
do this packaging thing,
or how to know if I've done it right.
The code is here: https://github.com/rhinstaller/bytesize.
Maybe a stupid question, but what's the benefit of this over having the
same as a blivet subpackage? I'd completely understand moving it outside
if you e.g. wanted to rewrite the code as GObject code so that it's
usable not only from python. But keeping the code more or less the same
I don't see a benefit of having this as a separate codebase and separate
component (in bugzilla, everywhere).
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Vratislav Podzimek
2015-02-19 14:58:50 UTC
Permalink
Post by Anne Mulhern
1) The tasks involved in making a separate package are a big pain.
2) Moving translations is going to be a bit tricky.
But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.
A subpackage built from the blivet sources doesn't have to depend on
blivet at all. And it can even have a totally unrelated name.
Post by Anne Mulhern
I don't mind if it's usable only from Python. I feel like its
better to assist Python programmers than to enable C programmers,
who probably wouldn't appreciate it's facilities anyway.
It makes use of Python facilities like unbounded ints
and the Decimal class in its implementation. These are not so easy
to come by in C.
That's exactly why it would be really useful in C too. e.g. in udisks,
Cockpit or whatever non-python project.
--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
Anne Mulhern
2015-02-19 15:31:24 UTC
Permalink
----- Original Message -----
Sent: Thursday, February 19, 2015 9:58:50 AM
Subject: Re: Announcing the existance of a separate python-bytesize package to handle the Size functionality of
blivet.
Post by Anne Mulhern
1) The tasks involved in making a separate package are a big pain.
2) Moving translations is going to be a bit tricky.
But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.
A subpackage built from the blivet sources doesn't have to depend on
blivet at all. And it can even have a totally unrelated name.
The idea of a sub-package is alluring...because this package
maintainer process is so miserable right now.

But I think that bytesize can be viewed as entirely distinct
from blivet, and it doesn't seem to be the purpose of subpackages
to contain potentially completely independent and far more general
packages (based on what the old Maximum RPM book has to say).
Post by Anne Mulhern
I don't mind if it's usable only from Python. I feel like its
better to assist Python programmers than to enable C programmers,
who probably wouldn't appreciate it's facilities anyway.
It makes use of Python facilities like unbounded ints
and the Decimal class in its implementation. These are not so easy
to come by in C.
That's exactly why it would be really useful in C too. e.g. in udisks,
Cockpit or whatever non-python project.
When these people come clamouring for a C version of bytesize, I will listen politely,
and try to help them all I can. But my natural diffidence says that rewriting
bits of some rather sophisticated Python libraries and so forth in
C is bound to result in some mistakes. I honestly think that the
people who developed the Decimal class know way more about numeric
representations than I do, and I know way more than the average programmer.
The cost of even minor development and maintenance will go up an order of magnitude
if this thing is rewritten in C; I'm in no hurry to pay that cost, and the
startup cost of rewriting, until it is shown to be necessary or very desirable.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
- mulhern
Adam Williamson
2015-02-19 16:45:09 UTC
Permalink
Post by Anne Mulhern
Post by Vratislav Podzimek
Post by Anne Mulhern
But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.
A subpackage built from the blivet sources doesn't have to depend
on blivet at all. And it can even have a totally unrelated name.
The idea of a sub-package is alluring...because this package
maintainer process is so miserable right now.
But I think that bytesize can be viewed as entirely distinct
from blivet, and it doesn't seem to be the purpose of subpackages to
contain potentially completely independent and far more general
packages (based on what the old Maximum RPM book has to say).
If you use setuptools appropriately, the whole packaging thing isn't
really that bad. It only took me an hour or two to set up the packages
for python-wikitcms (still waiting on Fedora review, though). setup.py:

https://www.happyassassin.net/cgit/wikitcms/tree/setup.py

and the RPM spec looks like this:

------------------

%global srcname wikitcms

Name: python-wikitcms
Version: 1.10.2
Release: 1%{?dist}
Summary: Fedora QA wiki test management Python library

Group: System Environment/Libraries
License: GPLv3+
URL: https://www.happyassassin.net/wikitcms
Source0: https://www.happyassassin.net/wikitcms/releases/%{srcname}-%{version}.tar.xz
BuildArch: noarch

BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: python-mwclient >= 0.7
Requires: fedfind >= 1.0.5

%description
Wikitcms is a library for interacting with Fedora's wiki-based 'test management'
system and creating the pages for various types of test event.

%prep
%setup -q -n %{srcname}-%{version}

%build
%{__python2} setup.py build

%install
rm -rf %{buildroot}
%{__python2} setup.py install --skip-build --root %{buildroot}

%files
%doc README.md COPYING
%{python2_sitelib}/%{srcname}*

%changelog
(changes)

---------------

building for both Py2 and Py3 requires a bit more work, but not really
a lot. You can build source tarballs with sdist - python ./setup.py
sdist --formats=tar . I wrote a trivial little 'release.sh' for my
things which bumps the version, does a git tag, pushes it, builds a
tarball, xz'es it, and scps it to the release server. Let me know if
you need a reviewer for the package, I'd be happy to do it.
Unfortunately I'm not a sponsor, though, if you need sponsoring.
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net
Leslie S Satenstein
2015-02-19 16:57:19 UTC
Permalink
From: Adam Williamson <***@redhat.com>

To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-***@redhat.com>
Sent: Thursday, February 19, 2015 11:45 AM
Subject: Re: Announcing the existance of a separate python-bytesize package to handle the Size functionality of blivet.
Post by Anne Mulhern
Post by Vratislav Podzimek
Post by Anne Mulhern
But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.
A subpackage built from the blivet sources doesn't have to depend
on blivet at all. And it can even have a totally unrelated name.
The idea of a sub-package is alluring...because this package
maintainer process is so miserable right now.
But I think that bytesize can be viewed as entirely distinct
from blivet, and it doesn't seem to be the purpose of subpackages to
contain potentially completely independent and far more general
packages (based on what the old Maximum RPM book has to say).
If you use setuptools appropriately, the whole packaging thing isn't
really that bad. It only took me an hour or two to set up the packages
for python-wikitcms (still waiting on Fedora review, though). setup.py:

https://www.happyassassin.net/cgit/wikitcms/tree/setup.py

and the RPM spec looks like this:

------------------

%global srcname wikitcms

Name:          python-wikitcms
Version:        1.10.2
Release:        1%{?dist}
Summary:        Fedora QA wiki test management Python library

Group:          System Environment/Libraries
License:        GPLv3+
URL:            https://www.happyassassin.net/wikitcms
Source0:        https://www.happyassassin.net/wikitcms/releases/%{srcname}-%{version}.tar.xz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
Requires:      python-mwclient >= 0.7
Requires:      fedfind >= 1.0.5

%description
Wikitcms is a library for interacting with Fedora's wiki-based 'test management'
system and creating the pages for various types of test event.

%prep
%setup -q -n %{srcname}-%{version}

%build
%{__python2} setup.py build

%install
rm -rf %{buildroot}
%{__python2} setup.py install --skip-build --root %{buildroot}

%files
%doc README.md COPYING
%{python2_sitelib}/%{srcname}*

%changelog
(changes)

---------------

building for both Py2 and Py3 requires a bit more work, but not really
a lot. You can build source tarballs with sdist - python ./setup.py
sdist --formats=tar . I wrote a trivial little 'release.sh' for my
things which bumps the version, does a git tag, pushes it, builds a
tarball, xz'es it, and scps it to the release server. Let me know if
you need a reviewer for the package, I'd be happy to do it.
Unfortunately I'm not a sponsor, though, if you need sponsoring.
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net
Vratislav Podzimek
2015-02-20 13:53:20 UTC
Permalink
Post by Anne Mulhern
----- Original Message -----
Sent: Thursday, February 19, 2015 9:58:50 AM
Subject: Re: Announcing the existance of a separate python-bytesize package to handle the Size functionality of
blivet.
Post by Anne Mulhern
1) The tasks involved in making a separate package are a big pain.
2) Moving translations is going to be a bit tricky.
But the advantage is that it can be used outside of blivet.
There is nothing about it which is really blivet specific,
and I think that it should be made possible to use w/out
requiring blivet.
A subpackage built from the blivet sources doesn't have to depend on
blivet at all. And it can even have a totally unrelated name.
The idea of a sub-package is alluring...because this package
maintainer process is so miserable right now.
But I think that bytesize can be viewed as entirely distinct
from blivet, and it doesn't seem to be the purpose of subpackages
to contain potentially completely independent and far more general
packages (based on what the old Maximum RPM book has to say).
I don't think bytes are used for something different than storage and
memory sizes.
Post by Anne Mulhern
Post by Anne Mulhern
I don't mind if it's usable only from Python. I feel like its
better to assist Python programmers than to enable C programmers,
who probably wouldn't appreciate it's facilities anyway.
It makes use of Python facilities like unbounded ints
and the Decimal class in its implementation. These are not so easy
to come by in C.
That's exactly why it would be really useful in C too. e.g. in udisks,
Cockpit or whatever non-python project.
When these people come clamouring for a C version of bytesize, I will listen politely,
and try to help them all I can. But my natural diffidence says that rewriting
bits of some rather sophisticated Python libraries and so forth in
C is bound to result in some mistakes. I honestly think that the
people who developed the Decimal class know way more about numeric
representations than I do, and I know way more than the average programmer.
The cost of even minor development and maintenance will go up an order of magnitude
if this thing is rewritten in C; I'm in no hurry to pay that cost, and the
startup cost of rewriting, until it is shown to be necessary or very desirable.
I'd use the same reasoning for the need of a separate package. So far,
no code uses the Size class without using blivet. Having it as a
separate (sub)package could make the difference because it would
suddenly be possible to use it without pulling all of blivet and its
dependencies (subpackage is enough for that). The same could happen with
the change of the implementation using C instead of Python. I'm not
saying you should start rewriting the whole thing in C right now, but
without any visions like that for the future I don't really see a point
in having it as a separate package. Especially considering the amount of
effort&time needed to make it happen in contrast to a few lines changed
in blivet's Makefile and spec.
--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
Brian C. Lane
2015-02-20 16:49:34 UTC
Permalink
Post by Vratislav Podzimek
I'd use the same reasoning for the need of a separate package. So far,
no code uses the Size class without using blivet. Having it as a
separate (sub)package could make the difference because it would
suddenly be possible to use it without pulling all of blivet and its
dependencies (subpackage is enough for that). The same could happen with
the change of the implementation using C instead of Python. I'm not
saying you should start rewriting the whole thing in C right now, but
without any visions like that for the future I don't really see a point
in having it as a separate package. Especially considering the amount of
effort&time needed to make it happen in contrast to a few lines changed
in blivet's Makefile and spec.
I don't see how it would hurt to have it as its own package. And you
can't discount the learning experience for Anne, it's actually a nicely
contained problem to use for a first packaging experience.

I also don't see any reason to bring up C. This is a useful Python
module, leave it at that, package it so others can use it.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Loading...