Thierry is correct in his analysis.


If you really want to copy it - which I don't suggest - then copy it over into your repo, rename both the module and the class, and make your code use your derived work.


Put a header at the top that says something like "Based on Python's ConfigParser.py. Original ConfigParser.py distributed under the Python Software Foundation license. Additions and changes copyright [YOU] and distributed under the Apache Software License, v2."


Do not modify the stdlib in-place (as it sounds like you are doing) - but perhaps I just misunderstand.




From: Thierry Carrez <thierry@openstack.org>
Sent: Monday, January 2, 2017 4:45 AM
To: legal-discuss@lists.openstack.org
Subject: Re: [legal-discuss] [kolla]is it OK to modify python code in OpenStack project?
 
Jeffrey Zhang wrote:
> Recently, Kolla project has requirement to modify[1] the python's
> ConfigParser.py code[0].
>
> Python is using PSF license[3], which is GPL compatible. But OpenStack
> is using Apache License.
>
> Here is the diff view[2].
>
> I want to make sure: is it OK to re-license ConfigParser.py? If not, what
> the solution?
>
> [0] https://github.com/python/cpython/blob/2.7/Lib/ConfigParser.py
> [1] https://review.openstack.org/412101
> [2] https://gist.github.com/jeffrey4l/2258b276cbd038e73797cfa0952da371/revisions?diff=split
> [3] https://docs.python.org/3/license.html

I'm not a lawyer, but it sounds slightly tricky.

The PSF license is Apache-compatible, which means that you can combine
PSF-licensed and Apache-licensed code (if you retain the original
licenses). But OpenStack code must be licensed under a license supported
by the Contributor License Agreement (CLA) which allows redistribution
by the OpenStack Foundation under ASLv2 (currently only ASLv2, the MIT
and both forms of the BSD license meet this requirement).

So I don't think we can really bundle PSF-licensed code within OpenStack
code, and I think too much was copied from the original class so that
anyone can pretend it is original work.

Three solutions that should work around the problem without requiring
lawyers to further investigate the issue:

1/ Do a clean room implementation (by someone not familiar with the
original code)

2/ Rewrite your code so that it takes a pure ConfigParser class output
and transforms it into what you need, rather than copying code over

3/ Publish your modified ConfigParser into its own 3rd-party PyPI
library (licensed under the PSF license)

Of those, (2) is the one that introduces the less technical debt (no
code copy).

--
Thierry Carrez (ttx)

_______________________________________________
legal-discuss mailing list
legal-discuss@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/legal-discuss