[SciPy-User] fit with 3 parameters ok, fit with 4 is going wrong!

Matt Newville newville at cars.uchicago.edu
Fri Feb 7 16:42:03 EST 2014


On Fri, Feb 7, 2014 at 7:22 AM, Robert Kern <robert.kern at gmail.com> wrote:

> On Fri, Feb 7, 2014 at 1:03 PM, Matt Newville
> <newville at cars.uchicago.edu> wrote:
> >
> > On Feb 6, 2014 5:14 PM, "Robert Kern" <robert.kern at gmail.com> wrote:
> >>
> >> On Thu, Feb 6, 2014 at 9:20 PM, Matt Newville
> >> <newville at cars.uchicago.edu> wrote:
> >> > Hi David,
> >> >
> >> >
> >> > On Thu, Feb 6, 2014 at 2:20 PM, Daπid <davidmenhur at gmail.com> wrote:
> >> >>
> >> >> On 6 February 2014 18:55, Matt Newville <newville at cars.uchicago.edu>
> >> >> wrote:
> >> >>>
> >> >>> I'm interested, but slightly confused.   Iminuit / probfit is
> >> >>> described
> >> >>> as BSD, but depends on (and includes?) Minuit - isn't that GPL?
> >> >>
> >> >>
> >> >> The license says iminuit is MIT, but Minuit is GPLv2. So, the Python
> >> >> part,
> >> >> that wraps the C code is MIT.
> >> >
> >> > The way I understand it, code that wraps GPLv2 code is required to use
> >> > GPL,
> >> > and so propagate the license to all code using it. That would mean
> that
> >> > code
> >> > that uses Minuit cannot be something other than GPL.   Perhaps I am
> not
> >> > understanding something.
> >>
> >> GPLed code can be combined with code under a different license as long
> >> as that other license imposes no conditions more restrictive than
> >> those in the GPL. The MIT license is one such license. This is all
> >> perfectly above board.
> >
> > Unless I am mistaken (not without precedent), the resulting mixed code
> must
> > use the GPL. If library "M" is GPL and package "Mwrapper" calls it,
> > "Mwrapper" must be GPL.   This license propagation is the distinguishing
> > characteristic of GPL, and what differentiates it from LGPL and BSD/MIT.
>  Do
> > you disagree?
>
> Yes. The combined work must be distributed under the GPL license. But
> each component can have a non-GPL-but-GPL-compatible license, like the
> MIT license. The parts of "Mwrapper" that are not "M" itself do not
> need to be GPLed. "Mwrapper+M" is GPLed. "Mwrapper" itself does not
> need to be (provided they are licensed compatibly).
>
>
The parts of Mwrapper that use M must be GPL.


> This is why I say that the *practical effect* of saying that
> "Mwrapper" is BSD-licensed is confusing. Users grab "Mwrapper+M" under
> the impression that "Mwrapper"'s license is the only one, when it is
> not.
>
> >> That said, as a practical matter, for a package that mostly just wraps
> >> the functionality of the internal GPLed component, licensing that
> >> wrapper under the MIT license leads to confusion, as we have seen.
> >
> > I think this does not lead to confusion, but to a license violation.  The
> > GPL is wordy, but not confusing.  If your code wraps (uses, links to,
> > imports, or calls) GPL code, your code must use the GPL.  Not MIT.
>
> You have misread the GPL. Please consult the FSF's information about
> mixing code with GPL-compatible licenses. The propagation applies to
> the combined work as a whole, not every single piece of code in the
> combined work.
>

Perhaps this is a bit off-topic, but I believe that I have not misread the
GPL. I do agree that it does not apply to every single piece of code in the
combined work.  But I believe (and, sorry but I am not convinced by you
saying otherwise, without strong evidence) it does apply to every piece of
code that **uses** the GPL code, including making library calls.  That is,
a wrapper that does
    import gpl_licensed_lib
    gpl_licensed_lib.function()

must use the GPL.  For sure, it can also do
    import bsd_licensed_lib
    import lgpl_licensed_lib

without requiring the code in those other libraries to change to use GPL.
Indeed, BSD code can be and is regularly used by GPL code.  But if one is
distributing a script or module that imports gpl_licensed_lib
(which,effectively links to it), that script or module is required to be
GPL.  That script or module is "the combined work as a whole" -- it is what
is being distributed for others to use.

The language on compatible licenses from the FSF is discussing what
licenses are compatible with GPL in the sense that "it is OK to include BSD
licensed code (eg, X11) in GPL code".  It most certainly does not grant
permission to distribute code under a BSD license if that code calls a GPL
library.  The LGPL does allow that, but not the GPL.

Sorry to be off-topic and slightly ranty, but this is an important (if
subtle) distinction.

--Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140207/37e808c7/attachment.html>


More information about the SciPy-User mailing list