A nasty licencing question

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

A nasty licencing question

Sampsa Riikonen
Hi,

I have an "advanced" question about the PyQt license. 

1) There's a programming library with a python interface, let's call it
"LIB"

2) LIB can be combined with PyQt to make graphical user interfaces

3) Small sample programs ("snippets") are provided publicly for LIB's
API users, so that they learn how to use PyQt with LIB

4) The snippets are MIT licensed, i.e. "free game" for developers (with
no obligations)

5) The idea is, that developers can base their own programs on the
"snippets" .. However, for the programs they build, they must cope
themselves with the PyQt license (either choose GPL or commercial)


The questions is:

Is this logic flawed?  Can the snippets be MIT licensed at all.. or must
they follow the PyQt licensing scheme, i.e. either GPL or commercial.

In the latter case, can the snippets be MIT licensed?


Regards,

Sampsa



_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

V. Armando Solé
On 29.07.2018 22:23, Sampsa Riikonen wrote:
>
> The questions is:
>
> Is this logic flawed?  Can the snippets be MIT licensed at all.. or
> must
> they follow the PyQt licensing scheme, i.e. either GPL or commercial.
>
> In the latter case, can the snippets be MIT licensed?
>

Why not? For instance, your code might end up (with or without
modifications) being used with PySide.

We are in a similar use case. Our library is MIT however, we warn the
users of our library about the fact their developed programs will have
to follow the licensing conditions of PyQt if they use PyQt.

Armando
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

David Boddie
In reply to this post by Sampsa Riikonen
On Sun Jul 29 21:23:23 BST 2018, Sampsa Riikonen wrote:

> The questions is:
>
> Is this logic flawed?  Can the snippets be MIT licensed at all.. or must
> they follow the PyQt licensing scheme, i.e. either GPL or commercial.

My understanding is that the snippets on their own can be licensed however
you wish. The only issue occurs when you want to combine them with something
else.

However, I believe they can be combined with PyQt because the MIT license is
compatible with the GPL:

https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean

I think that the combination of snippets + LIB + PyQt you might distribute
would be a combined work, so the whole work would fall under the terms of
the GPL. However, you didn't say what the license of LIB was, so maybe there
are other considerations to take into account.

> In the latter case, can the snippets be MIT licensed?

Licensing them under the MIT license is fine as long as the MIT and PyQt
commercial licenses are compatible, but I don't know enough about that to
comment.

David
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Sampsa Riikonen
In reply to this post by V. Armando Solé

On 30.07.2018 00:24, V. Armando Sole wrote:

> On 29.07.2018 22:23, Sampsa Riikonen wrote:
>>
>> The questions is:
>>
>> Is this logic flawed?  Can the snippets be MIT licensed at all.. or must
>> they follow the PyQt licensing scheme, i.e. either GPL or commercial.
>>
>> In the latter case, can the snippets be MIT licensed?
>>
>
> Why not? For instance, your code might end up (with or without
> modifications) being used with PySide.

But once you distribute (i.e. make public) a code that has the magic
lines "from PyQt5 import .." (and if you don't have the commercial PyQt
license) *bang* it will be GPL forever.  :)

It doesn't make any difference if you change that "from PyQt5 import .."
into "from PySide2 import ..".  It's still "derived" work.

On the other hand, if you had released the software originally with
"from PySide2 import .." there would be no problem.  The person who
changes that to "from PyQt5 .." is the one with the problem.

Let's dig deeper and consider the following:

Person (1) uploads python LIBRARY to the internet that has "from PyQt5
import .." and claims it is licensed with license X and Person (2) uses
LIBRARY to produce PROGRAM

Now there are two cases (A and B) with different consequences:

CASE A
----------

Person (1) did not have a commercial PyQt license => Person (2) PROGRAM
will be licensed under GPL
Person (2) had a commercial PyQt license => Person (2) PROGRAM will be
licensed under X

There is a legal limbo here: Person (2) has the responsibility of
knowing if Person (1) had the commercial PyQt license or not in the
first place (because of the double-licensing scheme)

CASE B
---------

Person (1) had or did not have a commercial PyQt license - doesn't
matter.  It is up to Person (2) to get his own PyQt license.  Once
Person (2) has the commercial license he can license PROGRAM as he wishes.

But case (B) is in contradiction with GPL .. derived work is also GPL. 
So it must be the legal-limbo case (A).

There isn't even any official license text available with clear legal
definitions for a "PyQt license" (compare to the legal texts defining
GPL etc. licenses)  The only thing I found is this:

https://www.riverbankcomputing.com/commercial/pyqt

Good luck with licensing your code and using PyQt-based opensource
libraries! :)

I think I'll give PySide a try.

Regards,

Sampsa



_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

David Boddie
> On Mon Jul 30 09:14:58 BST 2018, Sampsa Riikonen wrote:
>
> On 30.07.2018 00:24, V. Armando Sole wrote:
>
> > On 29.07.2018 22:23, Sampsa Riikonen wrote:
> >
> >> In the latter case, can the snippets be MIT licensed?
> >
> > Why not? For instance, your code might end up (with or without
> > modifications) being used with PySide.
>
> But once you distribute (i.e. make public) a code that has the magic
> lines "from PyQt5 import .." (and if you don't have the commercial PyQt
> license) *bang* it will be GPL forever.  :)

How does apply to the scripts you were talking about? Sure, the combined
work is now licensed under the GPL but the original scripts can still be
obtained from outside the combined work and are still MIT licensed.

David
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Sampsa Riikonen


On 30.07.2018 12:16, David Boddie wrote:

>> On Mon Jul 30 09:14:58 BST 2018, Sampsa Riikonen wrote:
>>
>> On 30.07.2018 00:24, V. Armando Sole wrote:
>>
>>> On 29.07.2018 22:23, Sampsa Riikonen wrote:
>>>
>>>> In the latter case, can the snippets be MIT licensed?
>>> Why not? For instance, your code might end up (with or without
>>> modifications) being used with PySide.
>> But once you distribute (i.e. make public) a code that has the magic
>> lines "from PyQt5 import .." (and if you don't have the commercial PyQt
>> license) *bang* it will be GPL forever.  :)
> How does apply to the scripts you were talking about? Sure, the combined
> work is now licensed under the GPL but the original scripts can still be
> obtained from outside the combined work and are still MIT licensed.

What do you mean David..?

Do you mean if you remove "from PyQt5 import .." then that's "outside
combined work" and thus is not anymore GPL licensed?

Regards,

Sampsa


>
> David
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

David Boddie
On Mon Jul 30 10:23:50 BST 2018, Sampsa Riikonen wrote:
> On 30.07.2018 12:16, David Boddie wrote:

> > How does apply to the scripts you were talking about? Sure, the combined
> > work is now licensed under the GPL but the original scripts can still be
> > obtained from outside the combined work and are still MIT licensed.

I was being a bit careless with words. I meant "snippets" rather than
"scripts", but your questions below are still valid. In my mind they are
different things, but that's not important here. :-)

> What do you mean David..?
>
> Do you mean if you remove "from PyQt5 import .." then that's "outside
> combined work" and thus is not anymore GPL licensed?

No, if you obtain something licensed under the GPL then changing the module
dependencies isn't going to change its license.

However, I don't exactly know how things work legally if you obtain a program
which is a collection of files (executable, modules, etc.) and some files
contain MIT license text, others GPL license text, and so on, then you want
to redistribute parts of it.

If there is a file with an MIT license in that combined work that you want
to redistribute then it will still have its original license text. I don't
see why it couldn't be distributed again under its original license.
However, if it was modified by the person who supplied the combined work
then perhaps those modifications would be licensed under the license of the
combined work, so you couldn't redistribute it under the MIT license again,
though I'm not sure I've ever seen something like that.

I think the core issue here is that, if person A uses a snippet to create a
combined work and distributes it under the GPL (or the LGPL for that matter)
then whoever receives it needs to get the rights those licenses grant them.
If person B instead extracts the snippet from the combined work and creates a
closed version then they have to show that the snippet was obtained under the
MIT license. If the snippet was modified by person A to the extent that they
hold copyright on parts of it then person B may not be able to show that and
there could be a license incompatibility.

This is based on my incomplete understanding of how licenses interact in
combined works. I'd like to see a description of how projects with multiple
licenses handle situations like these - links anyone?

David
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Sampsa Riikonen


On 30.07.2018 13:47, David Boddie wrote:

> On Mon Jul 30 10:23:50 BST 2018, Sampsa Riikonen wrote:
>> On 30.07.2018 12:16, David Boddie wrote:
>>> How does apply to the scripts you were talking about? Sure, the combined
>>> work is now licensed under the GPL but the original scripts can still be
>>> obtained from outside the combined work and are still MIT licensed.
> I was being a bit careless with words. I meant "snippets" rather than
> "scripts", but your questions below are still valid. In my mind they are
> different things, but that's not important here. :-)
>
>> What do you mean David..?
>>
>> Do you mean if you remove "from PyQt5 import .." then that's "outside
>> combined work" and thus is not anymore GPL licensed?
> No, if you obtain something licensed under the GPL then changing the module
> dependencies isn't going to change its license.

Hi David,

This is exactly what I was talking about.

So, if at a certain moment, you don't have the PyQt license and add the
following line into your code:

from PyQt import ...

Then that's it.  Your code will be forever GPL .. it became GPL at the
very moment you distributed it (uploaded to the internet).  You can't
use it anymore in any other context that GPL.  Even removing those
damning lines wont save it.

If the author claims that the module has a MIT (or any other license),
the people using that module must find out if the author had a valid
PyQt license at the moment he distributed it.. otherwise they step on
the license landmine (a nice legal limbo)

However, if you write

# from PyQt import ..  # be aware of the licensing consequences
from PySide2 import ..

Then the licensing landmine doesn't go off, as the first line is a
comment only, not actual code.  Funny world.  :)

Regards,

Sampsa




_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Kovid Goyal
On Mon, Jul 30, 2018 at 04:19:54PM +0300, Sampsa Riikonen wrote:
> from PyQt import ...
>
> Then that's it.  Your code will be forever GPL .. it became GPL at the
> very moment you distributed it (uploaded to the internet).  You can't
> use it anymore in any other context that GPL.  Even removing those
> damning lines wont save it.


What nonsense. Adding a few words to code, no matter what those words
might be does not change their license. The worst that they can do is
make it illegal to distribute your code without complying with the terms
of the GPL. And even that is not clear in this case, since code snippets
will likely fall under fair-use exemptions. And if you subsequently
remove those words you can then perfectly well distribute the code in
non-GPL compliant fashions in the future.

To repeat, adding "from PyQt import ... " DOES NOT make your code GPLed,
at that point or at any time in the future. If you distribute a product
containing that code in a non-GPLed fashion, then the holder of the
copyright to PyQt can revoke your right to use PyQt, in which case you
will need to change your product to not use PyQt or cease distributing
it.

And none of this applies of snippets of code, which are distributed in
a fashion that is compliant with the GPL by definition, since the code
snippet is the source code of the product being distributed.
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Kyle Altendorf
In reply to this post by Sampsa Riikonen


On 2018-07-30 09:19, Sampsa Riikonen wrote:

> On 30.07.2018 13:47, David Boddie wrote:
>> On Mon Jul 30 10:23:50 BST 2018, Sampsa Riikonen wrote:
>>> On 30.07.2018 12:16, David Boddie wrote:
>>>> How does apply to the scripts you were talking about? Sure, the
>>>> combined
>>>> work is now licensed under the GPL but the original scripts can
>>>> still be
>>>> obtained from outside the combined work and are still MIT licensed.
>> I was being a bit careless with words. I meant "snippets" rather than
>> "scripts", but your questions below are still valid. In my mind they
>> are
>> different things, but that's not important here. :-)
>>
>>> What do you mean David..?
>>>
>>> Do you mean if you remove "from PyQt5 import .." then that's "outside
>>> combined work" and thus is not anymore GPL licensed?
>> No, if you obtain something licensed under the GPL then changing the
>> module
>> dependencies isn't going to change its license.
>
> So, if at a certain moment, you don't have the PyQt license and add the
> following line into your code:
>
> from PyQt import ...
>
> Then that's it.  Your code will be forever GPL .. it became GPL at the
> very moment you distributed it (uploaded to the internet).  You can't
> use it anymore in any other context that GPL.  Even removing those
> damning lines wont save it.

The author can make new code (even based on their existing code) and
release it under another license.  In fact, Qt and PyQt both do this
without even making changes.  But sure, when you go to distribute it you
ought to do so under an appropriate license for the code.  Making use of
(free) PyQt in the code would mean you should license it as GPL.

It sounds like the (maybe) simple solution though is to use PySide2 so
that you can license your code any way you want (presumably at least a
GPL compatible license, to meet your goals).  If someone wants to use
(free) PyQt, they can make the change and deal with the GPL licensing
concerns of what they distribute.  Or, get a lawyer and analyze each
'snippet'/script to see if it falls under the referenced 'fair use'
conditions.

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

V. Armando Solé
In reply to this post by Sampsa Riikonen
On 30.07.2018 10:14, Sampsa Riikonen wrote:

> On 30.07.2018 00:24, V. Armando Sole wrote:
>> On 29.07.2018 22:23, Sampsa Riikonen wrote:
>>> Is this logic flawed?  Can the snippets be MIT licensed at all.. or
>>> must
>>> they follow the PyQt licensing scheme, i.e. either GPL or commercial.
>>>
>>> In the latter case, can the snippets be MIT licensed?
>>>
>>
>> Why not? For instance, your code might end up (with or without
>> modifications) being used with PySide.
>
> But once you distribute (i.e. make public) a code that has the magic
> lines "from PyQt5 import .." (and if you don't have the commercial PyQt
> license) *bang* it will be GPL forever.  :)
>


Certainly not. If the original code is made public under MIT, it will be
possible to modify it according to the MIT license.

If the person modifying/using the code decides to license the derived
code according to a more restrictive license, it is also possible. You
can put "from PyQt5 import .." and still license your code under MIT,
under GPL, under LGPL or whatever you want:

A) If the end user of your library has a commercial PyQt license (s)he
will not be forced to open the derived code (unless you have chosen GPL
or LGPL as license of YOUR code).

B) (s)he will be able to change "from PyQt5" by "from PySide2" and use
PySide2 without having to be GPL and thus being able to choose MIT,
LGPL, GPL, Comercial, ...

Armando
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

Phil Thompson-5
In reply to this post by Sampsa Riikonen
On 29 Jul 2018, at 9:23 pm, Sampsa Riikonen <[hidden email]> wrote:

>
> Hi,
>
> I have an "advanced" question about the PyQt license.
>
> 1) There's a programming library with a python interface, let's call it
> "LIB"
>
> 2) LIB can be combined with PyQt to make graphical user interfaces
>
> 3) Small sample programs ("snippets") are provided publicly for LIB's
> API users, so that they learn how to use PyQt with LIB
>
> 4) The snippets are MIT licensed, i.e. "free game" for developers (with
> no obligations)
>
> 5) The idea is, that developers can base their own programs on the
> "snippets" .. However, for the programs they build, they must cope
> themselves with the PyQt license (either choose GPL or commercial)
>
>
> The questions is:
>
> Is this logic flawed?  Can the snippets be MIT licensed at all.. or must
> they follow the PyQt licensing scheme, i.e. either GPL or commercial.
>
> In the latter case, can the snippets be MIT licensed?

It's an issue of license compatibility. You should use a license for your own code that is compatibile with your potential user's PyQt license (either commercial or GPL). The MIT license meets that requirement.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: A nasty licencing question

David Boddie
In reply to this post by Sampsa Riikonen
On Mon Jul 30 14:19:54 BST 2018, Sampsa Riikonen wrote:

> This is exactly what I was talking about.
>
> So, if at a certain moment, you don't have the PyQt license and add the
> following line into your code:
>
> from PyQt import ...
>
> Then that's it.  Your code will be forever GPL .. it became GPL at the
> very moment you distributed it (uploaded to the internet).  You can't
> use it anymore in any other context that GPL.  Even removing those
> damning lines wont save it.

As others have pointed out this is completely wrong. If you wrote the code,
you can still distribute it under another license. The recipient of the code
you distributed is receiving it under the terms of the GPL. If they go and
get your code from your website under its original license they can use it
under that license.

It would be hard for anyone to tell if they had got the original from your
website or received it in a GPL-licensed work if the code was identical,
but that's also the case if they received it in a LGPL-licensed work.

> If the author claims that the module has a MIT (or any other license),
> the people using that module must find out if the author had a valid
> PyQt license at the moment he distributed it.. otherwise they step on
> the license landmine (a nice legal limbo)

This conclusion follows from what you said before, which is wrong. It has
nothing to do with having a PyQt license (GPL or commercial).

> However, if you write
>
> # from PyQt import ..  # be aware of the licensing consequences
> from PySide2 import ..
>
> Then the licensing landmine doesn't go off, as the first line is a
> comment only, not actual code.  Funny world.  :)

Unless you fail to follow the terms of the LGPL correctly.

I wanted to add an example to my previous mail but thought it might confuse
people, but maybe it's worth mentioning: Qt is supplied with a load of third
party libraries, many with permissive licenses. It is certainly _not_ the
case that they are all now licensed under the GPL. Nobody except the author
can relicense the code for an individual library unless the license for that
library allows it.

David
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt