All Unkept
Posted in: Software development, Python, Linux  —  July 15, 2009 at 10:04 PM

Python and copyright

by Luke Plant

There has been lots of interesting discussion about dynamic languages and the GPL, but much of it seems to miss the main point: with many dynamic languages, the terms of the GPL are an irrelevance.

In the comments on the above page, Peter Gerdes seems to be one of the few who does get this:

@Morty Yidel

It doesn't matter what the GPL says in situations 2 & 3. What matters here is copyright law.

The GPL is a license that lets you create and distribute copies of certain software. You are only bound by the terms of that license when you need the license as a matter of copyright law.

In 2 & 3 you aren't distributing any GPLed software thus you need only abide by the GPL if it is a derivitive work of a GPLed program. As I said that's a complex question but it's one that can only be answered by looking at copyright law and precedent not the GPL. Moreover, if merely using an API makes your code a derivitive work of the library servicing the API it's hard to see how programs like WINE aren't infringing.

If someone wants to apply the terms of the GPL, they first have to demonstrate something that would otherwise be copyright infringement. As the GPL (v2) says:

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

So, if I sit down at my computer and type (for the sake of argument):

echo 'import qt' > test.py

and then distribute test.py, have I created a derivative work of Qt (or any other GPL library)? Since I could type all of that without having a drop of Qt source code on my computer, I'd argue it's pretty difficult to say that this is a derivative work. Of course, once I go further and actually start using more the API than just the name 'qt', there is the chance that someone important might decide that by virtue of my use of an API, the program constitutes a derivative work of the library. (If they did, that would have huge implications — every Linux program, not to mention Linux itself, would become a derivative of Unix itself, for example, because it uses Unix API's, and every Win32 program would be a Windows derivative...)

This, of course, is completely different from C/C++, where in order to compile an executable, the compiler #includes parts of the actual source code of the library into the executable, thereby automatically triggering the need for an exemption from copyright laws.

With Python and Javascript, nothing of the sort occurs for the user to get the developer's software. If the developer decides to test their program before distributing, they may well need copies of the library code, either in source or object form, on their machine, but that has nothing to do with their distribution of their own code.

Now, the GPL (or whatever), may have terms explicitly forbidding you from finding some sneaky way around the licence, such as dynamic languages or web interfaces etc. But it doesn't matter. The licence could require you to sacrifice your first-born child to the gods of Jupiter for even thinking of doing such a thing, but the licence is irrelevant, since you haven't done anything that would require you to accept its terms.

So, unless judges are going to rule that use of APIs constitutes copyright infringement, all software licenses of this kind are simply irrelevant in this case.

This is one of the things that makes me shy away from the GPL. I'm a really grateful beneficiary of all that it has helped to safeguard, but as it relies on copyright law which may well be completely irrelevant for dynamic languages, it seems somewhat unwise to lean on it for any of my own financial security. More and more it seems that being paid for writing code, and not for the code itself, is the way programmers should make their living. Just because copyright law may have supported certain practices in the past doesn't mean we have a right to that continuing.

Comments §

blog comments powered by Disqus