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

Thierry Carrez thierry at openstack.org
Mon Jan 2 10:45:59 UTC 2017

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)

More information about the legal-discuss mailing list