[openstack-dev] [legal-discuss] [kolla]is it OK to modify python code in OpenStack project?

Jeffrey Zhang zhang.lei.fly at gmail.com
Tue Jan 3 02:10:57 UTC 2017


Thanks all guys.

Copy python code is really a bad idea. Now i have moved to re-use
oslo.config iniparser[0][1], which works too. So we have no license issue,
now. ;)

[0]
https://github.com/openstack/oslo.config/blob/master/oslo_config/iniparser.py
[1]
https://review.openstack.org/#/c/412101/5/ansible/action_plugins/merge_configs.py


On Tue, Jan 3, 2017 at 1:04 AM, Van Lindberg <van.lindberg at rackspace.com>
wrote:

> 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 at openstack.org>
> *Sent:* Monday, January 2, 2017 4:45 AM
> *To:* legal-discuss at 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/2258b276cbd038e73797cfa0952da3
> 71/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 at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/legal-discuss
>
> _______________________________________________
> legal-discuss mailing list
> legal-discuss at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/legal-discuss
>
>


-- 
Regards,
Jeffrey Zhang
Blog: http://xcodest.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170103/ffa81e1d/attachment.html>


More information about the OpenStack-dev mailing list